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

Setting data dynamically to angular scheduler weekview

1 Answer 59 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Nelly Zevallos
Top achievements
Rank 1
Nelly Zevallos asked on 10 Nov 2015, 07:49 AM

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.

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 11 Nov 2015, 10:36 AM
Hello Dante,

I already answered to this query in duplicated support ticket created by you - #986380 . Please keep in mind that it is highly recommended that you keep related questions in one support thread or a forum post, so that we can easily keep track of your support history and provide better answers in a shorter time.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Integration with other JS libraries
Asked by
Nelly Zevallos
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or