Date validation ?

KM SN
Tera Expert

In my scoped application i have a field called planned start date where it should not take past date if so it has to throw error msg and should clear the value but unfortunately its happening for past date, today , and for future date too.

 

what went wrong in my scripts?date on change.PNGdate-si.PNG

8 REPLIES 8

Jim Coyne
Kilo Patron

BTW, these posts might help when posting questions in the future:

TNT: Screenshots Help, but Code is Better

TNT: And Formatted Code is Even Better

Thank You will follow same going forward!!

Amitra Bhunia
Tera Expert

Hi,

 

There is an easy/best way to do date validation by UI policy instead client script. I have added the same functionality on a date time field on incident table for the demo. You can see the screenshots attached. detail description are below according to name of the images:

1. No error showing todays date or future date

2. Error showing for yesterday/past dates

3. UI policy details to set the validation condition if date field is before today.

4. one line of script needed to show the error message

5. UI policy action to remove the field value when condition satisfy for past dates.

 

I hope this solves your query. If it helps please mark my response correct or helpful.

 

Thanks & Regards,

Amitra

 

 

KM SN
Tera Expert

i tried same but unfortunately its working fine in backend but its not working in workspace.