• Is there a simple way to display the dateTime in an inputfield using an alternative dateTime Format?
  • Or is there an easy way to display a datepicker when clicking in a normal textfield input?

To use the Salesforce datepicker on an input field:

          <apex:inputText size="10" id="datefield" onfocus="DatePicker.pickDate(true, this, false);" />

You will need to use API Version 29.0 on your VF page though.

| improve this answer | |

You can use java script date picker. Visit the link below for java script code.


| improve this answer | |

You can use DateTime.format() method or jQuery DatePicker - https://jqueryui.com/datepicker/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.