[英]How to fix 'dtp.setDate' error in Meteor AutoForm datetimepicker?
I'm trying to use this AutoForm package, but as I was trying their own code this error came out. 我正在尝试使用此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)
What I have is, a template just displaying the quick form: 我所拥有的是一个仅显示快速表单的模板:
<template name="test">
<h1>Autoform test</h1>
{{> quickForm collection="Tests" id="insertTest" type="insert"}}
</template>
With a simple schema test also: 通过简单的模式测试:
Tests = new Mongo.Collection("tests");
TestsSchema = new SimpleSchema({
typeTest: {
type: Date,
optional: true,
autoform: {
afFieldInput: {
type: "bootstrap-datetimepicker"
}
}
}
});
Tests.attachSchema(TestsSchema);
I've followed the instructions given at this page , and added aldeed:autoform-bs-datetimepicker
and tsega:bootstrap3-datetimepicker
to my Meteor project. 我已按照本页上的说明进行操作,并将
aldeed:autoform-bs-datetimepicker
和tsega:bootstrap3-datetimepicker
到了Meteor项目中。
This is a known issue in the 4.xx release. 这是4.xx版本中的一个已知问题 。 You can fix this error by downgrading to version 3.1.3_3.
您可以通过降级到3.1.3_3版本来解决此错误。
To install the tsega:bootstrap3-datetimepicker
package with version 3.1.3_3, run the following command: 要安装版本3.1.3_3的
tsega:bootstrap3-datetimepicker
软件包,请运行以下命令:
meteor add tsega:bootstrap3-datetimepicker@=3.1.3_3
You probably also want to install the twbs:bootstrap
package in order to get full Bootstrap support. 您可能还想安装
twbs:bootstrap
软件包,以获得完整的Bootstrap支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.