2016-04-27 22 views
1

enter image description here這裏是在simpleschema definition中使用的代碼。我嘗試在我的項目中使用類似的代碼,但正如您所看到的,它不工作。當點擊插件按鈕時,datepicker的值變得越來越明確

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

回答

0

我正面臨這個問題,因爲autoform-datetimepicker Api中存在一些bug。

我添加以下代碼行autoform-bs-datepicker.js

`

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

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