- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 04:46 AM
Hi Experts,
I have one requirement to highlight the start date field with red color if the date is in past if we compare with the current date when we are filling the form. Please give your inputs on this.
Best Regards,
Prachi
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 05:13 AM
Hi Prachi,
Use the code -
javascript: GlideDateTime.subtract(new GlideDateTime(current.avventer_svar_innen), new GlideDateTime()).getDayPart() > 0;
Refer the community article - https://community.servicenow.com/community?id=community_question&sys_id=4e8a6f36db81041023f4a345ca961997
Regards,
Deepankar Mathur

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 05:13 AM
Hi Prachi,
Use the code -
javascript: GlideDateTime.subtract(new GlideDateTime(current.avventer_svar_innen), new GlideDateTime()).getDayPart() > 0;
Refer the community article - https://community.servicenow.com/community?id=community_question&sys_id=4e8a6f36db81041023f4a345ca961997
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 05:16 AM
It's working now. Thank you