Premium support for our pure JavaScript UI components


Post by jnarowski »

Good afternoon

We've tried to make the property workingTime work in our timeline but none of the attempts have work. Based on the documentation it's not clear what is it expecting as values. No matter what we put in there, the working hours are always set from 8am to 5pm as a default behavior

  type: 'scheduler',
    features: {
      resourceTimeRanges: true,
    },
    workingTime: {
      fromHour: 6,
      toHour: 20,
    },

What we want to do is rendering (in the week view) the 7 days in different working hours (dynamically configurable). Could you provide us some example on how to achieve this specifying the data type please?

Thank you very much!

Attachments
Week view. 8am-5pm as default behavior
Week view. 8am-5pm as default behavior
Screen Shot 2023-06-08 at 6.22.07 PM.png (41.39 KiB) Viewed 541 times
Day view. 8am - 5pm as default behavior
Day view. 8am - 5pm as default behavior
Screen Shot 2023-06-08 at 6.21.41 PM.png (31.42 KiB) Viewed 541 times

Post by fabio.mazza »

Hello, could you please provide us whole your scheduler config, so we can better help you?
Are you using scheduler or schedulerpro?

If you are using schedulerpro I can suggest you to take a look on this example
https://bryntum.com/products/schedulerpro/examples/non-working-time/
otherwise look here

https://bryntum.com/products/scheduler/examples/workingtime/

I suspect that your hours-off rendering is done by resourceTimeRanges that are not aligned with you workingTime config.

Best regards,
Fabio


Post by jnarowski »

You're right I'm sorry for the confusion. Working as expected but just having some issues when we set the toHour with a value less than 14.

Error: Invalid time axis configuration or filter, please check your input data

From 14 onward it just renders perfect with no issue. Am I missing something here? could it be having issues with another feature? thanks!


Post by jnarowski »

Actually it seems to fail when I set a toHour earlier than the current hour. So right now anything before 3pm (in my case) doesn't work. Same error message


Post by mats »

Can you please provide full config for this? Works just fine here...

Which version are you using?

Attachments
Screenshot 2023-06-09 at 22.27.31.png
Screenshot 2023-06-09 at 22.27.31.png (392 KiB) Viewed 464 times

Post by jnarowski »

This is example where we're facing this issue:

While I'm writing this post, it's 2:31pm for me and this is how the Calendar looks like for the following configuration.

  workingTime: {
    fromHour: 7,
    toHour: 22,
  },

Working perfectly rendering each day until 10pm as configured

Screen Shot 2023-06-12 at 2.32.57 PM.png
Screen Shot 2023-06-12 at 2.32.57 PM.png (66.47 KiB) Viewed 420 times

When I change this config for this: (or any hour earlier than my current time)

  workingTime: {
    fromHour: 7,
    toHour: 14,
  },

This is what I get;

Screen Shot 2023-06-12 at 2.34.26 PM.png
Screen Shot 2023-06-12 at 2.34.26 PM.png (71.52 KiB) Viewed 420 times
Error: Invalid time axis configuration or filter, please check your input data

This configuration is in the file src/components/Calendar.vue:30

Thank you!

Attachments
bryntum-calendar-vite.zip
(57.06 KiB) Downloaded 18 times

Post by alex.l »

Hi,

I tested your demo with hours you provided and just works fine here.
Now local time is 11AM, so I tried 7:00 and later up to 15:00 and it just works with no errors. Could you please check and clarify steps to reproduce?

Thanks

All the best,
Alex


Post by jnarowski »

Hi alex.l

Thanks for taking a look to this one

I'm still able to reproduce this bug easily, just by changing the toHour value from this setup

  workingTime: {
    fromHour: 7,
    toHour: 13,
  },

I move it from 13 to 14 (being right now 1:36pm) and it switches to either works fine (when 14 is set) to that same error we put before when 13 is set. That's all we need to do to reproduce this error

Thanks!


Post by jnarowski »

I was also able to reproduce this immediately. Please use our repo, and make sure toHour is behind your local time.


Post by alex.l »

Hi, yes, now I see the problem. I was not able to reproduce this on vanilla demos, so that might be related to Vite/Vue. Here is the ticket https://github.com/bryntum/support/issues/6995
You can subscribe on ticket updates to be notified when it's done.

All the best,
Alex


Post Reply