Our powerful JS Calendar component


Post by alexandru_tess »

Hello, i have a problem.
I use this configuration:

 this.calendarConfig = {
      features: {
        scheduleMenu: false,
        eventMenu: false,
        weekExpander: false,
        eventTooltip: {
          revealEventsInCluster: false,
          tooltip: {
            //@ts-ignore
            listeners: {
              beforeShow: () => false,
            },
          },
        },
      },
      listeners: {
        beforeDragResizeEnd: async returnedObject => {
          const result = await this.onDragResizeEnd(
            returnedObject.eventRecord,
            returnedObject.newEndDate,
            returnedObject.newStartDate,
            false,
          );
          return result;
        },
        beforeDragMoveEnd: async returnedObject => {
          const result = await this.onDragResizeEnd(
            returnedObject.eventRecord,
            returnedObject.newEndDate,
            returnedObject.newStartDate,
            true,
          );
          return result;
        },
      },
      items: {
        viewContainer: {
          layout: {
            animateCardChange: false,
          },
        },
      },
      modes: {
        list: false,
        month: {
          animateTimeShift: false,
          autoCreate: false,
          sixWeeks: false,
          showWeekColumn: true,
          overflowPopup: {
            listeners: {
              beforeShow: () => false,
            },
          },
        },
      },
      modeDefaults: {
        visibleStartTime: '06:00',
      },
      tbar: undefined,
    };

The problem is when i drag an event i receive this error :
RangeError: Maximum call stack size exceeded.
at RecurrenceConfirmationPopup.focus (calendar.module.js:40296:25).

After that, anywhere i click on the page, the beforeDragMoveEnd function keep calling.


Post by saki »

Could you post a runnable showcase? Or steps to modify one of our demos to trigger the error?


Post by alexandru_tess »

Ok, here is a video.
https://drive.google.com/file/d/1tTa7pvRkm6jOexOUUry0Slym1P7-HPW7/view?usp=sharing

Al you need to do is to create a recurring event. Move one occurrence and before choosing what event to modify, just click on another window, or open devtools, or any action on your browser, but don't click inside of the app.


Post by tasnim »

Hi,

Thank you very much for the video and the instructions about reproduction. We'll investigate it. Here is the ticket to track progress https://github.com/bryntum/support/issues/8795

Best regards,
Tasnim


Post by alexandru_tess »

And how can i prevent the modal to open?


Post by mats »

How do you mean? Did you upgrade to the new version?


Post by alexandru_tess »

Yes, but on beforeDragMoveEnd listener i open my personal pop-up and i do some personal business action then i return true. After that the confirmation pop-up it's opening just for recurring events and i don't want to show this pop-up.


Post by tasnim »

Hi,

You can put condition inside of that event and according to that condition you can show or prevent showing the popup.


Post by alexandru_tess »

Can you give me an example? What i do is something like this:

  beforeDragMoveEnd: async returnedObject => {
          const result = await this.onDragResizeEnd(
            returnedObject.eventRecord,
            returnedObject.newEndDate,
            returnedObject.newStartDate,
            true,
          );
          if (result === true) {
            return returnedObject.drag.finalize();
          } else {
            return false;
          }
        },

, the popup is no more showing but i have another problem. It's not working to drag another event.


Post by tasnim »

Hi,

Can't say why it's not working for you. Would it be possible to share a runnable test case so that we can debug it for you?
And could you describe what problems you are having and what are you trying to achieve?

Best regards,
Tasnim


Post Reply