简洁的jQuery日历签到插件

所属分类:输入-日期和时间

 14402  45  查看评论 (1)
分享到微信朋友圈
X
简洁的jQuery日历签到插件 ie兼容12

更新时间: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);
相关插件-日期和时间

jQuery多功能秒表闹钟计时器插件

jQuery多功能秒表闹钟计时器插件
  日期和时间
 56099  355

jQuery移动端时间选择插件

jQuery移动端滑动选择时间插件
  日期和时间
 35232  347

时间日期控件(兼容ie6)

支持时间日期选取,兼容IE6及以上版本
  日期和时间
 68155  362

精美js日期选择器,js省市选择器

小巧的js日期选择器。 一个精美的js日期选择器。
  日期和时间
 40852  349

讨论这个项目(1)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    忧心忡忡的猪 0
    2024/1/18 0:52:18
    压根没有任何意义,要做判断,只有当前的日期可签。这里的插件都是拍脑袋就传上来的,基本都是管杀不管埋的 回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复