Jump to content


Photo

Problem with date format


  • Please log in to reply
22 replies to this topic

#21 ryan

ryan

    Hero Member

  • Administrators
  • 5,980 posts
  • 3380

  • LocationAtlanta, GA

Posted 27 March 2012 - 10:34 AM

When you populate a date into the field via the date picker, it should populate it in with this ISO format: YYYY-MM-DD. This is a format recognized by both strtotime() and jQuery's datepicker. So once you hit save, it should be in correct Finnish format. It sounds like that's not what it's doing in your case? Can you describe more?

We will probably go with predefined date formats that both PHP and jQuery can recognize, as soon as there's time to get into it.

#22 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,586 posts
  • 905

  • LocationVihti, Finland

Posted 27 March 2012 - 10:38 AM

It does. Problem comes later on. This is the scenario:
  • I choose second day from January this year from datepicker: 2012-01-02
  • I save page, 2012-01-02 is rightly formatted to Finnish date02.01.2012
  • I click datepicker again. Datepicker believes it is first day in February...
  • This leads to a mess :)


#23 ryan

ryan

    Hero Member

  • Administrators
  • 5,980 posts
  • 3380

  • LocationAtlanta, GA

Posted 20 April 2012 - 09:23 AM

Thanks for the good description on the issue there. I finally understand it and have fixed it (I think). But I'm making some other updates to the Date Inputfield so going to be committing them all together.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users