acf-field-date-time-picker icon indicating copy to clipboard operation
acf-field-date-time-picker copied to clipboard

ACF 5.0 Support

Open bostondv opened this issue 10 years ago • 20 comments

ACF 5.0 Pro was released today and breaks compatibility with this plugin. Do you plan on adding v5 support soon?

Thanks!

bostondv avatar Jul 07 '14 13:07 bostondv

Would be amazing to see this updated to include v5 support!

delucis avatar Jul 09 '14 15:07 delucis

Hope, that there will be an update

tmconnect avatar Jul 11 '14 03:07 tmconnect

Hi @soderlind !

Same here it doesn't work with ACF 5 :(

cedriccharles4 avatar Jul 14 '14 12:07 cedriccharles4

I would also love to see this one updated to support V.5 / PRO :-)

And besides that thank you so much for a lovely extension!

yanknudtskov avatar Jul 17 '14 12:07 yanknudtskov

I'd love to see this work again as well and would be happy to help in any way I can.

michaelsilva avatar Jul 18 '14 20:07 michaelsilva

I have just submitted an update to version 5.0, however the fields doesn't save the options correct and I can't seem to figure out why i doesn't work. if you @michaelsilva can figure it out why, please let me know.

yanknudtskov avatar Jul 20 '14 13:07 yanknudtskov

Fixed the bug with options not being saved. Front end doesn't work atm.

yanknudtskov avatar Jul 20 '14 13:07 yanknudtskov

I've corrected the plugin and updated it to rung with version 5.0 / PRO. Until @soderlind checks it out and merges into master branch, you can pull of my fork here: https://github.com/yanknudtskov/acf-field-date-time-picker

yanknudtskov avatar Jul 20 '14 14:07 yanknudtskov

Hmm just discovered there is a minor "bug" my fork, after you save the page/post that has the field in it, the value will be displayed as a timestamp and not the formatted version of it. Trying to figure out why that happens.

Other than that, it works just fine. So functionally it seems intact :-)

yanknudtskov avatar Jul 20 '14 14:07 yanknudtskov

Aah, finally figured it out. Had forgot to add the load_value() function to the plugin. Everything seems to be fine and dandy now.

yanknudtskov avatar Jul 20 '14 14:07 yanknudtskov

Nice work! I will test your fork on my project tomorrow.

bostondv avatar Jul 20 '14 14:07 bostondv

@bostondv Thanks! Let me know if it works or not :-)

yanknudtskov avatar Jul 20 '14 14:07 yanknudtskov

@yanknudtskov It works great for me :+1:

Just one issue, I get a PHP notice once the plugin is activated and when adding new fields with the date time picker type

Notice: Undefined property: acf_field_date_time_picker::$domain in ./plugins/acf-field-date-time-picker/date_time_picker-v5.php on line 20

I suggest you open a pull request and hopefully @soderlind can merge it soon!

bostondv avatar Jul 21 '14 12:07 bostondv

@bostondv Thanks :-) I've just opened a pull request.

yanknudtskov avatar Jul 21 '14 13:07 yanknudtskov

@yanknudtskov Great work! Thanks for this. Small bug: when this plugin is activated it seems to cause some trouble with the standard date-picker fields. When I open an edit page containing a date-picker field and scroll to the bottom, the date-picker dialogue is appearing at bottom left:

screen shot 2014-07-24 at 01 02 21

Deactivating your patched date-time-picker stops this happening. Minor bug, I know, otherwise all working wonderfully!

delucis avatar Jul 23 '14 23:07 delucis

@delucis Thanks! Hmm that's weird, I haven't seen that bug before. I haven't changed any of the JS behind the extension, so it must've been there all the time. Is it a consistent bug you can reproduce even if you make a new Custom Field template?

yanknudtskov avatar Jul 25 '14 16:07 yanknudtskov

@yanknudtskov Yes, just tried creating a new custom field group on the default post type which doesn’t have any existing custom groups. Even with just a default date picker, the same thing happens (i.e. no date-time-picker field needs to actually be displayed to reproduce the bug, just for the plugin to be activated). Tried various combinations, same result. The install is pretty clean, so as far as I can tell nothing else could be interfering.

delucis avatar Jul 28 '14 14:07 delucis

@delucis Ah I think I found the bug. There was a CSS issue where there was a missing display:none on a class.

I've corrected it now and can't seem to reproduce the bug anymore. Could you please verify it? You can just pull it off my fork :-)

yanknudtskov avatar Jul 28 '14 14:07 yanknudtskov

@yanknudtskov Yes! That’s fixed it. Thanks again for the work :+1:

delucis avatar Jul 31 '14 08:07 delucis

I think that 'var $domain' is missing in date_time_picker-v5.php

class acf_field_date_time_picker extends acf_field { var $domain;