spring使用jquery的datebox

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

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

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

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

$("#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'/>"+"无节次");
 }
});
}
});

ui

相关文章
相关标签/搜索