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

Change date format of recurrenceEnds field to dd/mm/yyy

1 Answer 212 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 17 Dec 2015, 04:37 AM

Hello,
I'm using on Kendo ASP.Net MVC 2015.1.429.

On Kendo Scheduler, when adding/editing an event if use Recurrence feature, End field always show date with format: mm/dd/yyyy. (using Chrome browser latest version)

 Is there any way or workaround to change date format to: dd/mm/yyyy? 

Thanks,

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 18 Dec 2015, 11:44 AM
Hello Jason,

Setting the format of the RecurrenceEditor DatePicker is not supported out of the box and custom code would be required. Possible solution would be using custom editor template where to utilize the editor "Change" event where to manually set this format:

<script>
    function onChange(e) {
        this._container.find(".k-recur-until[data-role]").data("kendoDatePicker").setOptions({
            format: "yyyy"
        });
    }
</script>
<div data-container-for="recurrenceRule" class="k-edit-field">
    @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
          .Events(e => e.Change("onChange"))
        .HtmlAttributes(new { data_bind = "value:recurrenceRule" }))
</div>

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
Jason
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or