Hi
I have an application that spits out dates like this:
I want to integrate dhtmlxCalendar so that when the user clicks on this input field, a calendar pops up with the date of the input-field preselected (in this case “2008-10-04”). If the user picks a different date, the input field should be updated.
From your example, I find that
cal1 = new dhtmlxCalendarObject(‘is_closed’,true);
should be used, however, this does not show the given date (2008-10-04) but displays the current date initially (2008-10-05).
How should I resolve this?
>>should be used, however, this does not show the given date (2008-10-04) but displays the current date initially (2008-10-05).
Creating calendar object from the input enables logic for auto-showing|input filling, but it doesn’t set initial value of calendar, you can do it as
cal1 = new dhtmlxCalendarObject(‘is_closed’,true);
cal1.setFormatedDate(document.getElementById(“is_closed”).value,"%Y-%m-%d");