Is there a way to exclude weekends as days in the Date Control for ARO's?
Advanced Date control options
Hello,
We are currently using Service Requests for new hires and a common struggle with them being entered in by HR is they are always trying to rush our Techs, due to them being able to make the weekends count as working business days. What id like to be able to do is make the weekends not count as days, we have a 4 day block in place, but having the weekends not count as days would allow for some more breathing room.
With today being the 5th they could have someone start on the 9th, a Saturday. With that said they tend to Submit these on a Thursday or Friday which would result in a New Hire starting on that Monday or Tuesday with hardly any time to get them created, which is why we have the 4 day block.
Has anyone come across this issue or have already created something to fix this?
Thank you,
Answers
Great question and something that I think is going to be an opportunity for some use of the portal's CustomSpace directory and possibly the datetime control as defined within the Request Offering itself. High level:
For starters, it's always helpful if you have ScriptLoader defined in your CustomSpace directory (e.g. custom.js).
With ScriptLoader in place, you can now call whatever JS you want. In this case, let's invoke some custom JS to modify date time controls on a specific Request Offering (update the path to your specific SO/RO guids). Just place the following line anywhere after ScriptLoader within Custom.js
But if you're looking closely, we'll also need to create a new folder in CustomSpace called "EmployeeLifecycle" and create a file called "DateTime.js". So let's do that.
In our "DateTime.js" file, we'll throw in the following code that disables Saturday and Sunday on the control.
And now navigating to this specific Request Offering you can see that the combination of what was defined in the Request Offering control + CustomSpace is live!
This probably is not perfect, but hopefully this gets you started in the right direction of being able to finely tune the date control to some select Request Offerings. I based this off the example provided over here - https://demos.telerik.com/kendo-ui/datepicker/disable-dates
Until now, I never thought about hiding weekends would be an option :D We have the same problem when users request Hardware.
I added your solution and it works perfectly. Many thanks for this amazing code :)