Calendar not opening on set date

I have a grid cell as a dhtmlxCalendar. I set the Calendar date programatically 'Cal.setDate(date) but when the user clicks in the cell it doesn’t open showing the setDate but today’s date only. Please can you tell me what I am doing wrong.

Thanks.

You may use the onEditCell event that is called when cell edited:

[code]grid.attachEvent(“onDhxCalendarCreated”,function(calendar){
yourCalendar = calendar;
})

grid.attachEvent(“onEditCell”,function(stage,rId,cIndex){
if(stage==1&&cIndex== INDEX)
yourCalendar.setDate(“29/11/2010”);
})[/code]

Hi Alexandra, I HAVE set the date. The calendar still opens showing today’s date as default.

Thanks

if the value is not set (cell) value, calendar shows today date. However, using onEditCell event you may change the calendar date after it is opened. Locally the approach that I have provided works.