Our powerful JS Calendar component


Post by longevo-florian »

Hi,

we have been trying to set up the Bryntum Calendar with our specific use cases using the trial version and I have stumbled upon a problem.

The configuration for the starting day of the week (WeekStartDay) does not seem to be working as expected.

I tried to configure it using the Angular component in the following way:

calender_component_setup.png
calender_component_setup.png (100.84 KiB) Viewed 806 times

Now, when I first load the calendar, it seems to be working fine and the week starts on monday (day 1) as expected:

calendar_initial_load.png
calendar_initial_load.png (341.3 KiB) Viewed 806 times

However, when I switch the currently displayed week to the week before using either the button in the top bar or the datepicker in the sidebar, the view changes and starts the week on sunday again. This then stays like described until the next reload.

I have illustrated the problem in the below screenshot, for better understanding.

week_start_shift_after_click.png
week_start_shift_after_click.png (257.32 KiB) Viewed 806 times

Please let me know if I can do anything to get rid of this unexpected behavior.


Post by saki »

Would you please try to use the method described here: viewtopic.php?p=94771#p94771 and let us know the results?


Post by longevo-florian »

Hi,

I tried both of the methods described in the above post, however, everytime I try to either access the DateHelper Object or the LocaleManager Object after importing it, I get the following error:

Screenshot 2021-10-25 at 15.58.30.png
Screenshot 2021-10-25 at 15.58.30.png (166.22 KiB) Viewed 791 times

This happens either way, no matter if i try to set a custom defined locale or just set the DateHelpers property directly.

Could you help me and tell me where this bug might come from?


Post by mats »

Looks like you have mixed up the imports a bit. Could you please attach a simple test case showing your exact setup so we can dig into and see what's wrong?


Post by saki »

This indicates that you have tried to import from a different bundle – error message can be trusted in this case. For example:

import { DateHelper } from '@bryntum/calendar';

when you use wrappers will inevitably result in the above error because wrappers use:

import { xxxxx } from '@bryntum/calendar/calendar.lite.umd.js';

so you also have to use:

import { DateHelper } from '@bryntum/calendar/calendar.lite.umd.js';

Post by longevo-florian »

Thanks, I got it working by importing the umd Bundles!


Post by longevo-florian »

Hi,

after implementing the fix you presented above, it has been working locally on my development machine. However, when we tried to build our Angular project using GitHub Actions, the following Error message showed up.

Screenshot 2021-11-07 at 23.02.16.png
Screenshot 2021-11-07 at 23.02.16.png (307.72 KiB) Viewed 736 times

The weird thing is that this error happens during build time, not at the install stage. Also, as I said, when trying the same build command locally it works just fine.


Post by saki »

Could it be that it is caused by missing credentials? Wrong .npmrc content or location?


Post Reply