'Date' => 'Date'...
$datefield->setConfig('dateformat', 'dd/MM/YYYY')
When the user selects 31/12/2012 the CMS re-formats the date to 31/12/2013?
I am not using anything outside the standard date coding build into SS.
Any ideas??
Phil
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
'Date' => 'Date'...
$datefield->setConfig('dateformat', 'dd/MM/YYYY')
When the user selects 31/12/2012 the CMS re-formats the date to 31/12/2013?
I am not using anything outside the standard date coding build into SS.
Any ideas??
Phil
how about "dd/MM/yyyy"?
I updated to "dd/MM/yyyy" and still no joy, it still replaces 2012 with 2013 on save.
Does anyone else have any ideas or should I log as a bug?
Does anyone else have any ideas or should I log as a bug?
Before you log a bug I'll advise you prepare this in a clean install with the minimal code to reproduce the issue - which is what I'm sure you would do before you report a bug anyway - if you post that and the issue is on 2.4.x then I'll be able to fix it because I know it works. If it's on 3.x then hopefully you will get someone else to respond.
I have been able to replicate this on a second install. I will build a fresh install today and update.
I am also having this issue in SS3
The DateField seems to add 1 year to the given date on each save? i.e 31-12-2013, save = 31-12-2014, save = 31-12-2015 etc?
Can anyone shed any light as to why this is happening?