Can 'setSensitiveRange' method be used by dhxCalendarA?

Hello,

I have a grid control in which a column type is defined as dhxCalendarA:

mygrid.setColTypes("dhxCalendarA");

When a cell in that column is clicked, I would like the calendar that pops up to appear with a sensitive range of today forward. I tried this:

mygrid.attachEvent("onEditCell",function(stage,rId,cInd){ if(stage==1 && cInd==0){ var currentdate = new Date(); var mycalendar = mygrid.cellById(rId, 0); mycalendar.setSensitiveRange(currentdate, null); } });

… but the setSensitiveRange method doesn’t appear to work. Please let me know how this might be done correctly. Thank you.

Please, try to use the onDhxCalendarCreated event:

mygrid.attachEvent("onDhxCalendarCreated", function(mycalendar){ var currentdate = new Date(); mycalendar.setSensitiveRange(currentdate, null); })

Thank you, sematik, I appreciate your help and will try your code.

sematik, thank you very much. The code works nicely.

I really like DHX products!

You are welcome. Thanks for being with us.
Have a good day.