Hi,
Although I understand that the date picker and DB formats don't play very well together, I wonder if there is a simple solution to hundreds of web threads related to this topic.
My page has a date picker with date format dd/mm/yy. (e.g. 13/10/2014)
My DB has a column "date" with date format yyyy-mm-dd (e.g. 2014/10/13)
I have a createAttendance service where Attendance is a good name for my attendance tracker App.
On the Before Send service, I mapped the date picker to the DB date and all other screen elements and the DB columns.
Finally, I added the JS code shared by Oleg on this thread (e.g. var parts = value.split("/");
return parts[2] + "-" +parts[1] + "-" +parts[0];
to the date element/column.
HOWEVER, my DB still doesn't save the date!
I have included an alert ( value ) on my JS code and it shows 13/10/2014 (correct!)
I have included a second alert ( newVariable ) that I created instead of returning the parts array directly and it shows 2014-10-13 (correct!).
HOWEVER, my DB still doesn't save the date!
I have prayed, cried, slept, woke-up, and my DB still doesn't save the date!
Any help would be much appreciated.
Thanks, in advance, for your help.
Time to sleep again... 4:45a.m.