This is a migrated thread and some comments may be shown as answers.

Schedule editor datetimepicker format change

2 Answers 188 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 30 Mar 2016, 02:01 PM

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 Answers, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 30 Mar 2016, 02:04 PM

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>

0
Vladimir Iliev
Telerik team
answered on 01 Apr 2016, 07:43 AM
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!
 
Tags
Scheduler
Asked by
Jon
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or