You need to sign in to do that
Don't have an account?
Naresh Kukreti
Using Jquery Date Picker with VisualForce <apex:inputText/>
I am trying to use Apex inputText control to input date from user using a jquery Date Picker.
The page code and used javascript function is given below, the code seems to me working absolutely fine when I am using HTML input control but not working with Apex inputText control.
The page code and used javascript function is given below, the code seems to me working absolutely fine when I am using HTML input control but not working with Apex inputText control.
<apex:page showHeader="false" id="mypage" docType="html-5.0" controller="ControllerCalculateIncentive" sidebar="false" standardStylesheets="false"> <html> <head> <apex:stylesheet value="{!URLFOR($Resource.styles, 'bootstrap.css')}" /> <apex:stylesheet value="{!URLFOR($Resource.styles, 'scrum.css')}" /> <apex:stylesheet value="{!URLFOR($Resource.styles, 'jquery-ui.css')}" /> <apex:stylesheet value="{!URLFOR($Resource.styles, 'font-awesome.css')}" /> <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery-1.11.1.js')}"/> <apex:includeScript value="{!URLFOR($Resource.styles, 'bootstrap.js')}"/> <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery.min.js')}"/> <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery-ui.js')}"/> <script type="text/javascript"> var j$ = jQuery.noConflict(); j$(document).ready(function(){ var v= '{!$Component.mypage:frm:StartDate}'; j$(v).datepicker({ dateFormat: 'dd-mm-yyyy', changeMonth: true, changeYear: true}); }); </script> </head> <body> <apex:form id="frm"> <apex:inputText id="StartDate" value="{!StartDate}" ></apex:inputText> <apex:form> </body> </html> </apex:page>
Please check with the following link from stack exchange community with same question and suggested workaround.
- http://stackoverflow.com/questions/41889239/using-jquery-date-picker-with-visualforce-apex-inputtext
Mark this as solved if it's resolved.Best Regards,
Nagendra.
Thanks for response. I checked out the link , but still the problem is not resolved. Acutally same code is working fine with html input control but not with the apex inputtext controls.
Thanks
I have replied to your question in below link, please go through it.
https://developer.salesforce.com/forums/ForumsMain?id=9060G000000Xhey