Becouse no one was answering made changes to file and replaced 1 function in acf4 version.
function create_field( $field ) {
$field = array_merge( $this->defaults, $field );
extract( $field, EXTR_SKIP ); //Declare each item in $field as its own variable i.e.: $name, $value, $label, $time_format, $date_format and $show_week_number
global $post;
$metas = get_post_meta($post->ID);
$meta_key = '';
if($metas){
foreach($metas as $k => $meta){
if($meta[0] == $key){
$meta_key = $k;
}
}
}
$meta_key = ltrim($meta_key,'_');
$value = get_field($meta_key);
if ( $show_date != 'true' ) {
echo '<input type="text" value="' . $value . '" name="' . $name . '" class="ps_timepicker" data-picker="' . $picker . '" data-time_format="' . $time_format . '" title="' . $label . '" />';
} else {
echo '<input type="text" value="' . $value . '" name="' . $name . '" class="ps_timepicker" data-picker="' . $picker . '" data-date_format="' . $date_format . '" data-time_format="' . $time_format . '" data-show_week_number="' . $show_week_number . '" title="' . $label . '" />';
}
}
The code I’v added is:
global $post;
$metas = get_post_meta($post->ID);
$meta_key = '';
if($metas){
foreach($metas as $k => $meta){
if($meta[0] == $key){
$meta_key = $k;
}
}
}
$meta_key = ltrim($meta_key,'_');
$value = get_field($meta_key);
That if someone has same problem it’s a quick solution..
but lets hope that plugin developers will fix that isue and make it work right!
Did you change it in the Add-on or ACF directly? I have the same problem, but I think that changing ACF plugin isn’t a good idea.
I’v changed it in plugin. In file that stands for working with ACF 4.
Yes, changing that diractly in plugin might not work after updating, but since i’m requiring it, it woun’t be update..
I just hope that plugin developers will fix these and there would be no need to manualy do such thing.
As a solution u can dublicate these plugin.. change it name and make 2 fields with date/time and wen will be update and value will show in normal plugin then just turn off your copy plugin and make all fields from the updated plugin.
Good news for you! The latest version works with the latest version of ACF.
Just update both plugins, I already did it.
Best regards!