Our pure JavaScript Scheduler component
Hello,
Is it possible to customize the default name "new event" when using
? We would like to change it to a custom name, or value of our choice.
please provide the steps to follow, and any assistance with the example code would be appreciated.
Hi,
I'm inquiring about the name within the event, not the name featured in the edit event popup.
I'm trying to update it as below examples:
schedulerConfig.on('dragCreateEnd', ({ source, eventRecord, resourceRecord, event, eventElement }) => {
createdPrice = "$300
eventRecord.originalData.name = createdPrice;
})
schedulerConfig.on('dragCreateStart', ({ eventRecord, resourceRecord }) => {
createdPrice = "$300
eventRecord.originalData.name = createdPrice;
})
-
Attachments
-
- simplescreenrecorder-2024-03-10_21.15.42.mp4
- (541.82 KiB) Downloaded 8 times
That's exactly what you get if you follow the steps above. Example:
new Scheduler({
appendTo : 'container',
startDate : new Date(2023, 0, 29),
endDate : new Date(2023, 1, 12),
viewPreset : 'weekAndDayLetter',
rowHeight : 100,
tickSize : 75,
crudManager : {
autoLoad : true,
eventStore : {
// Custom fields used on events in the demo
fields : [
{ name : 'name', defaultValue : 'Foo' }
]
},