|
@@ -389,9 +389,9 @@ $(function () {
|
|
|
|
|
|
|
|
|
window.loadCalendar = function(params = {}){
|
|
|
- let { data,cellCb=()=>{},monthCb=()=>{} } = params
|
|
|
+
|
|
|
+ let { data,cellCb=()=>{},yearSelect=()=>{},monthCb=()=>{} } = params
|
|
|
//日历方法
|
|
|
-
|
|
|
$("#calendar").calendar({
|
|
|
data: data, //记录数据
|
|
|
work: [],//上班时间
|
|
@@ -402,10 +402,13 @@ $(function () {
|
|
|
let item = data[0]
|
|
|
cellCb(item)
|
|
|
},
|
|
|
+ yearSelect: function (yearText) {
|
|
|
+ yearSelect(yearText)
|
|
|
+ },
|
|
|
monthClick: function (e, nextMonth, opts, me) {
|
|
|
- monthCb(e)
|
|
|
+ monthCb(nextMonth)
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
window.loadCalendar({
|
|
@@ -416,7 +419,14 @@ $(function () {
|
|
|
//点击日期时间
|
|
|
cellCb: (item)=> {
|
|
|
console.log(item);
|
|
|
+ },
|
|
|
+ yearSelect: (yearText)=> {
|
|
|
+ console.log(yearText);
|
|
|
+ },
|
|
|
+ monthCb: (nextMonth)=> {
|
|
|
+ console.log(nextMonth);
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
|
|
|
/*loadMonitor({
|