Users should not be able to enter a date that is more than one year in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2024 12:15 AM
Hi,
I need to restrict users from entering a date more than one year in advance. If they do, an error message should be displayed, and they should not be able to save the form. I've tried creating an on-submit client script, but it's not working. Can anyone suggest a solution?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2024 05:26 AM - edited 05-31-2024 05:28 AM
Simply create UI policy, no need of so much scripting. I have created a UI policy on change request table on planned_end_date field for you reference. give condition as below:
I have given relative after 365 days from now in condition. here in condition instead of 365 days, you can give after 1 years from now and it will be more accurate as it will consider the leap year as well.
Please mark my answer as helpful if it has helped you 🙂