forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
8 years ago
|
/**
|
||
|
* Created by Dailer on 2017/7/11.
|
||
|
*/
|
||
|
Demo.Date = BI.inherit(BI.Widget, {
|
||
|
props: {
|
||
|
baseCls: "demo-date"
|
||
|
},
|
||
|
|
||
|
_init: function () {
|
||
|
Demo.Date.superclass._init.apply(this, arguments);
|
||
|
},
|
||
|
|
||
|
render: function () {
|
||
8 years ago
|
var self = this;
|
||
8 years ago
|
return {
|
||
|
type: "bi.horizontal_auto",
|
||
|
vgap: 10,
|
||
|
items: [{
|
||
7 years ago
|
type: "bi.multidate_combo",
|
||
8 years ago
|
ref: function () {
|
||
|
self.datecombo = this;
|
||
|
},
|
||
8 years ago
|
width: 300
|
||
|
}, {
|
||
|
type: "bi.button",
|
||
8 years ago
|
text: "getVlaue",
|
||
8 years ago
|
width: 300,
|
||
|
handler: function () {
|
||
|
BI.Msg.alert("date", JSON.stringify(self.datecombo.getValue()));
|
||
|
}
|
||
|
}, {
|
||
|
type: "bi.button",
|
||
|
text: "setVlaue '2017-12-31'",
|
||
|
width: 300,
|
||
|
handler: function () {
|
||
|
self.datecombo.setValue({
|
||
|
year: 2017,
|
||
|
month: 11,
|
||
|
day: 31
|
||
|
})
|
||
|
}
|
||
8 years ago
|
}]
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
|
||
7 years ago
|
BI.shortcut("demo.multidate_combo", Demo.Date);
|