Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Start date shoud not be after end date - End date should not before start date

thaduri sai
Tera Contributor

Hi Team,

 

We have two date fields ":start date & end date"  - Could you please help with onchange client script logic ?

Example :- Start should be before end date - End date should be after start date.

 

if user selected end date before start end automatically end should be clear-out with error message.

 

Thanks for the adavance.

 

Thanks,

Sai 

1 REPLY 1

Dhananjay Pawar
Kilo Sage

Hi,

Check this link, It will help you to develop the code.

https://www.servicenow.com/community/developer-articles/date-validations-client-scripts/ta-p/2298860...

 

Thanks,

Dhananjay.