Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Issue with 31/12/2012


Reply


6 Posts   458 Views

Avatar
pbenoit

Community Member, 9 Posts

26 April 2013 at 4:42am

'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

Avatar
swaiba

Forum Moderator, 1805 Posts

26 April 2013 at 12:44pm

how about "dd/MM/yyyy"?

Avatar
pbenoit

Community Member, 9 Posts

29 April 2013 at 9:17pm

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?

Avatar
swaiba

Forum Moderator, 1805 Posts

30 April 2013 at 4:32am

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.

Avatar
pbenoit

Community Member, 9 Posts

3 May 2013 at 8:52pm

I have been able to replicate this on a second install. I will build a fresh install today and update.

Avatar
HARVS1789UK

Community Member, 21 Posts

11 September 2013 at 8:16pm

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?