Page 1 of 1

[VUE 3] Day click event

Posted: Tue Jan 25, 2022 5:03 pm
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


Re: [VUE 3] Day click event

Posted: Tue Jan 25, 2022 5:15 pm
by mats

Re: [VUE 3] Day click event

Posted: Tue Jan 25, 2022 5:18 pm
by luiscloud

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


Re: [VUE 3] Day click event

Posted: Tue Jan 25, 2022 6:03 pm
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 747 times

Re: [VUE 3] Day click event

Posted: Wed Jan 26, 2022 7:31 am
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.


Re: [VUE 3] Day click event

Posted: Wed Jan 26, 2022 7:32 am
by Animal

We will make the eventAutoCreated event public.


Re: [VUE 3] Day click event

Posted: Wed Jan 26, 2022 9:54 am
by Animal

Re: [VUE 3] Day click event

Posted: Wed Jan 26, 2022 11:29 am
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 711 times