Hi,
I am trying to create a new data array with fresh elements for the weekview of my scheduler this way
Declarations:
//Html element
<div kendo-scheduler="schedulerAppointment" id="schedulerAppointment" k-options="schedulerOptions"> </div>
//Events
var events = new kendo.data.ObservableArray([]);
$scope.ds = new kendo.data.SchedulerDataSource({
data: events,
schema: {}
});
//Options
var scheduler = $scope.schedulerOptions = {
editable: false,
startTime: new Date(),
date: new Date(vm.total),
views: [
{
type: "agenda",
title: "Diario",
eventTemplate: $("#event-template-daily").html(),
selected: true
},
{
type: "week",
title: "Semanal",
eventTemplate: $("#event-template-week").html(),
selected: false
}
],
timezone: "Etc/UTC",
eventTimeTemplate: $("#event-time-template").html(),
allDaySlot: false,
majorTick: 30,/*recibido de base de datos*/
isAllDay: {
type: true,
from: "IsAllDay"
},
dataSource: $scope.ds,
showWorkHours: true,
navigate: scheduler_navigate,
dataBound: scheduler_dataBound
};
//Finally setting the array of new events
$scope.schedulerAppointment.dataSource.data(eventsArray);
$scope.schedulerAppointment.refresh();
This for the weekview of the scheduler, but all that I get is the dayview (prior view) filled with the new data and the week view is not being shown.
Can you please tell me how can I accomplish this?.
Thank you very much.