[SalesForce] How to change input date format to mm/dd/yyyy

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);" />

Best Answer

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.

Related Topic