future hold request followup 4 - date controls

Fixed the calendar control for selecting the request
date in staff and OPAC so that user can explicitly
select current date and all days in the future.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Galen Charlton 2009-08-11 19:21:36 -04:00
parent 7242939cf4
commit d5da1cace0
2 changed files with 13 additions and 9 deletions

View file

@ -291,9 +291,10 @@ function checkMultiHold() {
//<![CDATA[
function validate1(date) {
var today = new Date();
if ( date < today ) {
return false;
} else if ( date.getDate() == today.getDate() && date.getMonth() == today.getMonth() && date.getFullYear() == today.getFullYear() ) {
if ( (date > today) ||
( date.getDate() == today.getDate() &&
date.getMonth() == today.getMonth() &&
date.getFullYear() == today.getFullYear() ) ) {
return false;
} else {
return true;

View file

@ -316,12 +316,15 @@
document.getElementById("reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->").parentNode.appendChild( cal_img );
function validate<!-- TMPL_VAR NAME="biblionumber" -->(date) {
var today = new Date();
if ( date < today ) {
return true;
} else {
return false;
}
var today = new Date();
if ( (date > today) ||
( date.getDate() == today.getDate() &&
date.getMonth() == today.getMonth() &&
date.getFullYear() == today.getFullYear() ) ) {
return false;
} else {
return true;
}
};
Calendar.setup(
{