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

Stopping navigation

4 Answers 419 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 26 Jan 2012, 04:29 PM

I am trying to stop the navigation on the Calendar to use it for displaying information.  Still need the ability to select a day.
 
I have tried setting navigate event with
 
e.preventDefault() and e.preventDefault() ; return false;
 
but neither of these seem these work any ideas
 
Thanks

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Jan 2012, 09:28 AM
Hello Darren,

The navigate event is not cancellable, as it is fired after the UI has started changing. Its purpose is to be used to interaction with other widgets (datasources) on the page.

What you can do to prevent users from nagivating is to add the following CSS rule to hide the navigation arrows....

.k-calendar .k-header .k-link
{
    visibility: hidden;
}

...and execute the following script after Calendar initialization in order to remove click event bindings:

var cancellables = $(".k-nav-fast,.k-other-month")
cancellables.unbind();
cancellables.click(function(e){
    e.preventDefault();
    e.stopPropagation();
});


Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Darren
Top achievements
Rank 1
answered on 27 Jan 2012, 10:14 AM
Thanks that’s just what I needed
0
n/a
Top achievements
Rank 1
answered on 20 Feb 2019, 02:24 PM

Hi Dimo,

I'm trying to do some specific changes according to our business needs. What I'm trying to do is show some of available appointment dates on calendar. While doing that, some of them can be next month and this month, so I want to let user click the day from next month in order to see which appointment dates are available on that date, but don't want to navigate to next month, still stay the same month.

the code you gave doesn't let them click the next month.

0
Angel Petrov
Telerik team
answered on 25 Feb 2019, 11:07 AM
Hi,

In the mentioned case you will have to manually select the date cell. Please elaborate more on the selection mode used by the calendar so we could provide a straight to the point suggestion.

Regards,
Angel Petrov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Calendar
Asked by
Darren
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Darren
Top achievements
Rank 1
n/a
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or