I want to use a date picker but what I am getting is a normal text field to add/edit date
how can I bind a date picker?
<apex:inputText rendered="{!fieldType='DATE'}" value="{!valueToUpdate}" />
I want to use a date picker but what I am getting is a normal text field to add/edit date
how can I bind a date picker?
<apex:inputText rendered="{!fieldType='DATE'}" value="{!valueToUpdate}" />
Best Answer
Lets explore all the ways to form Date pickers
a)Using inputfield is best solution .
Disadvantage:Field level security and profile settings .If your object dont have edit access or field is hidden for any profile the same will apply and there is no way to bypass this security if you wish to by pass for various profiles (Note this is also advantage if your requirement is not to allow edit based on profile)
b)Hackish solution with input text
Apex Controller:
Disadvantage :hacked the JavaScript of salesforce and not officially recommended .
c)New trend after winter 14
Advantage :This is native to salesforce and safely recommended
Disadvantages: Not supported in Firefox and IE. Source: http://caniuse.com/#search=input%20type Your all the instances must be updated to winter 13
d)Using jquery component to do this .Jquery library or jquery UI will have this component
disadvantage:More developer skills needed and lot of testing with different browser