我正在尝试使用这个AutoForm包,但是当我尝试他们自己的代码时,这个错误出现了。
TypeError: dtp.setDate is not a function
at null.<anonymous> (aldeed_autoform-bs-datetimepicker.js:141)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:457)
at view.js:197
at Object.Blaze._withCurrentView (view.js:538)
at viewAutorun (view.js:196)
at Tracker.Computation._compute (tracker.js:323)
at new Tracker.Computation (tracker.js:211)
at Object.Tracker.autorun (tracker.js:562)
at Blaze.View.autorun (view.js:209)我拥有的是一个只显示快速表单的模板:
<template name="test">
<h1>Autoform test</h1>
{{> quickForm collection="Tests" id="insertTest" type="insert"}}
</template>通过简单的模式测试,还可以:
Tests = new Mongo.Collection("tests");
TestsSchema = new SimpleSchema({
typeTest: {
type: Date,
optional: true,
autoform: {
afFieldInput: {
type: "bootstrap-datetimepicker"
}
}
}
});
Tests.attachSchema(TestsSchema);我遵循了此页给出的指示,并将aldeed:autoform-bs-datetimepicker和tsega:bootstrap3-datetimepicker添加到了Meteor项目中。
发布于 2015-12-31 14:47:51
这是4.x.x发行版中的已知问题。您可以通过降级到3.1.3_3版本来修复此错误。
若要使用版本tsega:bootstrap3-datetime选择器安装3.1.3_3包,请运行以下命令:
meteor add tsega:bootstrap3-datetimepicker@=3.1.3_3 您可能还希望安装twbs:引导包以获得完全的引导支持。
https://stackoverflow.com/questions/34520366
复制相似问题