I have two issues with date fields .
1- how to make a datepicker to show (today- now()) by default , I tried value : new Date() , and the browser get 'newDate' and of course is undefine , even when the design view shows the correct date .
2- the control date , has format j/m/Y , and shows the right format . But after chosing a date with the picker I get in the browser invalid proto , where and what to write the code to fix this . in order to save the model properly .
Re: 1 you will want to use an override or an event handler.
Re: 2 I do not understand whats happening. Can you share some screenshots etc?
For my first problem :
I enter that :
I get newDate() in browser and in code view what means that I get an invalid Date
where to parse a date field
Where should I code , what to do for saving to a model a date field in a correct date format ? the date is comming from a datapicker
Work around to default new Date()
use the evil way
eval('new Date()') instead of new Date()