Giter Site home page Giter Site logo

Comments (9)

richgcook avatar richgcook commented on July 24, 2024

Any help on this?

from acf-field-date-time-picker.

soderlind avatar soderlind commented on July 24, 2024

I need a bit more information please.

  • I guess you're testing 2.0.11 and not 2.0.1.1
  • Have you checked for javascript error?
  • I assume you're using WP 3.6.x?
  • What kind of server are you using (LAMP, MAMP ..) ?

from acf-field-date-time-picker.

richgcook avatar richgcook commented on July 24, 2024

I guess you're testing 2.0.11 and not 2.0.1.1 — Yep, sorry.
Have you checked for javascript error? — No JS errors on the add post pages
I assume you're using WP 3.6.x? — Using 3.6
What kind of server are you using (LAMP, MAMP ..) ? — this is on the live, and using MediaTemple with Apache

from acf-field-date-time-picker.

richgcook avatar richgcook commented on July 24, 2024

screen shot 2013-09-18 at 13 36 13
screen shot 2013-09-18 at 13 36 25

from acf-field-date-time-picker.

richgcook avatar richgcook commented on July 24, 2024

Two screenshots attached above. Top image is how it looks before I select a date, then then bottom image is how it looks once two dates are selected. When I clicked 'Update' or 'Save', it simply returns the fields back to the top image and no information is saved.

from acf-field-date-time-picker.

soderlind avatar soderlind commented on July 24, 2024

Doest it work if you change the date and time format to?: dd.mm.yy hh:mm

from acf-field-date-time-picker.

richgcook avatar richgcook commented on July 24, 2024

It definitely, does. Nice. So it's to do with the date format. So either, it need to be fixed backend, or I could somehow turn dd.mm.yy into D dd MM on the front.

from acf-field-date-time-picker.

soderlind avatar soderlind commented on July 24, 2024

The "problem" is strtotime, it's picky .. meaning if it doesn't understand the date format it'll return nothing. I would love to use DateTime::createFromFormat, but it's PHP >= 5.3.0 (WordPress is PHP >= 5.2.4)

I suggest that you use dd.mm.yy where you set the date, and use D dd MM on the front. In the latest version you can set "Get field as timestamp" and if you're running PHP >= 5.3, use something like:

$datetime = DateTime::createFromFormat('U', get_field($field_name));
echo $datetime->format('D dd MM');

You can read more about get_field at http://www.advancedcustomfields.com/resources/functions/get_field/

from acf-field-date-time-picker.

richgcook avatar richgcook commented on July 24, 2024

Many thanks – this makes perfect sense.

from acf-field-date-time-picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.