Kendo DatePickerFor issue in CHROME version 56.0.2924

戏子无情 提交于 2019-12-01 08:07:53

问题


I am using Kendo DatePickerFor.

After I recently updated my chrome browser, it shows blank value in date picker control.

I am using it for month selection with MMM yyyy format.

Can anybody please help me out?

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"))

回答1:


This fixed the problem for me: http://www.telerik.com/forums/date-field-not-rendering-correct-in-browsers-that-support-html-5

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" })
)


来源:https://stackoverflow.com/questions/42082886/kendo-datepickerfor-issue-in-chrome-version-56-0-2924

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!