kendo-datetimepicker

KendoUI DateTimePicker undefined on document.ready

ε祈祈猫儿з 提交于 2020-01-11 06:19:10
问题 I have a Kendo DateTimePicker control in an mvc (asp.net) partial view that I am trying to access from document.ready(): @(Html.Kendo().DateTimePickerFor(vvm => vvm.StartTime) .Name("dtpVisitStart") .Format("yyyy/MM/dd HH:mm tt") .TimeFormat("HH:mm:tt") .Events(e => e.Change("dtpVisitStart_Change") ) ) The javascript: $(document).ready(function () { TestDTP(); }); function TestDTP() { var dtp = $("#dtpVisitStart").getKendoDateTimePicker(); debugger; } When the debugger line runs dtp is

KendoUI DateTimePicker undefined on document.ready

元气小坏坏 提交于 2020-01-11 06:19:07
问题 I have a Kendo DateTimePicker control in an mvc (asp.net) partial view that I am trying to access from document.ready(): @(Html.Kendo().DateTimePickerFor(vvm => vvm.StartTime) .Name("dtpVisitStart") .Format("yyyy/MM/dd HH:mm tt") .TimeFormat("HH:mm:tt") .Events(e => e.Change("dtpVisitStart_Change") ) ) The javascript: $(document).ready(function () { TestDTP(); }); function TestDTP() { var dtp = $("#dtpVisitStart").getKendoDateTimePicker(); debugger; } When the debugger line runs dtp is

How to valid date format dd.MM.yyyy KENDO MVC

本秂侑毒 提交于 2020-01-06 02:43:10
问题 I have problem with validation this date format in kedno UI: dd.MM.yyyy For my culture (CS-CZ) kendo use this pattern: d. M. yyyy , but mostly used is format dd.MM.yyyy . I tried everything but no success yet :/ My model: public DateTime? ExpirationDate { get; set; } My kendo form: <div class="form-group"> @Html.LabelFor(model => model.ExpirationDate, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> <div class="checkbox"> @(Html.Kendo().DatePickerFor(model =>

DatePicker format issue

北战南征 提交于 2019-12-08 00:06:51
问题 I'm trying to use Kendo UI DatePicker @(Html.Kendo().DatePickerFor(model => model.CalledInAt).Format("dd/MM/yyyy HH:mm tt").Value(DateTime.Now).HtmlAttributes(new { @style = "width:205px" })) I'm using ASP.NET MVC 4 with entity framework. when i try to submit a form it gives me the error. "The value '19/09/2013 04:08 AM' is not valid for CalledInAt" If i change the format to dd/MM/yyyy then it works. something like below works. @(Html.Kendo().DatePickerFor(model => model.CalledInAt).Format(

Kendo Grid inline edit with Datetime DatePickerFor

久未见 提交于 2019-12-07 18:26:11
问题 kendo inline cell edit not support for datetime format. I need "dd/MMM/yyyy" data format but kendo grid shows "the filed date must be a date" error. can you please advice me to what to do 回答1: You can use a custom editor to do this. References: Grid Custom Editing DatePicker.format Date Formatting The code would look something like this (not tested, but it should be close enough to give you the right idea): var customDateEditor = function (container, options) { $('<input />') .appendTo

Kendo Grid inline edit with Datetime DatePickerFor

ぐ巨炮叔叔 提交于 2019-12-06 06:24:24
kendo inline cell edit not support for datetime format. I need "dd/MMM/yyyy" data format but kendo grid shows "the filed date must be a date" error. can you please advice me to what to do You can use a custom editor to do this. References: Grid Custom Editing DatePicker.format Date Formatting The code would look something like this (not tested, but it should be close enough to give you the right idea): var customDateEditor = function (container, options) { $('<input />') .appendTo(container) .kendoDatePicker({ format: "dd/MMM/yyyy" }); }; $("#grid").kendoGrid({ ... columns:[ { field: "myDate",

KendoUI DateTimePicker undefined on document.ready

我与影子孤独终老i 提交于 2019-12-01 09:17:38
I have a Kendo DateTimePicker control in an mvc (asp.net) partial view that I am trying to access from document.ready(): @(Html.Kendo().DateTimePickerFor(vvm => vvm.StartTime) .Name("dtpVisitStart") .Format("yyyy/MM/dd HH:mm tt") .TimeFormat("HH:mm:tt") .Events(e => e.Change("dtpVisitStart_Change") ) ) The javascript: $(document).ready(function () { TestDTP(); }); function TestDTP() { var dtp = $("#dtpVisitStart").getKendoDateTimePicker(); debugger; } When the debugger line runs dtp is undefined. How can I initialize this date time picker when the partial view loads? Your original approach