【问题标题】:Materialize datepicker looking odd in Meteor在 Meteor 中实现日期选择器看起来很奇怪
【发布时间】:2016-09-01 16:14:49
【问题描述】:

使用 Meteor 中的 Materialize 包 (materialize:materialize) 我正在使用日期选择器,它会在左侧显示一些日期。

在页面渲染上我有:

Template.clientEntry.onRendered(function() {
  $('select').material_select();
  $('.datepicker').pickadate({
    selectMonths: true, // Creates a dropdown to control month
    selectYears: 40 // Creates a dropdown of 15 years to control year
  });
});

HTML:

<div class="input-field col s2">
     <label class="active">Birth Date</label>
     <input type="date" class="datepicker" id="birthdate-demo">
</div>

单击该字段时,它呈现如下。它运行良好,但看起来并不好。我做错了什么?

【问题讨论】:

    标签: meteor materialize


    【解决方案1】:

    原来我默认在 CSS 中对表格行进行编号。日期选择器上的日历必须是一个表格,因此它试图对每一行进行编号。我无法更改 Meteor 中日期选择器上的 CSS,因此我必须将所有表重构为默认不编号,并添加一个类来为它们编号。

    【讨论】:

      猜你喜欢
      • 2018-08-29
      • 2014-04-21
      • 2012-11-03
      • 2019-09-24
      • 1970-01-01
      • 2021-07-02
      • 1970-01-01
      • 2013-09-20
      • 2016-03-02
      相关资源
      最近更新 更多