Discuss anything related to web development but no technical support questions


Post 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


Post 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;
            }
        }
    }

Post by lxxrxns »

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


Post Reply