This section describes how to use js to determine whether a date can be queried across months. For more information, see
Function checkDate (startDate, endDate, num, flag) {if (startDate = null | endDate = null) {popwin.info ('hprompt ', 'date cannot be blank '); return false;} if (startDate = ''| endDate ='') {popwin.info ('hprompt ', 'enter query date'); return false ;} var start_date = startDate + "00:00"; var end_date = endDate + "00:00"; start_date = new Date (start_date.replace (/-/g ,"/")); end_date = new Date (end_date.replace (/-/g ,"/")); If (start_date> end_date) {popwin.info ('hprompt ', 'end date cannot be earlier than start date'); return false ;} // obtain the Date var currentDate = new Date (); currentDate after num. setDate (currentDate. getDate () + num); if (end_date> currentDate) {popwin.info ('hprompt ', 'end date cannot be greater than' + num + 'date after Day '); return false;} // determine whether to query the cross-month if (flag = false) {if (start_date.getMonth ()! = End_date.getMonth () {popwin.info ('hprompt ', 'this query does not support cross-month query'); return false ;}}}