0

Currently I am using the following tag in vf page to choose date.But it displays in dd/mm/yyyy format.How to convert it to mm/dd/yyyy format

<apex:inputText value="{!datevalue}" size="10" id="demo" onfocus="DatePicker.pickDate(false,this,false);" />
2
  • I am assuming the library you are using has options to set the format of the input. I do not believe this is a salesforce question since you are using an imputtext with a JS library – Eric Oct 23 '16 at 18:42
  • @Eric DatePicker is the out of the box SF library. It's definitely in scope here. – sfdcfox Oct 23 '16 at 20:59
1

The format will be based on your locale settings. This is located under Setup > Manage Users > Users, and find the Locale drop down. The specific locale selected will determine which format will be used by DatePicker. Simply switching the way it displays on the screen would cause underlying behavioral problems with the database, which always parses dates according to your locale settings.

0

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.