日历签到html模板,简洁的jQuery日历签到插件

66c4a06b4b57cbc02267e95248876c51.png

5b4b944461607cc871b1911f9854541f.png

插件描述:jQuery简洁的日历签到插件 采用div+css3设计日历,POST提交签到,jQuery日历签到表,日期签到表,能每日签到打勾的日历。

更新时间:2021-05-10 01:37:44//当前日历显示的年份

showYear:2021,

//当前日历显示的月份

showMonth:5,

//当前日历显示的天数

showDays:6,

eventName:"load",

//初始化日历

init: function(signList) {

calUtil.setMonthAndDay();

calUtil.draw(signList);

calUtil.bindEnvent();

}, draw: function(signList) {

//绑定日历

var str = calUtil.drawCal(calUtil.showYear, calUtil.showMonth, signList);

$("#calendar").html(str);

//绑定日历表头

var calendarName = calUtil.showYear + "年" + calUtil.showMonth + "月";

$(".calendar_month_span").html(calendarName);

},

//获取当前选择的年月

setMonthAndDay: function() {

switch (calUtil.eventName) {

case "load":

var current = new Date();

calUtil.showYear = current.getFullYear();

calUtil.showMonth = current.getMonth() + 1;

break;

case "prev":

var nowMonth = $(".calendar_month_span").html().split("年")[1].split("月")[0];

calUtil.showMonth = parseInt(nowMonth) - 1;

if (calUtil.showMonth == 0) {

calUtil.showMonth = 12;

calUtil.showYear -= 1;

}

break;

case "next":

var nowMonth = $(".calendar_month_span").html().split("年")[1].split("月")[0];

calUtil.showMonth = parseInt(nowMonth) + 1;

if (calUtil.showMonth == 13) {

calUtil.showMonth = 1;

calUtil.showYear += 1;

}

break;

}

},

//ajax获取日历json数据

var signList = [{

"signDay": "09"

}, {

"signDay": "11"

}, {

"signDay": "12"

}, {

"signDay": "13"

}];

calUtil.init(signList);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值