block dates in calendar

6 posts, 0 answers
  1. Teja
    Teja avatar
    15 posts
    Member since:
    Nov 2010

    Posted 07 Mar 2011 Link to this post

    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?
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 07 Mar 2011 Link to this post

    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!
  3. Y
    Y avatar
    1 posts
    Member since:
    Mar 2011

    Posted 09 Mar 2011 Link to this post

    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
       }
    }
  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 14 Mar 2011 Link to this post

    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!
  5. Felipe
    Felipe avatar
    13 posts
    Member since:
    Jun 2011

    Posted 12 Sep 2011 Link to this post

    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!
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 14 Sep 2011 Link to this post

    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
Back to Top