Double Calendar - Allow left calendar to show and select dat


I am looking for a bit of help with a issue I just can’t seem to get round.

I have a double calendar on the webpage and I want to allow the user to show and select a date on the left calendar that is after the date selected on the right calendar, how do I achieve this?



It is possible to set onClick event handlers to left and right calendars separately:


/your code here/


/your code here/


Dates limitation behavior is hardcoded for dblCalendar, the only way to disable it - comment below lines in dhtmlxcalendar.js

dhtmlxDblCalendarObject.prototype.doOnCLeftClick = function(date){
date = new Date (date)
this._dblC.rightCalendar.setSensitive(date, null);

dhtmlxDblCalendarObject.prototype.doOnCRightClick = function(date){
this._dblC.leftCalendar.setSensitive(null, date);

Thanks for your solutions.

To get the result I was looking for, I found that a very small edit worked, changing the date to null, so the left cal is open ended until the right cal is selected; even when there are initial dates in both cals, see below.

dhtmlxDblCalendarObject.prototype.setDate = function(dateFrom,dateTo)
this.leftCalendar.setSensitive(null, null);
this.rightCalendar.setSensitive(, null)

I want to take it a step forward and get the right cal to move to the corresponding left date (when left date selected or reselected).

I appreciate any help you can give,

Thanks Again.

The described behaviour is the same as the default one. When you select date in the left calendar, the sensitive date range for the right calendar is set automatically.

If you want to define another behaviour, you can use onClick event handler of the left calendar.