Пользовательский интерфейс Kendo (Scheduler) — изменить текст заголовка «Сегодня» на центр вместо левого

Как я могу переместить текст Kendo Scheduler «Сегодня» в середину (после стрелки влево) вместо крайнего левого

Онлайн-демонстрация

введите здесь описание изображения


person Reddy    schedule 23.12.2015    source источник


Ответы (1)


Пожалуйста, добавьте приведенный ниже стиль в свой существующий код, чтобы добиться требуемого поведения.

  <style>
        .k-nav-today {
            border-radius: 0px !important;
        }

        .k-nav-prev {
            float: left;
            border-width: 1px 0 1px 1px !important;
            border-radius: 4px 0 0 4px;
        }
    </style>

Полный пример кода

<!DOCTYPE html>
<html>
<head>
    <title>Jayesh Goyani</title>
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.common.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.rtl.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.default.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.mobile.all.min.css">

    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://kendo.cdn.telerik.com/2015.3.1111/js/angular.min.js"></script>
    <script src="http://kendo.cdn.telerik.com/2015.3.1111/js/jszip.min.js"></script>
    <script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.all.min.js"></script>
    <style>
        .k-nav-today {
            border-radius: 0px !important;
        }

        .k-nav-prev {
            float: left;
            border-width: 1px 0 1px 1px !important;
            border-radius: 4px 0 0 4px;
        }
    </style>
</head>
<body>
    <div id="scheduler"></div>
    <script>
        $(document).ready(function () {
            $("#scheduler").kendoScheduler({
                date: new Date("2013/6/13"),
                startTime: new Date("2013/6/13 07:00 AM"),
                height: 600,
                views: [
                    "day",
                    { type: "workWeek", selected: true },
                    "week",
                    "month",
                    "agenda",
                    { type: "timeline", eventHeight: 50 }
                ],
                timezone: "Etc/UTC",
                dataSource: {
                    batch: true,
                    transport: {
                        read: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks",
                            dataType: "jsonp"
                        },
                        update: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/update",
                            dataType: "jsonp"
                        },
                        create: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/create",
                            dataType: "jsonp"
                        },
                        destroy: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/destroy",
                            dataType: "jsonp"
                        },
                        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: { 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" }
                            }
                        }
                    },
                    filter: {
                        logic: "or",
                        filters: [
                            { field: "ownerId", operator: "eq", value: 1 },
                            { field: "ownerId", operator: "eq", value: 2 }
                        ]
                    }
                },
                resources: [
                    {
                        field: "ownerId",
                        title: "Owner",
                        dataSource: [
                            { text: "Alex", value: 1, color: "#f8a398" },
                            { text: "Bob", value: 2, color: "#51a0ed" },
                            { text: "Charlie", value: 3, color: "#56ca85" }
                        ]
                    }
                ]
            });

            $("#people :checkbox").change(function (e) {
                var checked = $.map($("#people :checked"), function (checkbox) {
                    return parseInt($(checkbox).val());
                });

                var scheduler = $("#scheduler").data("kendoScheduler");

                scheduler.dataSource.filter({
                    operator: function (task) {
                        return $.inArray(task.ownerId, checked) >= 0;
                    }
                });
            });
        });
    </script>
</body>
</html>

Обновление 1: -

<style>
    .k-nav-today {
        border-radius: 0px !important;
    }

    .k-nav-prev {
        float: left;
        border-width: 1px 0 1px 1px !important;
        border-radius: 4px 0 0 4px;
    }

    /*left arrow*/
    .k-i-arrow-w {
        background-image: url("http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-arrow-right-icon.png") !important;
        background-position: initial !important;
    }

    /*right arrow*/
    .k-i-arrow-e {
        background-image: url("http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-arrow-right-icon.png") !important;
        background-position: initial !important;
    }
</style>

Дайте мне знать, если есть какие-либо опасения.

person Jayesh Goyani    schedule 23.12.2015
comment
@Jayesh Goyani.. работает как шарм... Спасибо за быстрый Совет. Я принимаю ваш ответ и тоже голосую :) - person Reddy; 23.12.2015
comment
И как я могу добавить дополнительный класс для стрелок и текста «Сегодня», если я хочу изменить значки? - person Reddy; 23.12.2015
comment
@Jayesh Goyani.. Отлично... Еще раз спасибо - person Reddy; 23.12.2015