I'm using a scheduler in cshtml:
In this scheduler I'm using a custom view defined below. This works fine in making the scheduler only show 3 days at a time. However the next day and previous day functionality doesn't work. I'm assuming I have to overwrite the previousday and nextday functionality, but am not sure how. What I expect to happen is for the view to advance 1 day at a time (i.e. April 16 - 18 moves to April 17 - 19).
Also I am wanting to add custom edit functionality. So when a task / event is clicked on, I want to do something other then opening the edit window (i.e set some variable) I think this is done with overwriting the editable function in the below jscript, but again am not sure how. Any help and/or examples are greatly appreciated
@(Html.Kendo().Scheduler<TaskViewModel>() .Name("scheduler") .Views(views => { views.CustomView("ThreeDayView"); }) .DataSource(d => d .Read("Read", "Home") .Create("Create", "Home") .Destroy("Destroy", "Home") .Update("Update", "Home") ) )In this scheduler I'm using a custom view defined below. This works fine in making the scheduler only show 3 days at a time. However the next day and previous day functionality doesn't work. I'm assuming I have to overwrite the previousday and nextday functionality, but am not sure how. What I expect to happen is for the view to advance 1 day at a time (i.e. April 16 - 18 moves to April 17 - 19).
Also I am wanting to add custom edit functionality. So when a task / event is clicked on, I want to do something other then opening the edit window (i.e set some variable) I think this is done with overwriting the editable function in the below jscript, but again am not sure how. Any help and/or examples are greatly appreciated
var ThreeDayView = kendo.ui.MultiDayView.extend({ options: { selectedDateFormat: "{0:D} - {1:D}" }, name: "ThreeDayView", calculateDateRange: function () { //create a range of dates to be shown within the view var selectedDate = this.options.date, start = kendo.date.dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1), idx, length, dates = []; for (idx = 0, length = 3; idx < length; idx++) { dates.push(start); start = kendo.date.nextDay(start); } this._render(dates); } });
