Open madc opened 10 years ago
+1 I am trying to find a fix for the same problem using the admin generator, but to no avail. I guess I'll leave the date range fields for later and wait for a fix.
I just found out, that it is possible to overwrite the 'format' option with the 'formatSubmit' option, what exactly solved this problem.
'formatSubmit' => 'dd.MM.yyyy',
@madc I tried it. But when I use formatSubmit, it throws a javascript side error.
Uncaught TypeError: Cannot call method 'getMonth' of null
Ok, if I use, for example: formatSubmit: 'yyyy-MM-dd' it works flawlessly but if change that format it throws the javascript error.
The format option for date widgets has it's limits right now. I was not able to spend more time and find a more flexible solution. I guess it would be a good idea to discuss to what extend we need date, time and currency localized? Which standards we should use? Some widgets (used here) have their own formatting options and transforming the formats can be really a pain in the ass.
What we actually need is some new JS date/time picker widget that uses a good standard. Pickadate looks nice but it does not have a date-range option and it also uses it's own formatting rules instead of implementing a more widely accepted standard.
In my opinion, pickadate is like a slap into my face. Is there no complete lib for bootstrap styled inputs? But maybe this discussion should be topic of a new issue?
@madc Opened another issue with a discussion.
@loostro i think this issue can be closed?
@fadoe i'll test it
I already mentioned it somewhere, the daterange_picker inserts a wrong date. Instead of something like '2013-08-11 - 2013-09-11' it inserts '2013-00-11 - 2013-00-11'.
The format should be
instead of
Also an option to format the date would proof helpful.
Thanks.
/m