or
<body> @using (Html.BeginForm("Index", "Home", FormMethod.Post)) { @Html.HiddenFor(m => m.StartDate) @(Html.Kendo().Calendar() .Name("calendarStart") .Value(DateTime.Now) ) @Html.HiddenFor(m => m.EndDate) @(Html.Kendo().Calendar() .Name("calendarEnd") .Value(DateTime.Now) ) <button name="button" value="save">Save Date</button> } <script> $(document).ready(function () { var calendarStart = $("#calendarStart").data("kendoCalendar"); $("#StartDate").val((moment(calendarStart.value()).format("YYYY-MM-DD"))); calendarStart.bind("change", function (e) { $("#StartDate").val((moment(this.value())).format("YYYY-MM-DD")); }); var calendarEnd = $("#calendarStart").data("kendoCalendar"); $("#EndDate").val((moment(calendarEnd.value()).format("YYYY-MM-DD"))); calendarEnd.bind("change", function (e) { $("#EndDate").val((moment(this.value())).format("YYYY-MM-DD")); }); }); </script></body>@(Html.Kendo().Window() .Name("LoadingWindow") .Visible(false) .Title("Loading...") .Modal(true) .Height(150) .Width(300) .Actions(a => a.Clear()) .Content(@<text> <div id="loading-details">Loading Data. Please wait. <div id="divLoaderGif"> <img src="@Url.Content("~/Content/themes/ajax-loader.gif")" alt="Loading... Please wait..." /> </div> </div> </text>))@(Html.Kendo().Grid<object>() .HtmlAttributes(new { style = "height: 80%;" }) .Name("grid-records") .Columns(columns => { columns.LoadSettings(Model.GridColumns); foreach (GridColumnSettings item in Model.GridColumns) { ModelFieldDescriptor modelField = new ModelFieldDescriptor(); modelField.Member = item.Member; modelField.MemberType = item.MemberType; modelField.DefaultValue = null; modelField.IsEditable = true; columns.Container.DataSource.Schema.Model.Fields.Add(modelField); } //columns.Command(command => { command.Edit(); command.Destroy(); }).HtmlAttributes(new { style = "float:right;" }); columns.Command(command => command.Custom("ViewDetails")); }) .Groupable() .Pageable() .Sortable() .Scrollable() .Filterable(Web.Helpers.KendoI18n.SetGridFilterableSettings) //.Editable(editable => editable.Mode(GridEditMode.InLine)) .DataSource(dataSource => dataSource .Ajax() .Events(events => events.Error("error_handler")) .Read(read => read.Action("GetRecords", "Records", new { currentTableId = Model.CurrentTableId })) //.Update(update => update.Action("UpdateRecordFromGrid", "Design")) //.Destroy(destroy => destroy.Action("DeleteRecordFromGrid", "Design")) ) )@model ISPIS.Models.TerenskiRezultatFK@section headCultureContent { <script src="@Url.Content("~/Scripts/kendo.culture.sr-Latn-RS.min.js")"></script>} <script type="text/javascript"> //set culture of the Kendo UI kendo.culture("sr-Latn-RS");</script> @{ ViewBag.Title = "Create"; Culture = "sr-Latn-RS";}<div class="editor-label"> @Html.LabelFor(model => model.DatumOcitavanja)</div><div class="editor-field"> @(Html.Kendo().DateTimePicker() .Name("DatumOcitavanja") .Value(DateTime.Now) /*.Culture("sr-Latn-RS")*/ .Format("dd.MM.yyyy HH:mm") .HtmlAttributes(new { style = "width:220px" }) ) @Html.ValidationMessageFor(model => model.DatumOcitavanja)</div>