mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Fix wrong date conversion from PHP format 'y' to jquery date and back.
While 'y' in PHP means 4 digits year (e.g. 2012), jquery date picker means 2 digits (e.g. 12). That's all fine until then but when you pass the 2 digit year value back to PHP it all goes awry. For exmple, defatult date format in en_US is 'MMM d, y' so in jquery date picker it's something like this 'Aug 22, 12' and eventually PHP will convert that value to '0012-08-22' which completely wrong.
This commit is contained in:
parent
14b8071803
commit
f3fcae315d
@ -591,7 +591,8 @@ class DateField_View_JQuery extends Object {
|
||||
'/l/' => '',
|
||||
'/YYYY/' => 'yy',
|
||||
'/yyyy/' => 'yy',
|
||||
'/[^y]yy[^y]/' => 'y',
|
||||
// See http://open.silverstripe.org/ticket/7669
|
||||
'/y{1,3}/' => 'yy',
|
||||
'/a/' => '',
|
||||
'/B/' => '',
|
||||
'/hh/' => '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user