Date component - setting the minDate

I am wondering if there is a way to set the minDate value of a date component via a script?

Something like this setDeleteDate.setValue({ minDate: now() }) or setDeleteDate.setValue({ minDate: "" }) is what I am looking for.

Hi @Shawn_Optipath,

You could create a variable, use it as the min date, and then update it as needed via a script.

1 Like

Hi @MikeCB ,

Thanks for the nudge! Works like a charm.

Variable: visitMinDate. Initial value: now()
On a switch, the script: visitMinDate.setValue(switch1.value ? "" : "now()");

1 Like