Our powerful JS Calendar component


Post by denis »

Hi Team Bryntum,

I am working with your calendar right now.

I have created a dayview, weekview and month view in the tbar as buttongroup. The viewDescription in the dayview just shows the date and year (April 23, 2023), the viewDescription in the monthview shows shows the month and year plus week number (March 2023 (Week 18)) and the year view just shows the Month and year (March 2023).

Problem:
When i open the page showing the calender and i switch from dayview to weekview to monthview the viewDescription stays the same till i click prevButton or nextButton on the tbar. I guess when switiching between views the individual views are not triggering a re-render and thats why the description stays the same until prev oder next button trigger re-render.

How can I solve this issue and update the viewDescription in the tbar as soon as i have changed the view ?

thanks and best in advance,
denis

Attachments
dayview with week number cause it did not re-render yet
dayview with week number cause it did not re-render yet
Screenshot_20230301_135129.png (23.89 KiB) Viewed 287 times
monthview showing week number before triggering re-render with next or prevButton
monthview showing week number before triggering re-render with next or prevButton
Screenshot_20230301_135104.png (22.29 KiB) Viewed 287 times
weekview showing week number
weekview showing week number
Screenshot_20230301_134944.png (24.58 KiB) Viewed 287 times

Post by denis »

i could not add a picture of the viewDescription when its re-rendered but after re-render same game - when switiching between the views viewDescription stays the same till re-render is triggered by next or prevButton...


Post by Animal »

I don't understand "I have created a dayview, weekview and month view in the tbar as buttongroup."

You do not create dayviews of monthviews. These are the "modes" which you configure in using the mode config.

"In the tbar"? You certainly would not put those views in a toolbar.

I cannot understand the issue you are having. When using the mode selector button group which is built in, the description is updated on view change.


Post by denis »

i try to explain again.

when i switch from dayview to weekview or monthview the viewDescription stays the same - normally dayview should show April 23, 2023 and weekview should show April 2023 (Week 18)...

the viewDescription only changes when i click next or prev button.

So actually everything is fine when i switch views and press next or prev button once, but when i switch the view again the viewDescription stays the same again till i press next or prev button again and so on....

hope that makes sense....

Attachments
before pressing next or prev button
before pressing next or prev button
Screenshot_20230301_135129.png (23.89 KiB) Viewed 277 times
after pressing next or prev button
after pressing next or prev button
Screenshot_20230301_135159.png (18.95 KiB) Viewed 277 times

Post by Animal »

This does not happen with a regular Calendar. We need to see some code so we can see what is wrong/


Post by Animal »

Below is the call sequence which leads to updating the description.

As you can see it's (logically) the show call of the new mode which leads to triggering the paint event which the Calendar has a handler for, syncUIWith ActiveView:

Screenshot 2023-03-01 at 15.21.16.png
Screenshot 2023-03-01 at 15.21.16.png (66.28 KiB) Viewed 274 times

Post by denis »

maybe it helps mentioning that the bug appeared after updating the bryntum from version 5.1.1. to 5.2.10 - before it just worked fine with the settings i have.

after the update the viewDescription for the weekview showed up like this: April 2023 (null 18) - so i added "Week" to the Object in locale file and it showed up properly

Is there a way to send the files (view, config, locale) via email or so as I am not sure i can post work related code in here...


Post by alex.l »

Hi denis,

You can zip an app and send it to support at bryntum.com. Please add a link to this topic in your email so we will see the background.

All the best,
Alex


Post Reply