I'm having some troubles trying to display events in the Scheduler, maybe casued by DateTime format.
My scheduler configuration is the following:
@(Html.Kendo().Scheduler<BookingSchedulerDto>()
.Name(“Scheduler")
.Date(DateTime.Now)
.StartTime(Model.Start)
.EndTime(Model.End)
.Editable(m => m.TemplateId("editor"))
.Views(views =>
{
views.DayView(view => view.Selected(true));
views.WeekView();
views.MonthView();
views.AgendaView();
})
.Timezone("Etc/UTC")
.DataSource(d => d
.Events(e =>
{
e.Error("onError");
})
.Model(m =>
{
m.Id(f => f.Id);
m.Field(f => f.Start);
m.Field(f => f.End);
m.Field(f => f.Title).DefaultValue("Nessun titolo");
m.Field(f => f.IsAllDay).DefaultValue(false);
m.Field(f => f.Name);
})
.Create("Update", "Booking")
.Read("Read", "Booking")
.Update("Update", "Booking")
.Destroy("Delete", "Booking")
)
)
where the Model.Start and Model.End are DateTime types.
The BookingSchedulerDto entity properties Start and End are also DateTime objects. An example of result of read method is
[
{
…,
"StartTimezone": "Etc/UTC",
"EndTimezone": "Etc/UTC",
"RecurrenceRule": null,
"Start": "2017-11-07T20:16:54.073+01:00",
"End": "2017-11-07T23:16:54.073+01:00",
"Id": 4,
…
},
{
…
}
]
The problem here is that events are not rendered in the scheduler as expected. What am I doing wrong? Is the result date format correct? Any other causes?
My scheduler configuration is the following:
@(Html.Kendo().Scheduler<BookingSchedulerDto>()
.Name(“Scheduler")
.Date(DateTime.Now)
.StartTime(Model.Start)
.EndTime(Model.End)
.Editable(m => m.TemplateId("editor"))
.Views(views =>
{
views.DayView(view => view.Selected(true));
views.WeekView();
views.MonthView();
views.AgendaView();
})
.Timezone("Etc/UTC")
.DataSource(d => d
.Events(e =>
{
e.Error("onError");
})
.Model(m =>
{
m.Id(f => f.Id);
m.Field(f => f.Start);
m.Field(f => f.End);
m.Field(f => f.Title).DefaultValue("Nessun titolo");
m.Field(f => f.IsAllDay).DefaultValue(false);
m.Field(f => f.Name);
})
.Create("Update", "Booking")
.Read("Read", "Booking")
.Update("Update", "Booking")
.Destroy("Delete", "Booking")
)
)
where the Model.Start and Model.End are DateTime types.
The BookingSchedulerDto entity properties Start and End are also DateTime objects. An example of result of read method is
[
{
…,
"StartTimezone": "Etc/UTC",
"EndTimezone": "Etc/UTC",
"RecurrenceRule": null,
"Start": "2017-11-07T20:16:54.073+01:00",
"End": "2017-11-07T23:16:54.073+01:00",
"Id": 4,
…
},
{
…
}
]
The problem here is that events are not rendered in the scheduler as expected. What am I doing wrong? Is the result date format correct? Any other causes?