Disable Past date in Date variable on Record Producer form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 07:07 AM
Hi,
I have a requirement to add Date field that should only allow user to select future dates, and we used client-side validation to fulfill the requirement.
I would like to know, if there is there any way to disable past date from the Date field, instead of writing client-side validation script.
Thanks in Advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 07:17 AM
Hi @Namita_Snow,
I would suggest to use the Catalog UI policy for data validations instead of Catalog Client scripts.
Condition:
Cab date AT OR BEFORE Today
Execute if true:
function onCondition() {
g_form.clearValue("date_time_variable");
g_form.showFieldMsg("date_time_variable", "Past date not allowed" , "error");
}
For reference:
If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers! 👍🏻
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 07:19 AM
Hi @Namita_Snow ,
Unfortunately there is no direct configuration for restricting past dates. But u can make use of UI policy where u can do it in such a way
Thanks,
Danish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 07:20 AM
Hi,
Like Sagar Pagar already mentioned, you can do the validation using a Catalog UI policy, no scripting required.
And also, no, there is no way to disable a past date in a date field (that I know of).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 07:35 AM
Hi @Sagar Pagar , @Danish Bhairag2 and @OlaN ,
Thank you all for your quick replies.
I'm currently using UI policy only. just mentioned it as client-side validation.
I wanted to check if it possible to disable date or not. Thanks for clarifying this!!