可配置自定义日期多级联动

来源:互联网 发布:nginx禁止ip直接访问 编辑:程序博客网 时间:2024/05/12 10:12

插件下载:  点击 data.js下载

基于jquery时间联动控件.里面已对闰年日期做了判断,可自定义年份操作ID,开始时间,结束时间,默认显示时间在这里主要贴一下调用代码:

HTML代码:

<select name="helperYear" id="BBC_yearId"></select>年  ame="helperMonth" id="BBC_monthId"> </select>月  <select name="helperMonth" id="BBC_dayId"> </select>日 

    $(document).ready(function(){          var objOption = {                  operaterDom:bbc.getDateList, //操作函数名                  yearOjb:{                      yearId: 'BBC_yearId',  //操作年份ID                      yearStart: 1991,       //年份开始时间                      yearEnd: 2013,          //年份结束时间                      defaultYear: 2012       //默认当前显示年份                                        },                  monthOjb:{                      monthId: 'BBC_monthId',  //操作月份ID                      defaultMonth: '06'          //默认月份                  },                  dayOjb:{                      dayId: 'BBC_dayId',          //天ID                      defaultDay: '05'             //默认天                  }          }          bbc.getDateList.createListHtml(objOption);      });  //如果不用显示天,可直接把dayOjb整一块去掉,代码如下:     $(document).ready(function(){          var objOption = {                  operaterDom:bbc.getDateList, //操作函数名                  yearOjb:{                      yearId: 'BBC_yearId',  //操作年份ID                      yearStart: 1991,       //年份开始时间                      yearEnd: 2013,          //年份结束时间                      defaultYear: 2012       //默认当前显示年份                                        },                  monthOjb:{                      monthId: 'BBC_monthId',  //操作月份ID                      defaultMonth: '06'          //默认月份                  }          }          bbc.getDateList.createListHtml(objOption);      });      </script>  




转载自:第九街-PHP[http://www.9streets.cn/]
本文链接地址:http://www.9streets.cn/art-php-572.html


0 0