How to set time limit for a SharePoint Calendar?

Copper Contributor

Hi, I have created an event calendar and I want if a user creates a event he/she have option to choose event start and end date with time. This feature is already OOTT but I want to set that end time won't exceed 4 hours from start time.

 

For eg. If start time is 7th feb 2021 10:00AM selected and the end time is 7th feb 2021 03:00 PM selected then it will show that user an error "End time shouldn't exceed 4 hours from Start Time."

Is there any JavaScript code available to help solving this issue or any List Validation formula?? Please help.

0 Replies