saving dates

Please help.

DHTMLXv3 is fantastic but I can not get it to save dates properly - where am I going wrong?

I have a form with a couple of calendar fields which work fine client side.
However, when I save the form it saves all the other fields OK but blanks the date values.
I have tried changing the date format - dateFormat=“%Y-%m-%d” so it matches the layout as shown in phpadmin.

I can use phpadmin to update the field value without problem -
UPDATE mytable SET datefield = “2000-25-01” WHERE ID =1

after this change the form shows the updated date; I save the form using dhtmlxv3 form and the dates are back to “0000-00-00”. I am in the UK if that makes a different. The field is just a ‘date’ in mysql.

many thanks,

We have reproduce the problem with date saving. Please try to use the attached file instead of the original. (14.8 KB)

I have downloaded the replacement dhtmlxform.js file and empty the browser cache but the form is still saving the date back to mysql as “0000-00-00”.

Here is the calendar control from the xml file to load the form -

I have tried it with and without the dateformat and it makes no difference to the saved data.


could you please provide the code snippet that with form initialization and saving ? We’ll try to recreate the problem locally.