2

In continuation with the question Kendo UI datepicker incompatible with Chrome 56, I want to set type = "text" property to HtmlAttributes of KendoUI datepicker controls in my project.

The number of controls are more and I cannot set one by one.

Is there a way to set it globally in a project without using a template? We have not used kendo template for datepicker.

@(Html.Kendo().DatePicker()
.Name("datepicker")
.Value("10/10/2011")
.HtmlAttributes(new { type = "text" }))
Community
  • 1
  • 1
Partha
  • 87
  • 1
  • 6

1 Answers1

4

To apply globally with less effort you can make use of jQuery.

jQuery code

$(function(){ 
    $('.k-datepicker input').attr('type','text');
});

Call this jQuery either on layout page or common.js (if any).

Suprabhat Biswal
  • 3,033
  • 1
  • 21
  • 29