Why id date on server received as ‘Fri Sep 09 2011 10:35:00 GMT+0500 (Pakistan Standard Time)’ and not 09/09/2011? While I set the date format on client as:
var dt = myForm.getCalendar("OrderDt");
dt.setDateFormat("%d/%m/%Y");
Why id date on server received as ‘Fri Sep 09 2011 10:35:00 GMT+0500 (Pakistan Standard Time)’ and not 09/09/2011? While I set the date format on client as:
var dt = myForm.getCalendar("OrderDt");
dt.setDateFormat("%d/%m/%Y");
In the attributes of a calendar item try to add
serverDateFormat: "%d/%m/%Y",
Setting serverDateFormat="%d/%m/%Y in xml does not help either. I am getting the date in the same long format.
Please provide a complete demo to reconstruct an issue.
Hello,
I had the same problem. No effect with serverDateFormat in XML.
After replaced the form and calendar libs from this recent thread :
http://forum.dhtmlx.com/viewtopic.php?f=7&t=20250
The problem is solved for saving. Server dates are now in the good format.
but there’s now a regression :
When the data are loaded in the form, dates are not displayed anymore (the date value is still here but not displayed in the form).
Thanks for your help,
@++
JC
<?xml version="1.0"?>
<items>
<item type="block" inputWidth="auto">
<item type="settings" position="label-left" labelWidth="150" inputWidth="180"/>
<item type="fieldset" name="dat2" inputWidth="auto" label="Gérer un matériel">
<item type="block" inputWidth="auto">
<item type="hidden" name="id"/>
<item type="input" value="" validate="NotEmpty" inputWidth="280" name="description" label="Description"/>
<item type="calendar" value="" inputWidth="100" name="install_d" dateFormat="%Y-%m-%d" serverDateFormat="%Y-%m-%d" label="Date d'installation"/>
<item type="button" name="edit" value="Valider"/>
</item>
</item>
</item>
</items>
Hello,
Could you please provide direct link to check issue?
or send it to support (at) dhtmlx dot com (with link to this forum thread)
Hello Andrei,
Here’s a complete demo.
Please keep me informed, thanks in advance.
form_cal_nodata_demo.zip (48.8 KB)
Hello Andrei,
I’ve tested and I can confirm that it’s OK now.
Thanks
@++
JC