Categories | Question details Back To List | ||
dhtmlxDBLCalendar How is getFormatedDate() supported in double calendar? I would like to use the live sample but code has been obfuscated! I note that the API documentation is incomplete for calendar. Thanks for your help Answer posted by Alex (support) on Jul 10, 2009 03:18 Double calendar has two selected dates. So, you can use the following approaches: var leftDate = dblCal.leftCalendar.getFormatedDate(...); var rightDate = dblCal.rightCalendar.getFormatedDate(...); leftCalendar and rightCalendar are dhtmlXCalendar objects and calendar API can be applied to them. Answer posted by JanM on Aug 04, 2009 06:10 Can u post a complete example please? I tried this but it doesn't work, both fields have the same value: mDCal = new dhtmlxDblCalendarObject("objId", true, {isMonthEditable: true, isYearEditable: true}); mDCal.draw(); mDCal.setDateFormat("%d.%m.%Y"); mDCal.setOnClickHandler(mSelectDate); function mSelectDate(date) { var leftDate = mDCal.leftCalendar.getFormatedDate("%d.%m.%Y", date); document.getElementById('leftDate').value = leftDate; var rightDate = mDCal.rightCalendar.getFormatedDate("%d.%m.%Y", date); document.getElementById('rightDate').value = rightDate; return true; } Answer posted by Alex (support) on Aug 04, 2009 07:28 Hello, it seems that http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=3342 post has resolved the issue, doesn't it ? |