Skip to content

Commit 9b0ae22

Browse files
chore(scheduler): revert edit handler args
1 parent 15ec330 commit 9b0ae22

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/scheduler/edit-appointments.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The example below shows the signature of the event handlers so you can copy the
127127
void EditHandler(SchedulerEditEventArgs args)
128128
{
129129
SchedulerAppointment item = args.Item as SchedulerAppointment;
130-
if (!args.IsNew) // an edit operation, otherwise - an insert operation
130+
if (item != null) // an edit operation, otherwise - an insert operation
131131
{
132132
// you can prevent opening an item for editing based on a condition
133133
if (item.Title.Contains("vet", StringComparison.InvariantCultureIgnoreCase))
@@ -137,9 +137,7 @@ The example below shows the signature of the event handlers so you can copy the
137137
}
138138
else
139139
{
140-
// get the time range of the slot the user clicked to add an appointment
141-
DateTime slotStart = item.Start;
142-
DateTime slotEnd = item.End;
140+
// new appointment
143141
}
144142
}
145143

0 commit comments

Comments
 (0)