How to restrict the 'Date' variable in a catalog item to only allow only the current month clickable

Rakesh_Damji
Tera Contributor

We have a request to limit our users from selecting a date in a catalog request item to the current month only. For example, today is March 8, 2024, we want to ONLY allow any day in the current month (March) to be selectable. We do not want users being able to select a past date in a previous month, or a future date in the next month.

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

Prohibiting date selection by removing dates before and after the current month is not doable without DOM manipulation, which is to be avoided.

But you can easily implement a UI policy and UI policy action that clears the value if the user selects a invalid date.

No code is required (or almost none depending on your needs).

 

See example below.

ui-policy-this-month-only.png

 

ui-policy-action-this-month-only.png

View solution in original post

10 REPLIES 10

Never Mind, the option for trends lets you select dates.