We are listening for the beforeTaskEdit event call in order to show our custom popup. We display the startDate and the endDate using event.taskRecord.data.startDate and event.taskRecord.data.endDate. But this I believe is set to "day" as the window is always 24hours. Is there a way to set this to "hour" so that the window is 1 hour?
But this I believe is set to "day" as the window is always 24hours. Is there a way to set this to "hour" so that the window is 1 hour?
Sorry, I don't understand properly what you want to achieve. Could you please show you're code and explain a bit more?
We display the startDate and the endDate using event.taskRecord.data.startDate and event.taskRecord.data.endDate
event.taskRecord.data.startDate and event.taskRecord.data.endDate is not going to give you the updated result. You should be using event.taskRecord.startDate and event.taskRecord.endDate
Here startDate and endDate are for example 01/26/2023 - 10:00 AM and 01/27/2023 10:00AM. (A 24 hour window).
We would like this window to be a 1 hour window(01/26/2023 - 10:00AM to 01/26/2023 - 11:00AM). That is what I meant that the durationUnit might be 1 day.