fineui是帆软报表和BI产品线所使用的前端框架。
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.

52 lines
1.7 KiB

Demo.DatePane = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-datepane"
},
render: function () {
7 years ago
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.label",
cls: "layout-bg2",
text: "bi.date_pane_widget"
}, {
type: "bi.date_pane_widget",
selectedTime: {
year: 2017,
month: 12,
day: 11
},
7 years ago
ref: function (_ref) {
self.datepane = _ref;
},
height: 300
},
{
type: "bi.button",
text: "getValue",
handler: function () {
7 years ago
BI.Msg.toast("date" + JSON.stringify(self.datepane.getValue()));
}
}, {
type: "bi.button",
text: "setVlaue '2017-12-31'",
handler: function () {
self.datepane.setValue({
year: 2017,
month: 11,
day: 31
})
}
}
],
width: "50%"
}]
}
}
})
7 years ago
BI.shortcut("demo.date_pane_widget", Demo.DatePane);