This is a migrated thread and some comments may be shown as answers.

Creating Appointments in RadScheduler MonthView

1 Answer 68 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 17 Aug 2012, 12:48 PM
I'm using RadScheduler (2012.2.724.40) set to MonthView to display a series of Appointments. In our app, Appointments are actually scheduled events (sent to Quartz Scheduler) requiring a precise start time but no end time, so we set the duration for all of them to 30 minutes just for display purposes. I'd like to keep the MonthView active, as our app has events spread out over the course of a month or more within a given context.

However, when adding an Appointment from MonthView, the StartTime defaults to 12:00 AM on the day of the appointment (an all-day appt) and does not change despite unchecking All Day and setting StartTime in the advanced form. What is the best way to work around this behavior?

1 Answer, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 17 Aug 2012, 01:32 PM
I just figured it out, posting the solution in case it helps anyone.

I added an event handler for AppointmentCommand, then manually set Appointment.Start to the time selected in the form:

protected void EmailScheduler_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
{
    if (e.CommandName == "Insert")
    {
        RadTimePicker startTime = e.Container.FindControl("StartTime") as RadTimePicker;
        e.Container.Appointment.Start = startTime.SelectedDate.Value;
    }
}
Tags
Scheduler
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Share this question
or