The Date Pickers on scheduler pop up - disable typing?

4 posts, 0 answers
  1. Scott Huggins
    Scott Huggins avatar
    2 posts
    Member since:
    Aug 2008

    Posted 20 Oct 2010 Link to this post

    Hi!

    When I dbl-click on date and the modal pop up occurs, can I set a property that won't allow the user to type in the "Start time" and "End Time" values?   ie: I want them to click the combo box control to choose the date and time.  Right now, users tend to type in values (bad values) that cause issues.

    Thanks!!

    Scott
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 27 Oct 2010 Link to this post

    Hi Scott Huggins,

    Please accept my apologies for the late reply.

    Could you please be more specific on the reason why you need to disable the input of the date pickers and time pickers?  When the user types incorrect value in the input field - validators catch it and appropriate message appears. Please take a look at the picture below from the "First Look" demo:



    Regards,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Scott Huggins
    Scott Huggins avatar
    2 posts
    Member since:
    Aug 2008

    Posted 27 Oct 2010 Link to this post

    Hi Veronica,

    Thanks for the reply.  You are correct, it will validate if the dates are wrong, but specifically, we need to not allow them to type in the time (example: 8:15am).  The drop down default is ever thirty minutes (8:00, 8:30, 9:00, etc).  However, some users were typing things in like "8:14".  We just want to "force" them to choose an item in the combo box and not type in a value for the start/end time.

    Is this even possible?

    Thanks!
    Scott
  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 03 Nov 2010 Link to this post

    Hello Scott Huggins,

    Please accept my apologies for the late reply.

    I understand why you need this. Here's the code to disable the dateinputs of the TimePickers:

    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
       {
           if ((e.Container.Mode == SchedulerFormMode.AdvancedInsert)||(e.Container.Mode == SchedulerFormMode.AdvancedEdit))
           {
               RadTimePicker startTime = e.Container.FindControl("StartTime") as RadTimePicker;
               startTime.DateInput.Enabled = false;
               RadTimePicker endTime = e.Container.FindControl("EndTime") as RadTimePicker;
               endTime.DateInput.Enabled = false;
           }
       }

    Unfortunately while making an example to show you how to disable the inputs I found a bug in the Scheduler. There is a javascript which prevents the disabling of the TimePickers. It was fixed and  the fix will enter in the upcomming Q3 Release on 8-th November.

    Regards,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top