Timestamp Using dHtmlxCalendar


Currently I’m working on dhtmlxCalendar. I want to use localization with the same. For that purpose I need timestamp to store it in database. Please help me out to get timestamp from dhtmlx control.




calendar doesn’t provide ready method to get timestamp. It is possible to get object of selected date:

calendar.atatchEvent(“onClick”, function(date){

/your code here/



1)The above solution cannot be worked out in our scenario as the date needs to be retrieved at the server side code from request (described below):
      I’m using dhtmlxcalendar inside form( e.g. search form) which needs to be submitted to process jsp. When I’m retrieving the date value on process page from request the date gets garbled. So, I can’t insert this date into database as it throws an error.
2) I need to display localized dates in a column of a grid. For this purpose I tried to set the type of column as dhxCalendar in XML, but after this user is able to edit the field. (On dbl click it shows dhtmlxCalendar to select date). I want that column to be non editable. Is there any parameter to make dhxCalendar type column as non-editable OR any other way by which i can get the localized dates depending on the format. I tried using type ‘ro’ but it displays the date in the way it is mentioned in xml for the cells, without honoring the format property.

Please help me with these issues.



you can try to use the following approach to block editing in some column:

return columnIndex!=index;

Where index is index of the dhxCalendar column.