Joseph Pollone
ย ยทย I push pixels because that's what heroes do.

How do I set Date PickeD when loading data in order to pass form validation?

Resolved

Hello! I'm having a slight issue with Date Picker. Assume that I have data in my Supabase table and that I can retrieve the data just fine.

In my example, there are 2 conditions to display the date when I edit the date. (I'm opening this as a form modal so there might be 10 other inputs.)

Condition 1

Loads the UI with the stored date if it exists. ๐Ÿ‘‡๐Ÿผ

Condition 2

If there is no date, then display the selected value from the Date Picker. ๐Ÿ‘‡๐Ÿผ

A small problem surfaces when I enable Form Validation on the magical Date Picker. ๐Ÿ‘‡๐Ÿผ

If I don't select the date again using the Date Picker to set Date Picked, a validation error is thrown. ๐Ÿ‘‡๐Ÿผ

๐Ÿ™‹๐Ÿฝ Is there a way to load the magical Date Picked?

I think in the past I tried multiple widgets and visibility conditions, but I would prefer to just load Date Picked.

I have about 7 dates to set. I also get that it's easy enough to validate in the Save button. Hmmm. After typing all of this I realize that I need to perform "business rule validations" (start_date cannot be greater than end_date, etc.) in there anyway, so...

Here's the Date Picker action on my container.

2 replies