单击插件按钮时日期选择器值变得清晰

datepicker value is getting clear when addon button is clicked

这是 simpleschema 中使用的代码 definition.I 尝试在我的项目中使用类似的代码,但如您所见,它不起作用。

{ 
  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" 
      } 
    } 
  } 
}

由于 autoform-datetimepicker Api.

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

我在autoform-bs-datepicker.js

下添加了下面这行代码

`

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

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