Schedule editor datetimepicker format change

3 posts, 0 answers
  1. Jon
    Jon avatar
    53 posts
    Member since:
    Oct 2013

    Posted 30 Mar Link to this post

    Hi,

    When creating/editing an event in scheduler the two datetimepickers for start and end datetime default to en-UK formating.

    I know how to change this if you have a datetimepicker ....

    <input id="datetimepicker" />

    <script>
        $("#datetimepicker").kendoDateTimePicker({
            culture: "de-DE"
        });
    </script>

     

    So I tried this in the schema section of the scheduler...

    schema: {
       model: {
               id: "taskId",
                         fields: {
    taskId: { from: "TaskID", type: "number" },
                                title: { from: "Title", validation: { required: true } },
                                start: { from: "Start", type: "date", culture: "en-GB" },
                                end: { from: "End", type: "date", culture: "en-GB" },
                                startTimezone: { from: "StartTimezone" },
                                endTimezone: { from: "EndTimezone" },
                                isAllDay: { from: "IsAllDay", type: "boolean", defaultValue: false },
                                isOOH: { from: "IsOOH", type: "boolean", defaultValue: false },
                                description: { from: "Description" },
                                recurrenceId: { from: "RecurrenceID" },
                                recurrenceRule: { from: "RecurrenceRule" },
                                recurrenceException: { from: "RecurrenceException" },
                                team: { from: "Team", validation: { required: true } },
                                assignee: { from: "Assignee", validation: { required: true } }
                               }
                        },

    but it does not seem to work. I have added a reference to 

  2. Jon
    Jon avatar
    53 posts
    Member since:
    Oct 2013

    Posted 30 Mar in reply to Jon Link to this post

    Posted before I finished editing.... 

    The last sentence should say I have added a reference to 

    <script src="@Url.Content("~/Scripts/kendo/2016.1.112/cultures/kendo.culture.en-GB.min.js")"></script>

  3. Kendo UI is VS 2017 Ready
  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 01 Apr Link to this post

    Hello Jon,

    You can customize the edit template and st the option of the editor (as there is no "culture" option in the model fields):
    <input type="text"
                   data-role="datetimepicker"
                   data-culture="de-DE"

    Regards,
    Vladimir Iliev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top