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

block dates in calendar

5 Answers 134 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Teja
Top achievements
Rank 1
Teja asked on 07 Mar 2011, 10:57 AM
Hi,

I am working on Telerik RadScheduler.

I have different sessions called screening, evaluation, discussions and etc....

So depending upon the dates of the above sessions, I have to highlight the calendar in Radscheduler.
All the other dates other than this should be blocked.

For example:
Screening : 2/23/2011 to 3/29/2011
Evaluation :4/12/2011-4/30/2011
Discussions-1/2/2011-1/5/2011.

All the dates other than this should be blocked and not be highlighted to the user.Is there any way to do it?

5 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 07 Mar 2011, 11:06 AM
Hello Teja,

Please take a look at this KB article for how to make appointments visible in the popup calendar of RadScheduler.

Also you can use this KB article for disabling the timeslots per special dates.

All the best,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Y
Top achievements
Rank 1
answered on 09 Mar 2011, 06:57 AM
Hi Veronica,

I used the code in "Setting special days or time slots in RadScheduler" Article.  However I ran into an issue where the Right click Context menu is disabled for appointments that are in the disabled slots.  I want the Timeslot context menu to be disabled, but the Appointments (that are located in the slot) to still have the context menu.

The problem is the jQuery code that disables the right click menu for appointments and timeslots
$telerik.$(
".Disabled").bind("contextmenu", function (e) {
return false;             
        });

Is there a way to cancel the context menu from the OnClientTimeSlotContextMenu event?  I can already successfully check if the slot is enabled or disabled, i just need a command to stop or not display the Timeslot context menu.

Here's my js function

function OnClientTimeSlotContextMenut(sender, eventArgs) {
   if ($telerik.$(obj._domElement).hasClass('disabled_slot')) {
        //Do not show the menu
   }
}
0
Veronica
Telerik team
answered on 14 Mar 2011, 08:31 PM
Hi Y,

No, unfortunately there is no way to cancel the OnClientTimeSlotContextMenu event. I'll think of a workaround but I'll need some more time to investigate the issue. 

I'll contact you as soon as I find the solution.

Thank you for your patience.

All the best,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Felipe
Top achievements
Rank 1
answered on 12 Sep 2011, 04:58 PM
Hi:

Did you find any solution?

I need to achieve the same that the other user and there is no answer here yet.

Can you please provide a solution!
0
Peter
Telerik team
answered on 14 Sep 2011, 10:42 AM
Hello Felipe,

You can disable the menu for disabled slots like this:
function OnClientTimeSlotContextMenu(sender, args) {       
           if ($telerik.$(args.get_targetSlot().get_domElement()).hasClass('disabled_slot')) {
               sender.get_timeSlotContextMenus()[0].disable();
           }
           else {
               sender.get_timeSlotContextMenus()[0].enable();
           }         
       }

I hope this is an acceptable alternative.

All the best, Peter
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
Tags
Scheduler
Asked by
Teja
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Y
Top achievements
Rank 1
Felipe
Top achievements
Rank 1
Peter
Telerik team
Share this question
or