Date field not valid if date is added dynamically

I have a dropdown select that gives you 3 date options. 2 Pre-calculated and another where you select your own date from a date picker.

The select updates the own with the first 2 preconfigured options:

When I do the form post I get an error with the first 2 options, even though they show the calendar input select as updated and the format is exactly the same:

Only after selecting own date on the picker the date is accepted. Not with a value update via the select.

Is this a bug or am I doing it wrong OR is there a better way?

If you are using the date picker your input needs to be a text input not a date input. Strange work in the date picker.

Thanks @brad My input is currently set to text and not date

It seems from the screenshot that you are using the date picker only. Check whether your database field type is date or datetime as the value may not match with the field type.

Another reason the selected dates may not get saved are due to the formatting of date fields in the UI and this again can cause a mismatch between the db field type and value being sent to insert/update. The form values being sent to the server can be checked in the dev console by typing + form id.

1 Like