单击addon按钮时,datepicker值变得清晰

时间:2016-04-27 10:22:17

标签: meteor meteor-autoform eonasdan-datetimepicker

enter image description here这是simpleschema定义中使用的代码。我试图在我的项目中使用类似的代码但是你可以看到它没有用。

{ 
  items:{ 
    type: Array, 
    optional: true,
    minCount: 0,
    maxCount: 5 
  }, 
  "items.$": {
    type: Object, 
    optional: true
  },
  "items.$.name": {
    type: Date,
    optional: true, 
    autoform: {
      afFieldInput: { 
        type: "bootstrap-datetimepicker" 
      } 
    } 
  } 
}

1 个答案:

答案 0 :(得分:0)

由于autoform-datetimepicker Api。

中存在一些错误,我遇到了这个问题

我在autoform-bs-datepicker.js

下添加了以下代码行

`

this.autorun(function () {
var data = Template.currentData(); 

**if(!data.value)      
  data.value=$('#'+data.atts.id).val();**`
相关问题