dijit/form/DateTextBoxを拡張してカスタムウィジェットを作成し、次のエラーが表示される:エラー: 'GilCnPluginDojo.util.CustomDateTextBox'のコンストラクタを解決できない何が起こっているのか?何か間違って見ることはできません。これは私のコードです:dojoのエラー1.9カスタムウィジェットを拡張するdijit/form/DateTextBox
require(["dojo/ready",
"dojo/parser",
"dijit/form/DateTextBox",
"dojo/_base/declare",
"dijit/registry"],
function(ready, parser, DateTextBox, declare, registry) {
declare("GilCnPluginDojo.util.CustomDateTextBox", [DateTextBox], {
postCreate: function() {
this.inherited(arguments);
this.set('constraints', {
min: '01/01/1950',
max: new Date(),
datePattern: 'MM/dd/yyyy'
});
}
});
};
'return'はdeclare''の前に欠けています。 'return declare(" GilCnPluginDojo.util.CustomDateTextBox "...'。 – Himanshu
あなたは 'CustomDateTextBox.js'のようなsignleファイルにこのコードを書いています –
あなたに助けを借りていただきありがとうございます。しかし、 barbsanは私にこの問題を解決するのを助けた。 –