Our powerful JS Calendar component


Post 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


Post by tasnim »

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

Good Luck :),
Tasnim

Best of luck,
Tasnim


Post 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


Post by tasnim »

Yes. Sure.

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

Best of luck,
Tasnim


Post 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 230 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 230 times

Does this sound suitable?


Post 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!


Post by Animal »

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


Post Reply