Calculating a default value for a date variable

arwalker
Kilo Contributor

I have a date variable field labeled 'start date' and I have another date field labeled 'expiration date'. What I am trying to do in a client script is default the expiration date 90 days from the start date. Also prevent end users from changing the expiration date beyond the 90 days. However they can change it to an earlier time. So (1) first thing is how to default the expiration date to 90 days from the start date and (2) prevent users from changing the expiration beyond the 90 days allowed.

7 REPLIES 7

Is this Works on the service portal (Istanbul) also?? As we are facing an Issue when the date Format is changed to dd-mm-yyyy this shows a wrong date


This last one worked for me. Thanks.