Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » Issue with 31/12/2012

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

Page: 1
Go to End
Author Topic: 281 Views
  • pbenoit
    Avatar
    Community Member
    9 Posts

    Issue with 31/12/2012 Link to this post

    '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

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Issue with 31/12/2012 Link to this post

    how about "dd/MM/yyyy"?

  • pbenoit
    Avatar
    Community Member
    9 Posts

    Re: Issue with 31/12/2012 Link to this post

    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?

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Issue with 31/12/2012 Link to this post

    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.

  • pbenoit
    Avatar
    Community Member
    9 Posts

    Re: Issue with 31/12/2012 Link to this post

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

  • HARVS1789UK
    Avatar
    Community Member
    14 Posts

    Re: Issue with 31/12/2012 Link to this post

    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?

    281 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.