Page 1 of 1

[ANGULAR] Custom non-working hours

Posted: Mon Sep 05, 2022 4:19 am
by nick

Hey,

We are just wondering if it's possible to setup a different set of "core hours" for each day of the week?

We currently have the following config

  
week: { ... weekStartDay: 1, hourHeight: 70, dayStartTime: 6, dayEndTime: 18, coreHours: { start: "10:30", end: "16:30", overlayDay: true }, fitHours: { minHeight: 18 } }

This sets the hours at the week level - is it possible to pass in a custom object thats lets us set different start and end times for each day?

Thanks


Re: [ANGULAR] Custom non-working hours

Posted: Mon Sep 05, 2022 7:10 am
by tasnim

Unfortunately, not possible. You can always add your own elements yourself.

Good Luck :),
Tasnim


Re: [ANGULAR] Custom non-working hours

Posted: Wed Jan 25, 2023 6:59 am
by nick
tasnim wrote: Mon Sep 05, 2022 7:10 am

Unfortunately, not possible. You can always add your own elements yourself.

Good Luck :),
Tasnim

Hey Tasnim,

Thanks for the response. Just wondering if the ability to do this is on the roadmap for the calendar control?

In our case, some employees will be working at different hours on different days, and it'd be great to be able to gray out the times when they're not working.

Thanks


Re: [ANGULAR] Custom non-working hours

Posted: Wed Jan 25, 2023 10:54 am
by tasnim

Yes. Sure.

I've opened a Feature request for that. Here it is https://github.com/bryntum/support/issues/6043


Re: [ANGULAR] Custom non-working hours

Posted: Fri Jan 27, 2023 5:54 pm
by Animal

So what we propose is additional formats for coreHours. In addition to being able to be a simple object with start and end properties, it could also be an array, or for full flexibility a callback provided by the app:

Screenshot 2023-01-27 at 16.48.57.png
Screenshot 2023-01-27 at 16.48.57.png (341.97 KiB) Viewed 546 times

So you might get an effect like this:

Screenshot 2023-01-27 at 16.51.51.png
Screenshot 2023-01-27 at 16.51.51.png (234.59 KiB) Viewed 546 times

Does this sound suitable?


Re: [ANGULAR] Custom non-working hours

Posted: Mon Jan 30, 2023 5:55 am
by nick

Hi Animal,

Thanks for your response. Screenshot looks great, but just wondering if we'd be able to add support for making it a bit more granular? For example, if we wanted to set hours from Monday from 8am - 10am and then 3pm - 5pm?

Thanks!


Re: [ANGULAR] Custom non-working hours

Posted: Mon Jan 30, 2023 9:35 am
by Animal

So multiple sets of core hours. Well that will take longer. We could do it.