Associating dhtmlxCalendar with user's Locale

I am trying to render any date cells in the grid based on the user’s locale. On the server (servlet) side, I can return the date in the proper format in the XML… for example MM/DD/YYYY or YYYY-MM-DD, etc, based on the Locale that the user logged into the session with.

However, the DHTMLXCalendar object needs to interpret the data in the cell based on what was set via:
grid.setDateFormat(“%m/%d/%Y”);

Is there a recommended way to set the date format based on the chosen locale so that the date will be in the proper format as expected by the user, and will be handled properly by dhtmlxCalendar?

Please advise or point to a sample… thank you…

Hello,

setDateFormat may take two data formats:

  • the format of displaying data
  • the format of incoming data (xml data format)

grid.setDateFormat(displayDate,incomingDate);