Our powerful JS Calendar component


Post by skamath »

I have observed that the dateRangeRequested listener is being triggered when the calendar instance is zoomed or resized, but this behavior occurs specifically in the "month" view. In contrast, the listener behaves as expected in the "agenda" and "week" views, where such interactions do not cause the event to fire.

Please help me with this.

Best regards,
Shlok Kamath


Post by tasnim »

For me, it seems to be working fine. Could you please share a video of reproduction?

Best regards,
Tasnim

How to ask for help? Please read our Support Policy


Post by Animal »

On zoom, a MonthView necessarily has to refresh. Its count of visible event rows per cell may change.

Obviously a refresh pulls its set of events from the store. This event is just the store reporting that some code has asked it for a block of events. It will fire a lot. It's just the store being queried by a view which needs its data.


Post by skamath »

So how do I prevent it from happening. I want it to fire only when we change active view or date range. I don't want it to fire when we resize the calendar.



Post by skamath »

Thank you. It worked.


Post by skamath »

I want a listener that behaves exactly like dateRangeRequested, except it should not be triggered when the calendar is resized — when the number of cells per row changes. In all other cases, it should function the same as dateRangeRequested. How can I achieve this?


Post by Animal »

I don't understand what your requirement is.

The dateRangeRequested actually means that the UI has requested a block of events from the store. That is a lifecycle point at which apps may want to intervene and mutate the event load that the UI sees.

What is your application requirement? Do you want to perform application code on https://bryntum.com/products/calendar/docs/api/Calendar/view/Calendar#event-dateRangeChange ?


Post by skamath »

No,

I want a listener (or a combination of listeners) that replicates the behavior of dateRangeRequested, but without being triggered when the calendar is resized.

In other words, I need a mechanism that fires in all the following cases:

  • When the user navigates to a different date (e.g., using next/prev buttons)

    • When the user switches the active view (e.g., from month to week)

      • When an event is created, edited, or deleted, etc, etc.

But it should not fire when the calendar is simply resized (zoom in or zoom out).

Essentially, I want to capture all situations in which dateRangeRequested is triggered, except for calendar resizing.


Post by Animal »


Post Reply