Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Lyrgard on Dec 08, 2009 02:51
open dhtmlx forum
Double Calendar onClickHandler

It seem that when using calendars.setOnClickHandler(onDateChange); on double calendar, when a date is clicked on the left calendar, it comes in the handler as a Date object, and when it is clicked from the right calendar, it comes as a string object.

I had to do something like that :

function onDateChange(date, obj, type) {
    if (type == 'left') {
        alert ("Begin : " + date.getDate() + "/" + date.getMonth() + "/" + date.getYear());
    } else {
        date = new Date(date);
        alert ("End : " + date.getDate() + "/" + date.getMonth() + "/" + date.getYear());
    }
}
Answer posted by Alex (support) on Dec 08, 2009 04:10
the issue is confirmed. We have attached the fixed library. 
Attachments (1)