+ Start a Discussion

allowing multiple date formats

We have an online application using Sites. Our applicatants come from a variety of countries with differing locals. Some are used to mm/dd/yyyy and others dd/mm/yyyy.


Is there any way to set a date field format to something more universal?


Since puting in 5/4/11 could mean May 4th or April 5th, we would like to use a format like 03 Jan 11


Is such a thing possible and if so, how?




Yes. that is possible. The best way is to show a date picker. Or if you want "03 jan 2011", that is also possible. 

As you mentioned that it is using sites, I am assuming that all of them are VisualForce pages. So, from a VF page, in the front end you can build 3 drop-down lists (one for day, one for month and other for year) and in the back end you can combine the values from all 3 drop-downs.



yes, I am using VF. Right now I am using <apex:inputfield> to sync with the field, which of course provides the standard formating for a date field. The standard date picker is insufficient as it only gives options for this year or later and our fields are more like date of birth kind of fields.


So what alternative is there for a more robust date picker? something from jquery?


I could do the 3 picklist idea, but it's not a great user experience and requires gluing on the back end.


Yep...this is really cool....once I had a test drive on it and it's great....