Support » Plugin: Advanced Custom Fields » ACF 5 free Early Access – Date picker problem

  • Resolved ciceronepavaloi



    I have tried the 5.6 early access update, and after the required database update, I noticed errors in frontend due to the fact that date picker fields values are returning a different format when acquired with get_field('my_date_field', $some_post_id).

    Example: a value that returns as 20180423 with 4.4.12 version now returns 23/04/2018.

    Strangely enough, the Save format is set to yymmdd and Display format to DD, d MM, yy, meaning that, according to current ACF documentation, when the third parameter is not set, the above call should have returned as Monday, 23 April, 2018… For some reason, in 4.4.12 the value is returned unformatted, but in 5.6 is returned as formatted with the default display format dd/mm/yy, not the specified one.

    Did the default bool third parameter changed for 5.6?


Viewing 1 replies (of 1 total)
  • Ok…

    I found out in documentation the reason why the date picker behaves differently. In version 5 the Save format is dropped and there is a new Return format that controls what the get_field returns. Also my understanding for Display format was wrong.

    Nevertheless, it would have been easier if the “Upgrade Guide – Version 5” page stated somewhere this kind of changes, maybe in the “Developer Notes”. The “Do I need to make any changes?” section of “FAQ” is somehow misleading…

    Anyway, keep up the good work and thank you for this powerful plugin. You’re still awesome. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘ACF 5 free Early Access – Date picker problem’ is closed to new replies.