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

[Solved] Hide / grey out days?

5 Answers 253 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 17 Jan 2008, 11:15 AM
Am evaluating the scheduler to see if it does what I need. Basically, I need to create a calendar for a clinic; users will book appointments for patients using the calendar. The scheduler looks great - ticks most of the boxes, but there are a couple of things I can't work out. Can someone tell me:
  • is it possible to grey out / disable from the view certain days? E.g, the clinic may be closed on Tuesdays and Thursdays, so I wouldn't want to allow users to enter appointments on those days.
  • is there any support for public holidays? e.g. it would be nice to be able to grey out / disable public holidays to prevent appointments being created when the the clinic would be closed.
Any help much appreciated,

Thanks,

Phil

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 17 Jan 2008, 01:32 PM
Hello Phil,

Thank you for your interest in RadScheduler.

You can restrict users from scheduling appointments for specific days of the week using the OnClientAppointmentInserting event. For example, the code below prevents appointment inserting for Thursdays:

<telerik:RadScheduler OnClientAppointmentInserting="OnClientInsertingHandler" ID="RadScheduler1" ...>              

<script type="text/javascript">             
            function OnClientInsertingHandler(sender, eventArgs)  
            {  
                var dateString = eventArgs.get_startTime()._toFormattedString()  
                var subSection = dateString.substring(3,0).toLowerCase();  
                 
                if(subSection == "thu")  
                {  
                  
                  alert("You cannot scheduler appointments on Thursday");  
                  eventArgs.set_cancel(true);  
                  
                }  
            }  
            </script> 

Unfortunately, there isn't a way to visually indicate for which days the user is not allowed to schedule appointments. However, this would be a nice feature to add to the control, so we will definitely consider it.

Should you have any other questions, please, feel free to contact us.


Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Phil
Top achievements
Rank 1
answered on 17 Jan 2008, 01:55 PM
Thanks for the reply - shame about the answer!

Do you know if it is possible to "easily" override the rendering to achieve this? I can imagine using such a technique in combination with the code snippet you suggested.

And what about public holidays?

Thanks,

Phil
0
Peter
Telerik team
answered on 18 Jan 2008, 11:38 AM
Hello Phil,

Unfortunately, there isn't an easy way to do this. The best we can do is to seriously consider implementing special days feature for RadScheduler. We are sorry about this limitation of the control for the inconvenience it has caused you.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Maurizio Piaggio
Top achievements
Rank 1
answered on 26 Jun 2008, 08:06 AM
Hello Telerik's,
I'm working on a scenario similar to Phil's one and I'm wondering if you've implemented someway for graying out days from scheduler.
I need to enable/disable days at runtime and not only fixed days (eg Thursday), and from the same page they should be able to open different agendas

Thanks in advance
Simone
0
Peter
Telerik team
answered on 26 Jun 2008, 01:56 PM
Hi Simone,

I am sending you a small sample page how to achieve this functionality. Please, review it and let us know how it goes.


Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Phil
Top achievements
Rank 1
Answers by
Peter
Telerik team
Phil
Top achievements
Rank 1
Maurizio Piaggio
Top achievements
Rank 1
Share this question
or