Kendo DatePickerFor 问题在 CHROME 版本 56.0.2924 [英] Kendo DatePickerFor issue in CHROME version 56.0.2924
问题描述
我正在使用 Kendo DatePickerFor
.
我最近更新了 Chrome 浏览器后,它在日期选择器控件中显示空白值.
After I recently updated my chrome browser, it shows blank value in date picker control.
我将它用于 MMM yyyy
格式的月份选择.
I am using it for month selection with MMM yyyy
format.
有人可以帮我吗?
附言- 我之前的 chrome 版本是 55.0.2883
,它运行得非常好.
P.S. - My previous chrome version was 55.0.2883
and it was working perfectly fine.
我在视图文件中的代码是:
My code in view file is:
@(Html.Kendo().DatePickerFor(m => m.FromDate).Start(CalendarView.Year).Depth(CalendarView.Year).Format("MMM yyyy"))
推荐答案
这为我解决了这个问题:http://www.telerik.com/forums/date-field-not-rendering-correct-in-browsers-that-support-html-5
This fixed the problem for me: http://www.telerik.com/forums/date-field-not-rendering-correct-in-browsers-that-support-html-5
一些原生支持日期"类型的浏览器(特别是 Chrome)会验证设置的值,如果它的格式不正确([RFC 3339] 中定义的有效完整日期),那么它会被忽略.现在,您可以将输入的类型永久更改为文本",并避免与本机输入相关的任何问题
Some browsers with native support for "date" type (Chrome in particular) validate the set value and if it is not in the correct format (a valid full-date as defined in [RFC 3339]) then it is ignored. For now you can change the type the input to "text" permanently and avoid any issues related with the native inputs
@(Html.Kendo().DatePicker()
.Name("datepicker")
.Value("10/10/2011")
.HtmlAttributes(new { type = "text" })
)
这篇关于Kendo DatePickerFor 问题在 CHROME 版本 56.0.2924的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!