How to Greyed Out past dates for a Date type variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2019 12:57 PM
Hi All,
Can anyone please help to grey out past dates for Date type variable on Portal and Classic view.
I don't want to change my variable into widget. Is there any other way to do it?
I am doing validation on it but i need it to be greyed out.
Thanks in advance.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2019 06:21 AM
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2019 10:49 PM
Hi Dan,
Currently there is no attribute for the date variable to make the past dates read-only or greyed out. Though this a good enhancement that can be considered. In HTML for an input type="date" when we provide the min attribute to todays date or whichever date we want, the dates before the mentioned date will be greyed out.
For now i would suggest you to put a validation on that field that if someone selects a date which is in past it should give them a pop up or an alert saying "Past dates cannot be selected" and clear the field value which will again make it mandatory for user to fill.
Hope this helps.
Regards,
Omkar Mone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2019 06:20 AM
i did it. I was able to add error message but I am looking some other solution for that. I think there a possible way in variable field type UI MACRO. But I don't wanna create the widget now as there are so many field depending on this Date field. I don't want to change other scripts for this. So i was looking for a possible way.