Date picker when cloned adds data when it shouldn't

Support MB Group Date picker when cloned adds data when it shouldn't

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9495
    FEDFED
    Participant

    Using date picker in a cloneable group with timestamp set to true results in the field being saved as array(1) { ["timestamp"]=> string(1) "0" }, even if the user hasn't entered any data in the field. You can see it on a var_dump of a cloneable field, which is how I noticed it.

    If timestamp => true is not set, the field works normally, and doesn't get saved to the database.

    #9516
    Anh TranAnh Tran
    Keymaster

    Hello,

    When the timestamp is set to true, the date/datetime field will store values as an array in a group. This array contains 2 elements:

    • timestamp: the Unix timestampt
    • formatted: the formatted (user-entered) value

    This is a difference between a single date/datetime field, which stores only timestamp value.

    So, when you get the value from this field, please check both values.

    Here is the video that demonstrates how the data is saved:

    https://imgur.com/a/wHVSOWT

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Date picker when cloned adds data when it shouldn't’ is closed to new replies.