Our powerful JS Calendar component


Post by luiscloud »

Hi, i have a calendar with my custom create modal form.

And i have this config:

export const calendarConfigBase = {
    mode: 'month',
    weekStartDay: 1,
    autoCreate: false,
    features: {
      eventEdit: null,
      eventTooltip: null,
      drag: null,
    },
    listeners: {
        eventClick(e) {
          console.log('eventClicked id: ', e?.eventRecord?.id)
          onShowEventModal()
        },
    },
 }

With this i can detect event click and show my custom create/edit event modal

Now i need that when user click on a calendar day, trigger event to get datetime and show my custom create event modal.

How can i do that?

Thanks


Post by mats »


Post by luiscloud »

Thanks! And if i want detect the "double click"? I have to implement my own double click function?


Post by Animal »

https://bryntum.com/docs/calendar/api/Calendar/view/Calendar#listening-to-events

Screenshot 2022-01-25 at 17.02.45.png
Screenshot 2022-01-25 at 17.02.45.png (36.22 KiB) Viewed 728 times

Post by Animal »

Rather than using scheduleDblClick, you can use eventAutoCreated

This is a private event right now and it’s the signal we use to show the default event editor. It’s private because I didn’t see anybody not wanting the default event editor. It’s fully themeable using SASS or CSS and you can add or remove any widgets.

But if you really want to override it. Use that event. I assume you have disabled the eventEdit feature, so you won’t have to make it a high prio listener which prevents the event.


Post by Animal »

We will make the eventAutoCreated event public.


Post by Animal »


Post by Animal »

Here's what the docs will look like next version:

Screenshot 2022-01-26 at 10.27.56.png
Screenshot 2022-01-26 at 10.27.56.png (76.95 KiB) Viewed 692 times

Post Reply