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.

41 lines
1.4 KiB

8 years ago
/**
* Created by Urthur on 2017/7/18.
*/
Demo.CustomDateTime = BI.inherit(BI.Widget, {
7 years ago
props: {},
8 years ago
render: function () {
var self = this;
8 years ago
return {
type: "bi.absolute",
items: [{
el: {
7 years ago
type: "bi.date_time_combo",
listeners: [{
eventName: BI.DateTimeCombo.EVENT_CONFIRM,
action: function () {
var value = this.getValue();
var date = new Date(value.year, value.month - 1, value.day, value.hour, value.minute, value.second);
var dateStr = BI.print(date, "%Y-%X-%d %H:%M:%S");
BI.Msg.alert("日期", dateStr);
7 years ago
}
}, {
eventName: BI.DateTimeCombo.EVENT_CANCEL,
action: function () {
}
}],
value: {
year: 2017,
month: 2,
day: 23,
hour: 12,
minute: 11,
second: 1
}
},
top: 200,
left: 200
}]
8 years ago
};
}
});
7 years ago
BI.shortcut("demo.date_time", Demo.CustomDateTime);