后台使用的mel的模版
学期为空不限制时间;如果选中了2020年的学期,那么日历头部就是2020年1月
页面在js控制,我的步骤
//初始化时候找到要用的组件 lay(moduleId + ' .nyr ').each(function(){ let _this = this, str = _this.className, index = str .lastIndexOf("\ "); str = str .substring(index + 1, str .length); console.log(this) if(str == "startTime"){ $(moduleId + ' .'+str).attr('id', "startTime"); }else { $(moduleId + ' .'+str).attr('id', "endTime"); } });
使用的页面id配合控件的class来生成的,这样做的目的是更好的在后续修改最大最小值;
//初始化时间控件 var start_opt = { elem : '#startTime', type : 'date', isInitValue: false, value:"2020-01-01",