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

TimeSlot Attributes

2 Answers 77 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Richard Brown
Top achievements
Rank 2
Richard Brown asked on 20 Jul 2010, 01:52 PM
I have an application that limits concurrent and/or overlapping appointments and appointments on special days.  I set the TimeSlot.CssClass to "Unavailable" when the limit is reached ot is on a special day.  That class sets the TimeSlot bacground image to a particular color and word "Unavailable".  The problem presents when there are appointments in the TimeSlot which obscures the background and the word "Unavailable".

I display a RadDock for the Form input when new appointments are allowed and just cancel when not.  I supposeI could display a different RadDock to provide "not allowed" feed back when applicable but I'm searching for something simpler.  Any ideas?

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Jul 2010, 01:37 PM
Hello Richard,

I wonder if a simple alert is an acceptable alternative for your case. If yes, then try the following code (which is part from this kb article):
function OnClientAppointmentInserting(sender, eventArgs) { 
            var slotElement = $telerik.$(eventArgs.get_targetSlot().get_domElement()); 
            if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) { 
                // Prevent appointment inserting on holidays. 
                eventArgs.set_cancel(true); 
        alert("This time slot is not available.");
            
        


Greetings,
Peter
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
Richard Brown
Top achievements
Rank 2
answered on 23 Jul 2010, 10:10 PM
I appreciate your idea.  I wound up using JQuery to set the title attribute of all of the <TD> elements with an "Unavailable" class:

$(

"td[class*='Unavailable']").attr("title", "Not Available for Scheduling!");

That provides a mouseover notification which the client deemed good enough.


Thanks

 

Tags
Scheduler
Asked by
Richard Brown
Top achievements
Rank 2
Answers by
Peter
Telerik team
Richard Brown
Top achievements
Rank 2
Share this question
or