Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Antoni on Aug 28, 2009 15:38
open dhtmlx forum
How to set a default date with dhxCalendarA?

How can I set as a default date the date of the day in a grid's cell using dhxCalendarA?
By default, when the cell hasn't a value the date that appears is 1-1-1970.

Many thanks in advance.

Antoni
Answer posted by Alex (support) on Aug 31, 2009 07:36

Do you use the latest grid version ?

The issue doesn't appear in it:

http://dhtmlx.com/docs/products/dhtmlxGrid/samples/cell_types/calendar_grid.html?un=1251729927000

Answer posted by Antoni on Aug 31, 2009 08:28
I'm using the open source version of dhtmlx suite 2.1
I've discovered this happens when the default value is a blanc character (' ') instead of a null string('').
Is it possible to make as the default date the present date when it is invalid ?

Many thanks,

Antoni
Answer posted by Alex (support) on Aug 31, 2009 09:36

>> Is it possible to make as the default date the present date when it is invalid ?

dhxCalendar doesn't provide public methods to do that. 

You should use own approach to set correct value in the xml or in the addRow method