Page 1 of 1

Saving a date from a datepicker

Posted: Thu Mar 06, 2014 11:36 pm
by HaX

Hello,

the question may be silly but still I've been trying for hours without achieving anything.
In the database there is a field of type Date and I want to fill it using the value coming from a Datepicker.
In the request mapping I mapped the datepicker to the Date field.
It doesn't work, saying that the format is not the expected one. I then tried to modify the format to 'yy-mm-dd' in the datepicker properties but still it didn't work because the database was expecting 'yyyy-mm-dd'.

I tried a lot of solutions to format the date but I've never been able to do it. Also, a strange thing is that if I print out the "value" variable in the javascript defined at the mapping level, I get the string representing the format I specified in the datepicker properties.
On the other hand, if I define a new Date object from within javascript and I print it, in return I get the date just as I expected.

Can anyone please provide some help?

Thanks in advance.


Saving a date from a datepicker

Posted: Thu Mar 06, 2014 11:58 pm
by Illya Stepanov

Hello,

Can you please show us what you have tried? (some screenshots would help)