Kendo Date Picker selection by class name with JQuery

2 posts, 0 answers
  1. Richard
    Richard avatar
    9 posts
    Member since:
    Jun 2016

    Posted 22 Mar 2017 Link to this post

    How do i get the value of a Kendo Date Picker by class name. The reason being is because im using the name and id attributes for something else. As you can see below the class attribute is dynamic. Every other time ive selected a Kendo Date Picker, i've always used the ID attribute. Is it possible to select by class attribute?

                  .Name("SurveyResponse.DateRes[" + @guid + "].Date")
                  .HtmlAttributes(new {
                           onkeydown = "javascript:return false;",
                           onblur = "ConditionalTextBox(" + @item.SurveyQuestionID + ",'datecontrol')",
                           @placeholder = "Your answer",
                           @required = "required",
                           @class = "IsConditionalTextBox_" + @item.SurveyQuestionID
  2. Konstantin Dikov
    Konstantin Dikov avatar
    2219 posts

    Posted 24 Mar 2017 Link to this post

    Hello Richard,

    It is not mandatory to use the ID of the input element when you need to get reference to the API of the widget and you can use any selector that will find the corresponding INPUT element. Here is a simple example with custom class name:

    Please feel free to contact us again if other questions arise on this matter.

    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top