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

[Solved] Disabled dates

1 Answer 154 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Support Riskminder
Top achievements
Rank 1
Support Riskminder asked on 26 Sep 2007, 09:47 AM
Hi all

Is it possible to create a set of disabled days, where it is not possible to create an appointment ?

Or du you plan for a "Disable days" feature, where the user is able to disable all holidays etc. ?

Best regards
Bo

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 28 Sep 2007, 08:37 AM
Hi Bo Pedersen,

We do not plan to implement integrated support for disabled dates, but you can implement such functionality with events. You can do this either on the client, by handling the AppointmentInserting event or on the server, by handling the FormCreating event. Both events can be canceled, so you can decide when to allow the action.

Here is a JavaScript example:
function AppointmentInserting(sender, eventArgs) 
    var date = eventArgs.get_StartTime(); 
     
    if (DateIsDisabled(date)) 
    { 
        e.set_cancel(true); 
    } 

Or on the server-side:

protected void RadScheduler1_FormCreating(object sender, Telerik.Web.UI.SchedulerFormCreatingEventArgs e) 
    if (e.Mode == SchedulerFormMode.Insert && DateIsDisabled(e.Time)) 
    { 
        e.Cancel = true
    } 



Greetings,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Support Riskminder
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or