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

Multiple option

1 Answer 34 Views
MultiViewCalendar
This is a migrated thread and some comments may be shown as answers.
Flotman
Top achievements
Rank 1
Flotman asked on 06 May 2019, 07:55 AM

Hello,

Is posible to override behavior when multiple option is set, to not holding CTRL button to select multiple dates. I want user to use this behavior as default just by normal mouse click on dates.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 09 May 2019, 07:38 AM
Hello Tomasz,

You could achieve that by manually handling the click event of the cells.

e.g.

$('#multipleMultiViewCalendar .k-link').on('click', function (e) {
    e.preventDefault();
    e.stopPropagation();
 
    var calendar = $('#multipleMultiViewCalendar').data('kendoMultiViewCalendar');
    var currentValue = kendo.calendar.toDateObject($(this));
 
    if (!$(this).parent().hasClass('k-state-selected')) {
        calendar.selectable._selectElement($(this).parent());
    } else {
        calendar.selectable._unselect($(this).parent());
    }
})

Below you will find a small sample which demonstrates the above approach:


Even though the above sample uses the jQuery MultiViewCalendar, the very same approach applies for the Asp.Net Core wrapper.


Regards,
Georgi
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
MultiViewCalendar
Asked by
Flotman
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or