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

How to make an appointment an "all day appointment"?

6 Answers 239 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gint
Top achievements
Rank 1
Gint asked on 22 Sep 2011, 02:05 PM
Hello Community and telerik,

What properties do I have to set to get an "all day appointment"?

I want multiple appointments spanning the same time (00:00-24:00) to show up at the top of the day-view, in week-view and in month-view.

Thanks,
Gint

6 Answers, 1 is accepted

Sort by
0
Dan Lehmann
Top achievements
Rank 1
answered on 22 Sep 2011, 09:30 PM
In the advanced form there is a checkbox for All Day. The way it saves to the database for an all day appt for September 21, 2011 is for the start = 2011-09-21 00:00:00.000 and the end = 2011-09-22 00:00:00.000.

Dan
0
Ivana
Telerik team
answered on 26 Sep 2011, 04:03 PM
Hi J├╝rgen,

To set the "all day" row to be visible at the top of all the appointments for the day, the ShowAllDayRow property of the RadScheduler should be set to "true" as it is by default.

Here is an example:
<telerik:RadScheduler ID="RadScheduler1" runat="server" ShowAllDayRow="true" />...

As Dan suggested, the all day appointments are made using the "All Day" check box in the advanced form of the RadScheduler.

If you want to set the appointment's start time and end time properties from code-behind so the appointment
would last a whole day, you could use the code bellow:
C#:
Appointment app = new Appointment();
app.Subject = "My appointment";
DateTime startDate = DateTime.Now;
DateTime startTime = startDate.AddHours(-startDate.Hour);
startTime = startTime.AddMinutes(-startDate.Minute);
startTime = startTime.AddSeconds(-startDate.Second);
startDate = startTime.AddMilliseconds(-startDate.Millisecond);
app.Start = startTime;
 
DateTime endDate = DateTime.Now;
DateTime endTime = endDate.AddHours(24-endDate.Hour);
endTime = endTime.AddMinutes(-endDate.Minute);
endTime = endTime.AddSeconds(-endDate.Second);
endTime = endTime.AddMilliseconds(-endDate.Millisecond);
app.End = endTime;
 
RadScheduler1.InsertAppointment(app);

Hope this helps.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Allen
Top achievements
Rank 1
answered on 12 Sep 2012, 03:39 PM
In my case, I need to use the format  2011-09-21 00:00:00.000 and the end = 2011-09-22 00:00:00.000.
If I use the format  2011-09-21 00:00:00.000 and the end = 2011-09-21 23:59:59.000, I will run into an issue when I connect to another system (software) we are using.

Please refer to the png.  I have  time range indicators on the AllDay row, so I can't disable the AllDay Row unless I can add an additional row for the time range indicators.thanks
Is there an easy way to show the Allday appointmet in the time slot (cover the entire day) without using 23:59:59.000 format?
Should I disable the AllDay row and add an additional row for the time range indicators?  if yes, how?


0
Ivana
Telerik team
answered on 17 Sep 2012, 10:11 AM
Hi Allen,

Setting time range into the column headers in week/multiday View of RadScheduler is not a functionality that is supported out-of-the-box.

As for how RadScheduler behaves when the 'All-day row" is enabled, please take a look at the following online demo (under the "Day, Week, and Multiday Views" section): http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ashok
Top achievements
Rank 1
answered on 10 Oct 2013, 11:10 PM
Hi,

Is there a way in which I can keep the all day appointment for a fixed time i.e the working time.

I have a time limit of 8 AM to 7.30 Pm and I want to have all day appointment only for this time. What modifications should I do?
0
Plamen
Telerik team
answered on 14 Oct 2013, 10:11 AM
Hi,

 
RadScheduler can only work with 24 hours All day appointments and unfortunately the desired functionality is not supported.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Gint
Top achievements
Rank 1
Answers by
Dan Lehmann
Top achievements
Rank 1
Ivana
Telerik team
Allen
Top achievements
Rank 1
Ashok
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or