Closed Pezzab closed 6 years ago
Just an update to this - I forgot to say that despite the field refusing to display "12:00am" after saving that the time is set to "00:00:00" anyway.
So I guess that strictly speaking the time is saved as 12:00am it's just that the field remains blank - principally a UI issue (ie confusing for someone using that field if the time they are saving does not show up).
Not sure if this is related, but I cannot set an empty value for time - it always shows as 12am - and I can't use template tags to filter it out because [if fime_field] always returns true.
To fix, unless mistaken I believe you need to add '00:00:00' to lines 153, 230, 256, 336 in pods/classes/fields/time.php:
!in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) )
although this doesn't help with the [if time_field] template tags - they always return true.
Closing as a duplicate of #4937, should be resolved in #4959
As it says on the tin. This is true of the latest update to Pods and the previous version. If I try to set the time to 12:00am and update the page the form field goes blank.
This works the same if the time is set to 12 or 24 hour format.
Having noticed this on a test site I tried to see if I could repeat it on a live site I use this field on. Here the form not only didn't stay at 12:00am after updating it pulled in another time seemingly at random - the saved time changes each time I try and re save as 12:00am.
The test site as no other plugins installed. The live site has quite a few.
So two variations: field returns to blank each time I save as 12:00am or instead it returns an apparently random time.