Filter date field on Maintain Item

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:05 PM
I have been asked:
Can you disallow the calendar selection of the day if it is less than the required for 5 business days – it currently
allows you to select the date but then errors on submit.
Basically, I have a request form that has a date field. They do not want the user to select a date prior to 5 days from now. I created a catalog client script and I check to see if the date they select is before 5 days from now. If so, then it shows the error message and clears the date field. They want the date field to be pre-filtered with dates from 5 days from now on.
Is that possible?
Thank you, Charles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:20 PM
Nope.
I dont know jQuery but have a look at this: https://davidwalsh.name/jquery-datepicker-disable-days
Option to consider: If the user selects a date within next 5 days, don't clear the date but set it to the next available day.
But do you need to consider 5 days? or 5 business days? If later, then business calendar with holidays need to be considered in the calculation of the next available business day.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 06:47 AM
I hadn't thought of that, but not sure how I can inject JQuery into the calendar field. Maybe building a custom control or something like that.