Stopping navigation

3 posts, 0 answers
  1. Darren
    Darren avatar
    2 posts
    Member since:
    Jan 2012

    Posted 26 Jan 2012 Link to this post

    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

  2. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 27 Jan 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Darren
    Darren avatar
    2 posts
    Member since:
    Jan 2012

    Posted 27 Jan 2012 Link to this post

    Thanks that’s just what I needed
Back to Top