Page 1 of 1

[INFO REQ] Copy-past event in Scheduler without adding " - copy" to event name.

Posted: Tue Feb 07, 2023 11:50 am
by lxxrxns

Hi there,

I would like to use the EventCopyPaste function in my Scheduler:

https://www.bryntum.com/products/calendar/docs/api/Scheduler/feature/EventCopyPaste

However, copying an event named "Event" creates a new event with the name "Event - copy" (I believe in version 5 it's "Event - 1", "Event - 2" and so on.

Is there a way to have the new event have the exact same name as the copied event (without - copy or - 1, -2, etc)?

Kind regards,

Laurens


Re: [INFO REQ] Copy-past event in Scheduler without adding " - copy" to event name.

Posted: Tue Feb 07, 2023 12:15 pm
by tasnim

Hello lxxrxns

In here EventCopyPaste
It says

You can configure how a newly pasted record is named using generateNewName.

So you could use the generateNewName like this

    features : {
        eventCopyPaste : {
            generateNewName(eventRecord) {
                return eventRecord.name;
            }
        }
    }

Re: [INFO REQ] Copy-past event in Scheduler without adding " - copy" to event name.

Posted: Tue Feb 07, 2023 9:40 pm
by lxxrxns

Awesome! I guess I overlooked this :') Will try this first thing tomorrow, thank you!