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

Click on Date

6 Answers 79 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 20 Aug 2010, 04:43 PM
Good morning.  How do I prevent a user from clicking on the dates within RadScheduler? That is, how do I remove the clickability of the dates?  Thanks.

6 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 20 Aug 2010, 05:07 PM
Hello Chris,

Are you asking how you can create a ReadOnly display of the RadScheduler? If so try setting the ReadOnly="true" on the RadScheduler.
0
Chris
Top achievements
Rank 1
answered on 20 Aug 2010, 05:09 PM
Thanks for the reply.

Well, I have it marked as readonly, but I am still able to click on the date.  I have readonly = true and monthview=readonly = true, but I am still able to click on the date.

Thanks...Chris
0
Veronica
Telerik team
answered on 25 Aug 2010, 08:34 AM
Hi Chris,

You can subscribe to the OnNavigationCommand event and use the following code in the handler:

protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
   {
       if (e.Command == SchedulerNavigationCommand.SwitchToSelectedDay)
       e.Cancel = true;
   }

Please take a look at this help topic for the NavigationCommand event.

Hope this helps.

Regards,
Veronica Milcheva
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
Accepted
Veronica
Telerik team
answered on 25 Aug 2010, 11:54 AM
Hi Chris,

After further testing I realized that more suitable is to use the following Javascript:

function pageLoad() {
           $telerik.$(".rsDateHeader").each(function(i) {
               $telerik.$(this).bind("click", function(e) {
                   $telerik.cancelRawEvent(e); 
               });
           });
       }

With using the OnNavigationCommand event the page postbacks after clicking on some of the links. Also the "today" link would not redirect as it is disabled too. 

Hope this helps.

Best wishes,
Veronica Milcheva
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
Chris
Top achievements
Rank 1
answered on 25 Aug 2010, 02:50 PM
OK...I'll test and let you know, Veronica.  Thanks for the replies.
0
Chris
Top achievements
Rank 1
answered on 25 Aug 2010, 03:00 PM
It worked!  Thank you, Veronica.
Tags
Scheduler
Asked by
Chris
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Chris
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or