spring使用jquery的datebox

每次很害怕使用jquery的datebox,因为datebox有个默认值为null,所以使用required属性对datebox没用,因此,每次遇到datebox时我都会从后台传date值给它,就可以判断是否为空了,例如

<input class="easyui-datebox" id="activity_activityTime" name="activityTime" value=“${date}” style="width:300px;" required="required"/>.

2.在js里面获取datebox的input框的值时,不能使用$("#activity_activityTime").val(),而是使用$("#activity_activityTime").datebox('getValue')。

3.在js里面需要点击datebox填完时间在改变其他输入框的数据时,不能使用$("#activity_activityTime").blur()、$("#activity_activityTime").change()、$("#activity_activityTime").onfocus()等和其他input框使用的函数,而是

$("#appointment_date").datebox({
onSelect: function(date){
var appDate=$("#appointment_date").datebox('getValue');
$("input[type='checkbox']").remove();
$.post('findCourseAppointmentByDate',{date:appDate,idKey:sss},function(data){
 var dataRows=data.rows;
 if(dataRows.length>0){
 $.each(data.rows, function(index,item){
var id=item.id;
        $("#classId").append("<input type='checkbox' name='memo' value='"+item.id+"'/>"+item.className);
         });  
 }else{
 $("#classId").append("<input type='checkbox' name='memo' value='0' checked='checked'/>"+"无节次");
 }
});
}
});

你可能感兴趣的:(spring使用jquery的datebox)