Вопрос

I'm using Kendo UI scheduler and I want to customize the pop up window. I've searched in their documentations, and I didn't find anything like this.


Basically, I want to know one thing:

On double click on the scheduler cell, there is popup window. The title has default value - "No title", but if you remove that, and double click the input, there is new value - "Replacements". Is that another default value, or that value is pulled from somewhere? (where?)

Это было полезно?

Решение

if you view html code of tutorial page you see

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" }
                }
            }
        },

Другие советы

You need to add to

$("#scheduler").kendoScheduler({
    editable: {
        template: $("#editor").html()
    },
    ...

and add the template

<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>
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"
                    }
                }
            }

LINK: http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler#configuration-messages.editor.title

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top