DhtmlxCalendar IE behaviour

Hello,

We are facing some difficulties using DhtmlxCalendar with IE 8 (Compatibility mode deactivated).

  1. When centering the calendar div inside a table cell, we correctly obtain the calendar in the center. However, we also obtain an output value (“false”) from the DhtmlxCalendarObject. This issue does not appear when using IE 8 in compatibility mode.

Sample HTML

 


 

 

With corresponding DhtmlxCalendar initialisation
window.onload = function() {
HistoryCal_1 = new dhtmlxCalendarObject(‘HistoryCalendar1’);
HistoryCal_1.setYearsRange(2010, 2011);
HistoryCal_1.setSensitive(new Date(‘2010-07-08’), new Date(‘2011-12-31’));
HistoryCal_1.setDate(new Date(‘2010-07-08’));
HistoryCal_1.options.weekstart = 1;
HistoryCal_1.attachEvent(“onClick”, function () { HistoryCal_2.setSensitive(new Date(HistoryCal_1.getDate()), new Date(‘2011-12-31’)); numDays(); });
HistoryCal_1.setSkin(‘dhx_skyblue’);
HistoryCal_1.draw();
//
HistoryCal_2 = new dhtmlxCalendarObject(‘HistoryCalendar2’);
HistoryCal_2.setYearsRange(2010, 2011);
HistoryCal_2.setSensitive(new Date(‘2010-07-08’), new Date(‘2011-12-31’));
HistoryCal_2.setDate(new Date(‘2010-07-08’));
HistoryCal_2.options.weekstart = 1;
HistoryCal_2.attachEvent(“onClick”, function () { HistoryCal_1.setSensitive(new Date(‘2010-07-08’), new Date(HistoryCal_2.getDate())); numDays(); });
HistoryCal_2.setSkin(‘dhx_skyblue’);
HistoryCal_2.draw();
/
/
HistoryCal_1.setSensitive(new Date(‘2010-07-08’), new Date(HistoryCal_2.getDate()));
HistoryCal_2.setSensitive(new Date(HistoryCal_1.getDate()), new Date(‘2011-12-31’));
numDays();
/*************************************************************/
return true;
}

The second isseu we are facing is the fact that although I declare
==> HistoryCal_2.setDate(new Date(‘2010-07-14’));
I obtain 2010-07-08 in my second calendar. This is also IE specific. However it doesn’t matter whether or not we use the IE compatibility mode.

Attached is a screenshot showing the output of my code.
Any ideas?

Cheers,

Blackmagic


Hello,

try to use disableIESelectFix methof for both calendars to solve the problem:

HistoryCal_1.disableIESelectFix (true);

HistoryCal_2.disableIESelectFix (true)

Hello Alexandra,

It solved the issue with the output value (“false”), which does not appear anymore.
However I still have the issue where the date displayed is not the same as the date I provided via setDate()

Regardsm

Blackmagic

Hello,

try to use the following to set date (pass a string instead of a date object):

HistoryCal_1.setDate(‘2010-07-08’);
HistoryCal_2.setDate(‘2010-07-14’);

Hello Alexandra,

Thank you. That solved the second issue.

Regards,

Blackmagic