CalendarA popup set default date for non-date data

With a calendarA column in a grid the user can type anything they wish OR use the calendar popup.

When there is a date in that column, the calendar will popup with that date in view.
If, however, the text is not a date (e.g. ‘not set’) the calendar will default to 0, which is the epoch and display January 1970. So the user will now have to scroll through over 40 years of 12 months to get to today.
Can I set the default calendar displayed date to today IF the date is text (0)?
BUT without changing the cell date, until a date is picked

I have solved the problem, but i’ve had to hack the js too.

on the grid, I’ve added:
if (obj.editorYear.initValue<=1970) {

Since ‘not set’ = 0 = 1/1/1970 this means 1970<=1970 giving todays date.
(The dates in question are from today onwards, so would never be less than 2014)


I’ve also had to add the following into excell/dhtmlxgrid_excell_dhxcalendar.js as the last line of the eXcell_dhxCalendarA.prototype.edit function.

this.grid.callEvent(“afterCalendarShow”, [this.grid._grid_calendarA, this.cell.parentNode.idd, this.cell._cellIndex]);

This creates the afterCalendarShow event used on the grid (above).

That issue cannot be reproduced with the latest version of the dhtmlxCalaendar.
So you may update your dhtmlxCalendar.

About your solution you may also try to use the onCalendarShow event