The CreatorCon Call for Content is officially open! Get started here.

how to use UI policy for date validation and clear that multiple field for catalog form

rahul16
Giga Guru

rahul16_0-1664802081580.png

I created a UI policy where we take dates from the form.

rahul16_1-1664802115366.png

How to write a script that

 

  1. if the user enters past dates then clear the selected field.(if user select start_date wrong then clear that field only not the other and same for the start_end date too)
  2. if the user enters the date_start and date_end if the date_end is less than date_start then clear the date_end field.

how to achieve this with one UI policy.

I created a UI policy for all date validation conditions but I can't clear the selected field if the user selects the wrong date.

rahul16_2-1664802388150.png

This is the catalog form date 1 is date_Start and date 2 is date_end.

 

5 REPLIES 5

Muhammad Khan
Mega Sage

Create 2 UI Policies.

1st UI Policy to clear Start Date

MuhammadKhan_1-1664810757936.png

 

MuhammadKhan_2-1664810783821.png

 

 

2nd UI Policy to clear End Date

MuhammadKhan_3-1664810815682.png

MuhammadKhan_4-1664810837496.png