我目前正在使用aldeed:autoform-bs-datepicker
和rajit:bootstrap3-datepicker
。我想将日期范围限制为年和月。我已经在助手中尝试过,但它不起作用。有什么想法吗?
Template.user.helpers({
datePicker: function() {
$("#datepicker").datepicker( {
format: "mm/yyyy",
startView: "months",
minViewMode: "months"
});
}
});
路径:Schema.js
Schema.Date = new SimpleSchema({
startDate: {
type: Date,
optional: true,
autoform: {
type: "bootstrap-datepicker",
"data-date-autoclose": "true"
}
}
});