Page 1 of 1

[VUE 3] Create new event by one click on calendar

Posted: Mon Sep 19, 2022 7:14 pm
by gustavo.rosendo

Hi,

Is there a way to trigger the event edit modal to create a new event with only one click on the calendar?

I've tried with:

triggerEvent: 'eventclick'

but it works only for editing an existing event, while to create a new one I still have to double click.

What I actually want is the opposite (something similar to Google calendar) : double click to edit an existing event and single-click on a blank spot in the calendar to create a new event.

Thanks and best regards,
Gustavo


Re: [VUE 3] Create new event by one click on calendar

Posted: Mon Sep 19, 2022 8:08 pm
by marcio

Hello Gustavo,

To work as you described (create an event on a single-click on a blank spot and edit on a double-click), you need to use the following configuration

    autoCreate : {
        gesture : 'click'
    },
    features : {
        eventEdit : {
            triggerEvent : 'eventdblclick'
        }
    }

Documentation for more customization is available here https://www.bryntum.com/docs/calendar/api/Calendar/view/Calendar#config-autoCreate


Re: [VUE 3] Create new event by one click on calendar

Posted: Mon Sep 19, 2022 9:25 pm
by gustavo.rosendo

Hi Marcio,

Thanks a lot for your reply and the reference to the documentation!
It worked for me.

Best regards,
Gustavo