'How to remove/disable the monthly and yearly selection in repeating events in kendo react scheduler
I was wondering if it was possible to remove the monthly and yearly selections in the repeat section when editing events in the kendo react scheduler?
Here is a photo of the part to be removed/disabled highlighted in RED
This is the code:(Using react typescript)
import React from "react";
import { useState } from "react";
import { displayDate, dataInput } from "./data";
import {
Scheduler,
TimelineView,
DayView,
MonthView,
SchedulerDataChangeEvent,
WeekView,
} from "@progress/kendo-react-scheduler";
import { guid } from "@progress/kendo-react-common";
export default function ShowSched() {
const [data, setData] = useState(dataInput);
function handleChange({ created, updated, deleted }: SchedulerDataChangeEvent) {
setData(old => old
//Filter the deleted items
.filter((item) => deleted.find(current => current.id === item.id) === undefined)
//Find and replace the updated items
.map((item) => updated.find(current => current.id === item.id) || item)
//Add the newly created items and assign an `id`.
.concat(created.map((item) => Object.assign({}, item, { id: guid() }))))
}
return (
<Scheduler
defaultView="week"
data={data}
onDataChange={handleChange}
editable={{
add: true,
remove: true,
drag: true,
resize: true,
select: true,
edit: true
}}
defaultDate={displayDate}
>
<WeekView
workDayStart="05:00"
workDayEnd="23:00"
/>
</Scheduler>
)
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
