Date picker default to null

Support MB Builder Date picker default to nullResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42004
    Petri PeltolaPetri Peltola
    Participant

    Is it possible to have the date picker have no data. It seems the default data is always todays date even if the date field is empty. Is it possible to have the data null if no date is picked with the picker? I would like to have the possibility of having the field empty if no date is known.

    #42011
    PeterPeter
    Moderator

    Hello Petri,

    The default value of the date field is null/empty. I don't see the today value when the date is empty and save the post. Can you please share some screenshots of the field settings?

    #42019
    Petri PeltolaPetri Peltola
    Participant

    Found the issue:

    I was trying to check if the field was null in views with twig, but it seems it's never null. Checking if it's empty worked.

    Looks like the twig date filter returns the current date when the given variable is empty, so that was throwing me off.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.