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

The Date Pickers on scheduler pop up - disable typing?

3 Answers 58 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Scott Huggins
Top achievements
Rank 1
Scott Huggins asked on 20 Oct 2010, 08:41 PM
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

3 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 27 Oct 2010, 08:54 AM
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
0
Scott Huggins
Top achievements
Rank 1
answered on 27 Oct 2010, 03:54 PM
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
0
Veronica
Telerik team
answered on 03 Nov 2010, 10:40 AM
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
Tags
Scheduler
Asked by
Scott Huggins
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Scott Huggins
Top achievements
Rank 1
Share this question
or