We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to restrict past date selection in due date field in problem task

Gopal14
Tera Contributor

Hi Team,

 

I want to restrict past date selection in due date field in problem task and Change task tables.

 

I have tried directly in UI Policy, it is working but in form it is showing error, if selected date has passed past date.

 

Apart from that how can i do this

16 REPLIES 16

@Gopal14 

so you don't want users to select today? Only tomorrow should be allowed?

what if current time is 12.05pm and if they select same date today but time as 12.10pm?

Is that allowed?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I want to select today  then it needs to accept,

if I select past days then it should show error message.

 

 

Gopal14
Tera Contributor

Example: 

 

In Due date I have selected date as 04/02/2026, it is accepted and it worked fine.

 

If I checks the same record tomorrow, due date value is showing as empty, because we are selecting clear value.

 

I don't want to clear the value

 

@Gopal14 

why not to clear if it's invalid?

If you don't want to clear then you can show error message near field

Is that not stopping user from saving an invalid date?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

No it is not stopping, user is able to save that record after entering past date

 

Gopal14_0-1770191714656.png

 

 

Gopal14_1-1770191744748.png

 

 

below is example, I have add date as 1/2/2026, it show's error message, but it saves the record.  below is the screenshot

 

Gopal14_2-1770191908362.png