23:59 shows as 00:00

5 posts, 0 answers
  1. Alan
    Alan avatar
    107 posts
    Member since:
    Oct 2010

    Posted 05 Jul 2011 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Jul 2011 Link to this post

    Hello Daryl,

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

    Thanks,
    Shinu
  3. Alan
    Alan avatar
    107 posts
    Member since:
    Oct 2010

    Posted 05 Jul 2011 Link to this post

    Hi Shinu,

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

    Thanks,
    Daryl
  4. Alan
    Alan avatar
    107 posts
    Member since:
    Oct 2010

    Posted 07 Jul 2011 Link to this post

    Anyone?
  5. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 07 Jul 2011 Link to this post

    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!

Back to Top