start date should be today + 2 business days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 08:51 PM
Posting this again as I could not get it working:
Hi
Can someone please help me with catalog client script (on change) and script include
I have a date variable in the new hire form.
The requirement is users should only be allowed to select the "start date" as current date + 2 business days (exclude sat-sun).
Example: If I'm filling the form today , (Oct 11) the start date should be Oct 14 or further. User should not be be able to select an ealier date and should give an error " Invalid date"
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 11:01 AM - edited 10-16-2023 11:06 AM
Thank you. I've implemented it and will test it on Thursday.
It allows me to select dates past 48 hours, which is great, but I need to test the weekend thing.
One more help please,
how do get var message (screenshot below) than a popup?
pop-up doesnt seem to work well in the service portal. (I tried it in the script you provided and didnt work).
Thanks Again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 07:50 PM
@Thomas99 you can use showFieldMsg() to display the error at field. Change the if block to the one like below.
if (answer == 'true') {
g_form.setValue('lpar_refreshed', '');
g_form.showFieldMsg("lpar_refreshed", "Please select atleast 48hrs or more from now", "error");
}
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 08:12 PM
did not work 😞
Allows me to select any date now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 06:28 AM
Can you please review my code above? The change you recommended did not wort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2023 10:21 AM
did not work
Allows me to select any date now.
Can you please review my code?