2

我正在使用Kendo DatePickerForKendo DatePickerFor CHROME版本问题56.0.2924

在我最近更新了我的浏览器之后,它在日期选取器控件中显示空白值。我使用MMM yyyy格式的月份选择。

有人能帮我吗?

P.S. - 我以前的Chrome版本是55.0.2883,它工作得很好。

我的视图文件的代码是:

@(Html.Kendo().DatePickerFor(m => m.FromDate).Start(CalendarView.Year).Depth(CalendarView.Year).Format("MMM yyyy")) 
+0

有关的任何问题,可能是相同的问题[这](http://stackoverflow.com/q/41945417/6441048) – Shai

+0

[Kendo UI datepicker与Chrome 56不兼容]的可能重复(http://stackoverflow.com/questions/41945417/kendo-ui-datepicker-incompatible-with-chrome-56) – jrummell

回答

2

这固定我的问题: http://www.telerik.com/forums/date-field-not-rendering-correct-in-browsers-that-support-html-5

与“日期”类型的原生支持某些浏览器(Chrome的特别)验证设置值,如果它的格式不正确([RFC 3339]中定义的有效全日期),则忽略它。现在你可以改变的类型输入到“文本”永久和避免与原输入

@(Html.Kendo().DatePicker() 
    .Name("datepicker") 
    .Value("10/10/2011") 
    .HtmlAttributes(new { type = "text" }) 
) 
+0

它有帮助。谢谢:) –

+0

@ Html.EditorFor(model => model.date,new {HtmlAttributes = new {type =“text”}})。它仍然给出错误 –