我正在使用Kendo UI scheduler,我想自定义弹出窗口。我搜索了他们的文档,但没有找到类似的东西。
基本上,我想知道一件事:
双击调度程序 cell,有弹出窗口。标题有默认值 - “无标题”,但如果你删除它,然后双击input,就会有新值 - “替换”。这是另一个默认值,还是从某个地方提取的值?(在哪里?)
我正在使用Kendo UI scheduler,我想自定义弹出窗口。我搜索了他们的文档,但没有找到类似的东西。
基本上,我想知道一件事:
双击调度程序 cell,有弹出窗口。标题有默认值 - “无标题”,但如果你删除它,然后双击input,就会有新值 - “替换”。这是另一个默认值,还是从某个地方提取的值?(在哪里?)
您需要添加到
$("#scheduler").kendoScheduler({
editable: {
template: $("#editor").html()
},
...
并添加模板
<script id="editor" type="text/x-kendo-template">
<p><label>Task Id: <input name="taskId" id="taskId" /></label></p>
<p><label>Title: <input name="title" id="title"/></label></p>
...
</script>
如果您查看教程页面的 html 代码,您会看到
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskID", type: "number" },
//*** In this line you can change title default value //// title: { from: "Title", defaultValue: "No title", validation: { // required: true } },
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
startTimezone: { from: "StartTimezone" },
endTimezone: { from: "EndTimezone" },
description: { from: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
ownerId: { from: "OwnerID", defaultValue: 1 },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
},
in the event message of the scheduler you can to do it:
messages: {
editor: {
title: "Nombre",
start: "Fecha Inicio",
end: "Fecha Final",
allDayEvent: "Todo el día",
repeat: "Repetir",
description: "Descripción"
},
recurrenceEditor: {
daily: {
interval: " día(s)",
repeatEvery: "Repetir cada "
},
end: {
never: " Nunca",
after: " Despues de ",
on: " el ",
label: "Finalizar: ",
occurrence: " veces "
},
weekly: {
repeatEvery: "Repetir cada: ",
interval: " semana(s).",
repeatOn: "Repetir los: "
},
monthly: {
repeatEvery: "Repetir cada : ",
interval: " mes(es).",
repeatOn: "Repetir el: ",
day: " día "
},
yearly: {
repeatOn: "Repetir cada: ",
interval: " año(s).",
repeatOn: "Repetir en: ",
of: " de "
},
frequencies: {
never: "Nunca",
daily: "Diariamente",
weekly: "Semanalmente",
monthly: "Mensualmente",
yearly: "Anualmente"
},
offsetPositions: {
first: "primer",
second: "segundo",
third: "tercer",
fourth: "cuarto",
last: "último"
},
weekdays: {
weekday: "Día de la semana",
weekend: "Fin de semana"
}
}
}
链接:http ://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler#configuration-messages.editor.title