Hi,
I’d like to initilize a calendar, which is inside a form, with the current date and time.
Date.now() doesn’t seem to be allowed as a value.
Can someone show me how this can be done?
Thanks a lot!
Marco
Hi
There is a sample, which you can be guided by to achieve it:
dhtmlx.com/docs/products/dht … endar.html
Thanks Darya for your quick reply, but unfortunately I don’t how this can help me…
when you open the form you get a date 2011-06-20 14:38 and not today’s date.
The only line of code that uses something “live” is:
myForm2.loadStruct("../common/dhxform_calendar.xml?e=" + new Date().getTime());
Are you saying that you must build your form with xml in order to place he system’s date in the calendar?
Thanks again!
Marco
For such initialization it is necessary to specify a line according to the set template.
More javascript date functions here: w3schools.com/jsref/jsref_obj_date.asp
Thanks Darya, I was able to solve the problem!
Greetings,
Marco