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

Default duration of an appointment is 1440min(24hours) in month view definition! Why ?

2 Answers 33 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Hiwa
Top achievements
Rank 2
Hiwa asked on 03 Jun 2013, 11:06 PM
Hello ,
When scheduling appointments, the length defaults to 440min(24hours) in month view definition
How can I change the duration value?
Thanks in advance
hiwa

2 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 06 Jun 2013, 10:54 AM
Hello Hiwa,

In order to change the default hours in EditAppointmentDialog I would suggest that you use the AppointmentCreating event which is fired only when creating new Appointment. You should check the type of the ActiveViewDefinition in order to change it only in MonthViewDefinition.

 Please see the code snippet below:

private void radScheduleView_AppointmentCreating(object sender, AppointmentCreatingEventArgs e)
        {
            if ((sender as RadScheduleView).ActiveViewDefinition is MonthViewDefinition)
            {
                var app = e.Appointment as Appointment;
                app.End = app.Start.AddHours(30);
            }
        }

Hope this helps.

Regards,
Kalin
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Hiwa
Top achievements
Rank 2
answered on 06 Jun 2013, 04:11 PM
Hi Kalin,
Thank you so much for  your help.
It works.
hiwa
Tags
ScheduleView
Asked by
Hiwa
Top achievements
Rank 2
Answers by
Kalin
Telerik team
Hiwa
Top achievements
Rank 2
Share this question
or