4
  • 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?
3

To use the Salesforce datepicker on an input field:

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

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

| improve this answer | |
1

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

http://javascriptcalendar.org/javascript-date-picker.php

| improve this answer | |
0

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.