【问题标题】:Change icon class of Kendo Date Picker Jquery更改 Kendo Date Picker Jquery 的图标类
【发布时间】:2019-10-18 08:43:57
【问题描述】:

我正在尝试使用剑道 Jquery 日期选择器。

我同样推荐https://docs.telerik.com/kendo-ui/controls/editors/datepicker/overview.html

但我想使用 k-i-calendar-date 类而不是默认的 k-i-calendar 类。但我无法改变。

图标:https://docs.telerik.com/kendo-ui/styles-and-layout/icons-web

https://docs.telerik.com/kendo-ui/api/javascript/ui/button/configuration/iconclass 在这个例子中它讨论了改变默认图标类。

$("#button").kendoButton({
    iconClass: "fa fa-male"
});

我尝试对我的日期选择器使用相同的方法,但它不起作用。

kendo.jQuery("#ang_layout1_asof_sdate").kendoDatePicker({
          format: this.inqService.userPref_dateFormat,
          change: this.onChangedatePicker.bind(this),
          value : new Date(this.dateDropDowndefaultItem.DATE_1),
          iconClass: "k-icon k-i-calendar-date"
      });

谁能帮帮我。谢谢

【问题讨论】:

    标签: jquery kendo-ui


    【解决方案1】:

    kendoDatePicker 小部件不提供“iconClass”属性。您可以在实例化小部件后通过调用更改图标:

    $("span.k-i-calendar").removeClass("k-i-calendar-calendar").addClass("k-i-calendar-date");
    

    【讨论】:

      【解决方案2】:
      $(".k-icon").removeClass("k-i-calendar");
      $(".k-icon").addClass('k-i-calendar-date');
      

      $(".k-icon").removeClass("k-i-calendar").addClass('k-i-calendar-date');
      

      https://dojo.telerik.com/aViqocOT

      【讨论】:

        猜你喜欢
        • 2023-02-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-10-27
        • 1970-01-01
        • 1970-01-01
        • 2023-01-04
        相关资源
        最近更新 更多