In my project I have the Kendo Scheduler widget, I am trying to add an manual 'Add event' button similar to this that has been done in Jquery. https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/editing/add-event-programatically
The methods described in the Angular docs for the Scheduler show methods that are attached to the ($event) handlers specific to the Scheduler i.e `(slotDblClick)="onSlotDblClick($event)"`.
In terms of adding events it mentions to call the addEvent() method.
So I have tried something like:
public addEventHandler({ sender, start, end, isAllDay }: EventClickEvent): void {
this.closeEditor(sender);
this.formGroup = this.formBuilder.group({
'Start': [start, Validators.required],
'End': [end, Validators.required],
'StartTimezone': new FormControl(),
'EndTimezone': new FormControl(),
'IsAllDay': isAllDay,
'Title': new FormControl(''),
'Description': new FormControl(''),
'RecurrenceRule': new FormControl(),
'RecurrenceID': new FormControl()
});
sender.addEvent(this.formGroup);
}
This does not work as the sender arguments are specific to the methods in Kendo Scheduler.
Any idea's
The docs are at:
https://www.telerik.com/kendo-angular-ui/components/scheduler/editing/editing-reactive-forms/#toc-adding-new-events
The methods described in the Angular docs for the Scheduler show methods that are attached to the ($event) handlers specific to the Scheduler i.e `(slotDblClick)="onSlotDblClick($event)"`.
In terms of adding events it mentions to call the addEvent() method.
So I have tried something like:
public addEventHandler({ sender, start, end, isAllDay }: EventClickEvent): void {
this.closeEditor(sender);
this.formGroup = this.formBuilder.group({
'Start': [start, Validators.required],
'End': [end, Validators.required],
'StartTimezone': new FormControl(),
'EndTimezone': new FormControl(),
'IsAllDay': isAllDay,
'Title': new FormControl(''),
'Description': new FormControl(''),
'RecurrenceRule': new FormControl(),
'RecurrenceID': new FormControl()
});
sender.addEvent(this.formGroup);
}
This does not work as the sender arguments are specific to the methods in Kendo Scheduler.
Any idea's
The docs are at:
https://www.telerik.com/kendo-angular-ui/components/scheduler/editing/editing-reactive-forms/#toc-adding-new-events