Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by elmar hilber on Mar 04, 2008 08:19
open dhtmlx forum
setSensitive for dhtmlxDblCalendarObject

hello!

We are testing whether the dhtmlxDblCalendar feeds to our requirements. We saw that

mCal = new dhtmlxCalendarObject('dhtmlxCalendar', true, {isMonthEditable: true, isYearEditable: true});
        mCal.setYearsRange(2005, 2009);        
        mCal.setDate(new Date())
        mCal.setSensitive(new Date("2008/03/3"),new Date("2008/03/26"));
        mCal.draw();            
is working fine. The problem we have concernes dhtmlxDblCalendar. How works the setSensitive there?

<script type="text/javascript" defer>
var mDCal = new dhtmlxDblCalendarObject('dhtmlxDblCalendar', true, {isMonthEditable: true, isYearEditable: true});
mDCal.setYearsRange(1980, 2020);
mDCal.setDateFormat("%d/%m/%Y");
mDCal.setDate("06/03/2008","15/03/2008")
mDCal.setSensitive(test());
mDCal.draw();

function test(){
alert ("test");
}
</script>

According the documentation we called a function which also works fine. But what should be in that function? Can you give as an expamle code?

Thx
Answer posted by Support on Mar 04, 2008 09:18
Sorry for inconvenience, this is incorrect text in documentation, actually it doesn't receive any parameter and works in next way

right calendar set to dates range lesser than current right date
left calendar set to dates range bigger that current left date

Basically you can access right and left calendars as
mCal.leftCalendar
mCal.rightCalendar
and use single calendar API against them