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

Disable automatic month change

1 Answer 26 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Vnuce
Top achievements
Rank 1
Vnuce asked on 16 Mar 2012, 03:17 PM
I'm using RadScheduler with WebService binding and I want to avoid the following behavior: 
In MonthView, lets say March is displayed and the last three days of February are at the beginning. When I click on 29th of February, the scheduler automatically switches the view to February.

I'd like the view to stay on March (with those three days on Feb).
I've seen it done throughout Telerik's demos and I presume it's a simple setting, but I can't seem to find it.

Any help would be appreciated it.


Thanks.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 21 Mar 2012, 11:21 AM
Hi Vnuce,

 
If RadScheduler is bound to WebService you can use the following javascript code to stop the click event of the dates in the other months:

function pageLoad(sender, args) {
           $ = $telerik.$;
         $(".rsOtherMonth").find(".rsDateHeader").bind("click", function(e) {
               e.stopPropagation();
               e.preventDefault();
           });
       }
        
       function OnClientNavigationCommand(sender, args) {
           $(".rsOtherMonth").find(".rsDateHeader").unbind("click");
       }
        function OnClientDataBound(sender, args)
       {
            $ = $telerik.$;
           $(".rsOtherMonth").find(".rsDateHeader").bind("click", function(e) {
               e.stopPropagation();
               e.preventDefault();
           });
       }

Hope this will be helpful.

All the best,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Vnuce
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or