Wrong value read from calendar

I added a calendar to my form in this way:

And when I read it from the PHP page $_POST[“buy_date”] I got this:

Mar 22 2013 17:41:00 GMT+0100 (CET)

I would expect to read 2013-03-22 like I do into the form after the date selection.

Thanks in advance.


See there attached files - try to use them all

Hi, I’m not using the dhtmlxcalendar.js as I user the full package dhtmlx.js.

I still get the format

Mar 22 2013 17:41:00 GMT+0100 (CET)

while reading the post value from the form.

any other suggestions?


Just try to include these files after dhtmlx.js in the library now - to test. And write to the support system - we’ll try to fix your issue in dhtmlx.js file.

I addede dhtmlxcalendar.js and nothing changed, then I added also the dhtmlxform_item_calendar.js and the calendar stop to work (it’s neither shown) due to the error:

this.doAttachChangeLS is not a function

waiting for a solution, in the meantime I’m going to write a formatter.

thanks in advance

You need to add all js files form this archive in usual order (form + foem_item_calendar + calendar)…
The best way - write to support system and attach your dhtmlx.js file to fix it.

I’ll try to add them.
What would I do to write to support system?

You can set the topic the same name and put the link to forum and attach js file.

Is this issue fixed for 3.6?

I’m using dhtmlx.js version 3.6 and the error still exists.

hi to all

depending on how you sending data on server:
myForm.getItemValue for calendar have 2nd param, set to “true” for date as string

if this will not help - please provide completed demo including all corresponding js/css files (you also can send it to support@dhtmlx.com)

It works fine when first parameter of form.getFormData() is set to true.


Unfortunately the first parameter is not documentated wether online nor in CHM.

correct, getFormData(true) or getItemValue(name, true)