Date Time Validation on Server

Wappler 4.1.3
Win 11
Node.JS
PostgreSQL
Hosted on Digital Ocean Droplet

Have an input field with type input type="datetime-local", this field is also required.
on API, have imported the fields from the form directly like this:


this is how the validation on the datetime-local field looks like:

the problem is that since the incoming data is in date time format:
image
we get an error back from server side:
{"form":{"ValidFrom":"Please enter a valid date.","ValidUntil":"Please enter a valid date."}}
in the validation rules, there is no option for datetime:
image

request to please add option for datetime as well on server side validation.

bumping this report.

Use following updated file: core.zip (4.4 KB) Unzip to lib/validator.

Edit your server action with the code editor, search for "core:date" and change it to "core:datetime".

1 Like

this works, have verified.

can we expect that DATETIME will be added in UI as an option here:
image

and here:
image

This is now available in Wappler 4.4.0

1 Like

This topic was automatically closed after 46 hours. New replies are no longer allowed.