How do I work with datepicker in forms?

When using a datepicker widget, I can return formattedDate to get the value back that I defined in the settings or selectedDate to get the ISO format. You can also use moment to convert the date.

However if the datepicker is in a form widget, the output always uses selectedDate and it doesn’t seem simple to use moment to adjust the format of the one date out the JSON.

If I don’t want the ISO, should I just avoid using the result?

Apologies for the trouble. This looks like an inconvenience. You’d have to format it using moment manually. for eg:

You can also try to access the formatted date directly using the name of the datepicker inside the form like below, instead of using if that would work better for you.


I’ll create an issue for this.