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

23:59 shows as 00:00

4 Answers 83 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 05 Jul 2011, 11:08 AM
Hi,

I'm trying to make the max time that an event can be to 23:59. Even though I set:

DayStartTime="00:00:00" DayView-WorkDayStartTime="00:00:00" DayEndTime="23:59:59"
            DayView-WorkDayEndTime="23:59:59"
 or
DayStartTime="00:00:00" DayView-WorkDayStartTime="00:00:00" DayEndTime="23:59:00"
            DayView-WorkDayEndTime="23:59:00"

In AppointmentUpdate when I try to access EndTime (e.ModifiedAppointment.End.TimeOfDay) I get 12:00:00AM when it should be 23:59:59PM.

Is this a bug, or am I doing it wrong?

Thanks,
Daryl

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jul 2011, 01:15 PM
Hello Daryl,

In order to achieve this, try  setting ShowFullTime="true".

Thanks,
Shinu
0
Alan
Top achievements
Rank 1
answered on 05 Jul 2011, 01:23 PM
Hi Shinu,

Thank you for your help. I tried setting ShowFullTime="true". It still didn't work though. 

Thanks,
Daryl
0
Alan
Top achievements
Rank 1
answered on 07 Jul 2011, 09:08 AM
Anyone?
0
Plamen
Telerik team
answered on 07 Jul 2011, 04:14 PM
Hello Daryl,

Here is a simple solution of this problem that worked at my side in the code behind:

protected void RadScheduler1_AppointmentUpdate1(object sender, AppointmentUpdateEventArgs e)
   {
        String csname1 = "PopupScript";
       Type cstype = this.GetType();
       // Get a ClientScriptManager reference from the Page class.
       ClientScriptManager cs = Page.ClientScript;
       // Check to see if the startup script is already registered.
       if (e.ModifiedAppointment.End.TimeOfDay.TotalMinutes > 1439)
       {
           String cstext1 = "alert('The End time should not be later than 23:59!');";
           cs.RegisterStartupScript(cstype, csname1, cstext1, true);
           e.Cancel = true;
       }
    
   }

Hope this will help you.

Regards,
Plamen Zdravkov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Scheduler
Asked by
Alan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Alan
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or