从时间开始(2)--AES系统按时间搜索文档javaScript(kendoUI)

 

 

 

/开始时间
		 var start =$("#personal_attendance_statistics_collect_index_search_beginTime").kendoDatePicker({
			change: startChange
		}).data("kendoDatePicker");	
		
		//结束时间
		 var end =$("#personal_attendance_statistics_collect_index_search_endTime").kendoDatePicker({
			 change: endChange
		 }).data("kendoDatePicker");
		
		 function startChange(){
			 var startDate = start.value();
	         if (startDate) {
	             startDate = new Date(startDate);
	             startDate.setDate(startDate.getDate() + 1);
	             end.min(startDate);
	         }
		};
		
		function endChange(){
			 var endDate = end.value();
	         if (endDate) {
	             endDate = new Date(endDate);
	             endDate.setDate(endDate.getDate() - 1);
	             start.max(endDate);
	         }
		};

//考核年度下拉列表
		var statistics_meeting_year= (new Date()).getFullYear();
		$("#statistics_meeting_year").kendoDropDownList({
			dataTextField : "text",
			dataValueField : "value",
			optionLabel:{
				text:statistics_meeting_year,
				value:statistics_meeting_year
    		},
			dataSource : [ { text: "--请选择--", value: "" },
			               {
					text : statistics_meeting_year,
					value : statistics_meeting_year
				}, {
					text : statistics_meeting_year-1,
					value : statistics_meeting_year-1
				} , {
					text : statistics_meeting_year-2,
					value : statistics_meeting_year-2
			} ]
		});

$("#meeting_record_submission").kendoDropDownList({
            dataTextField: "text",
            dataValueField: "value",
            dataSource: [
                         { text: "--请选择--", value: "" },
                         { text: "未提交", value: "0" },
                         { text: "未归档", value: "1" },
                         { text: "已归档", value: "2" }
                     ]
  });


会议时间:
columns: ["meetingName",
			  {
			   field:"meetingTime",
			   title:"会议时间",
			   template:'#=LY.attendence_holiday_meeting_info_index.FormatMeetingTime(meetingTime)#'
			   }
			  ,"meetingAddr",
			  "meetingNum",
			  "actualNum",
			  "attendenceDeptNum",
			  {
				field:"operating",
				title:"操作"	,
				template: kendo.template($("#attendence_holiday_meeting_info_index_operate_template").html())
		}]

//JS函数
this.FormatMeetingTime = function(date){
		var dt = new Date();  
		dt.setTime(date);
		var yyyy = dt.getFullYear();  
		var MM = dt.getMonth() + 1;  
		var dd = dt.getDate();  
		var HH = dt.getHours();  
		var mm = dt.getMinutes();  
		time = yyyy+"-"+(MM<10?"0"+MM:MM)+"-"+(dd<10?"0"+dd:dd)+" "+(HH<10?"0"+HH:HH)+":"+(mm<10?"0"+mm:mm);
		return time;
	};


jstl标签

<fmt:formatDate value="${actionBean.appDataMap.graduationTime}" pattern="yyyy-MM-dd" />

<td class="k-wt-title"><font color="red">*</font>离校时间</td>
<td class="k-wt-content">
<input type="text" maxlength="40" name="appDataMap.leaveTime"  value="${actionBean.appDataMap.leaveTime}" pattern="^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$" required validationMessage="请选择离校时间" maxlength="0"/>
	<span data-for="appDataMap.leaveTime" class="k-invalid-msg"></span>
</td>

注意:
要求${date}为date类型
如果为String 就用<td align="center"><script>document.write("${l.inputDate}".substring(0, 10));</script></td>



   

你可能感兴趣的:(从时间开始(2)--AES系统按时间搜索文档javaScript(kendoUI))