Completed
Last Updated: 11 Apr 2023 13:46 by ADMIN
Release R2.2023-Increment.2(26.Apr.2023)
Bob
Created on: 01 Dec 2022 23:29
Category: Scheduler
Type: Bug Report
0
kendoScheduler doesn't fire change event when in "Year" view

I just upgraded to the latest version today.

kendoScheduler doesn't fire change event when in "Year" view.

This is really easy to duplicate. Select Year and it doesn't fire.

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.3.1109/styles/kendo.default-v2.min.css"/>

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2022.3.1109/js/kendo.all.min.js"></script>
</head>
<body>
  
<div id="scheduler"></div>
<script>
$("#scheduler").kendoScheduler({
  date: new Date("2013/6/6"),
  views: [ "day", "month", "year" ],
  selectable:true,
  dataSource: [
    {
      id: 1,
      start: new Date("2013/6/6 08:00 AM"),
      end: new Date("2013/6/6 09:00 AM"),
      title: "Interview"
    }
  ],
  change: function(e) {
    var start = e.start;
    var end = e.end;

/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(kendo.format("Selection between {0:g} and {1:g}", start, end));
  }
});
</script>
</body>
</html>

 

 

 

4 comments
Bob
Posted on: 21 Mar 2023 15:00

The events get lost also when changing year, so you need to add the following code.

$('.k-calendar-td').click(function(e){
    calendarChange(e);
});

$('.k-button-group .k-button').click(function(e){

//It is important to add a timeout to give time for the calendar to rebuild before you add the event.

    setTimeout(() => {
        $('.k-calendar-td').click(function(e){
            calendarChange(e);
        });
    }, 1000);
});
ADMIN
Martin
Posted on: 20 Dec 2022 07:55

Hello, Bob,

I am glad that you were able to find a workaround until the bug is fixed! Thank you for sharing it for the rest of the community.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Bob
Posted on: 13 Dec 2022 15:05

I do have a work around - but it would be nice if this is fixed.

$('.k-calendar-td').click(function(e){

var scheduler = $("#scheduler").data("kendoScheduler");
    var start = scheduler.select().start;
//...
});
ADMIN
Martin
Posted on: 02 Dec 2022 22:08

Hi, Bob,

Thank you for reporting the behaviour. I have converted this thread to a bug report in our Feedback Portal. Please follow it for further details.

As a small token of gratitude for reporting the bug, I am updating your Telerik Points.

Let me know if you have any further questions.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.