1
I implanted the Kendo UI Scheduler (calendar/calendar) template in my ASP.NET MVC project, but I’m having problems with it’s pop-ups. For example: The popup does not close itself when you click on "save", for example. Or when I click on "X" to close the popup and the event is deleted.
These are normal bugs ?
Note: No errors in controllers.
Follows excerpt from javascript code:
<div id="scheduler"></div>
<script>
$("#scheduler").kendoScheduler({
date: new Date(),
currentTimeMarker: {
updateInterval: 100
},
showWorkHours: true,
editable: {
confirmation: false
},
views: [
"day", "week", "workWeek", { type: "month", selected: true },"agenda"
],
allDayEventTemplate: $("#event-template").html(),
//edit: editEvent,
//editable: {
// template: $("#editor").html()
//},
timezone:"Etc/UTC",
dataSource:
{
batch: true,
transport: {
read: {
url: "/Agendas/Get",
dataType: "json"
},
update: {
url: "/Agendas/Update",
dataType: "json"
},
create: {
url: "/Agendas/Create",
dataType: "json"
},
destroy: {
url: "/Agendas/Delete",
dataType: "json"
},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return { models: kendo.stringify(options.models) };
}
}
},
schema: {
model: {
id: "taskId",
fields: {
taskId: { from:"TaskID", type: "number" },
title: { field: "Title", defaultValue: "No title", validation: { required: true } },
start: { type: "date", field: "Start" },
end: { type: "date", field: "End" },
description: { field: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
isAllDay: { type: "boolean", from: "IsAllDay" },
ownersID: { from: "OwnersID", defaultValue: [@Model.Codigo, 1] }
}
}
}
},
resources: [
{
field: "ownersID",
title: "Responsável",
dataSource: [
{ text: "nome1", value: 1, color: "#ff0000" },
{ text: "nome2", value: 2, color: "#ff9900" },
{ text: "nome3", value: 3, color: "#0000cc" },
{ text: "nome4", value: 11, color: "#009900" },
{ text: "nome5", value: 4, color: "#51a0ed" },
{ text: "nome6", value: 6, color: "#56ca85" },
{ text: "nome7", value: 5, color: "#f8a398" },
{ text: "nome8", value: 8, color: "#cc3300" }
],
multiple: true
}
]
});
Note: I am using the popups of Kendo Scheduler itself.
You can put an excerpt of your code in the question?
– Leonel Sanches da Silva
Ready, in your hand ...
– Jeff0103
I don’t think that’s the problem. You also have the Event popup code?
– Leonel Sanches da Silva
So .. no, I just took the example of the own documentation of Kendo Scheduler, which already comes with the events ...
– Jeff0103
I need you to edit your question and put the link for me to simulate here. Mine worked.
– Leonel Sanches da Silva
link to what ? : / .. Sorry for my ignorance, I’m new here
– Jeff0103
Example Kendo documentation link. I don’t know if we’re looking at the same example.
– Leonel Sanches da Silva
http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler I used the datasource module
– Jeff0103