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

Overnight Appointments in Month View

3 Answers 69 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Lucas
Top achievements
Rank 1
Veteran
Lucas asked on 22 Jul 2020, 06:04 PM

Hello,

 

I was wandering if it was possible to change the style of an appointment that starts on one day and ends the next day in a Month View. For exemple, a shift that begins at 22pm and ends at 6am. When I try to do it it just streches the appointment across both days, but I don't want that is there a way to change this?

 

There's a picture of what I would want to see.

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 27 Jul 2020, 09:55 AM

Hello Lucas,

Thank you for the shared picture. 

By default the RadScheduleView displays one visual element for each appointment in its source. With this in mind there isn't an out-of-the-box way to achieve the desired visualization. 

That said, you should be able to handle the scenario on the data level. What you can do is split appointments that are spanning multiple days and create two separate appointment objects.

I hope you find this information helpful.

Regards,
Vladimir Stoyanov
Progress Telerik

0
Lucas
Top achievements
Rank 1
Veteran
answered on 27 Jul 2020, 05:34 PM

Hi,

Thanks for the answer and yes it's really helpful!

With all my saved appointments it works, I just change each saved appointment into 2 different appointments, but what if I create a new appointment?

When I create a new appointment, it still creates a long appointment across multiple days. Where should I put my logic that divides appointments if I want to do it for all appointments old or new?

 

Thank you.

0
Vladimir Stoyanov
Telerik team
answered on 30 Jul 2020, 08:44 AM

Hello Lucas,

I am glad to hear that you found the previous suggestion helpful. 

With regards to dynamically updating appointments, you can explore the events that the RadScheduleView exposes. For example, you can use the AppointmentCreated event and replace the new appointment in the AppointmentSource with 2 separate ones. Do give this a try and let me know how it goes. 

Regards,
Vladimir Stoyanov
Progress Telerik

Tags
ScheduleView
Asked by
Lucas
Top achievements
Rank 1
Veteran
Answers by
Vladimir Stoyanov
Telerik team
Lucas
Top achievements
Rank 1
Veteran
Share this question
or