Comments (10)
Thank you for the feedback, I'll look into this.
from acf-field-date-time-picker.
@ArnoldR can you please test again. In 2.0.7, with date format mm/dd/yy, create a new post, save it. Change the date format to dd/mm/yy and re-open the post in the editor.
I did this myself and 04/24/2013 became 24/04/2013.
Prior to 2.0.6, date was saved in the same format as you set it in add new field (e.g 24.04.2013), from 2.0.6 it's saved as a timestamp (eg 1366761600).
If you, prior to 2.0.6, save the date, upgraded to 2.0.7, changed the date format from mm/dd/yy to dd/mm/yy and opened the post in the editor, you might get the error you described above.
from acf-field-date-time-picker.
@soderlind I just did the test and, as you say, the 04/24/2013 became 24/04/2013 but if you click a second time on the update button of the post (without selecting an other date, just click to update the post), the date disappears.
If you want, I can send you a login/pwd on my wordpress to make some tests. Maybe we have different configurations.
from acf-field-date-time-picker.
@ArnoldR I don't need access to your site, I got the same error. I'll look into it.
from acf-field-date-time-picker.
Thank you. As I wrote above, if you choose a day between 1 and 12, example 10 April 2013, 04/10/2013 became 10/04/2013, update the post -> 04/10/2013, update again : 10/04/2013, etc... if this could help you.
Good luck !
from acf-field-date-time-picker.
From http://php.net/manual/en/function.strtotime.php
Note:
Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.
To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates or DateTime::createFromFormat() when possible.
So, in Europe we should use dd.mm.yy, but I'll write a fix in case people forget.
from acf-field-date-time-picker.
Fixed, will commit later today when I'm on a stable network (on a 3 hour bus ride now)
from acf-field-date-time-picker.
Ok thank you !
Before you commit, I would like add a case maybe to integrate in your update :
When you choose "D mm/dd/yy" instead of "mm/dd/yy", the "D" should display (for me, in French) : lun, mar, mer, jeu, ven, sam, dim before the date. -> It was ok with 2.0.5.
With 2.0.7, when we change "mm/dd/yy" to "D mm/dd/yy", the post already saved in "04/29/2013" becomes "Mon 04/29/2013" (ok, Mon = Monday) BUT if I click on the Datepicker to choose a date, the language is French, and the value of the field becomes in French too, example "Lun 04/29/2013" (Lun=Lundi=Monday in French), and when we valid the post, the value disappears completely. It seems to be a problem of translation, maybe not linked with your plugin, I don't know. Or maybe we can't use all the letters defined on http://docs.jquery.com/UI/Datepicker/formatDate
like "D", "M", etc... but with the version 2.0.5 this worked very well.
Thanks
from acf-field-date-time-picker.
Please test v2.0.8, it adds an option to store the date and time field as a UNIX timestamp or not.
from acf-field-date-time-picker.
Thank you for this option, it works on my side.
from acf-field-date-time-picker.
Related Issues (20)
- Date only request HOT 1
- readonly Setting is Missing.
- After acf Update class acf_field_date_time_picker is declared more than once HOT 15
- Cannot save a time output that does not show a date HOT 1
- EOL ACF PRO 5.0 support (?) HOT 2
- Re-adding support for ACF PRO HOT 4
- Limit timespan
- Setting a default time using the time only option in ACF HOT 4
- "English (Canada)" WordPress Regional Setting Interpreted as Catala
- Php error (uncaught error calling undefined function) HOT 1
- UI time picker doesn't run? HOT 2
- Save and Get in ISO 8601 Format HOT 1
- Feature request: Bind the "Now" button to the site's timezone setting
- Is this maintained?
- Can't include in plugin HOT 3
- Can't order posts correctly, because saving as timestamp doesn't work!
- Year and month reversed using timestamps HOT 1
- Saving as timestamp doesn't work HOT 2
- Time Picker doesn't show on Front End HOT 1
- How i call the picker in other admin inputs? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-field-date-time-picker.