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:
parent
7242939cf4
commit
d5da1cace0
2 changed files with 13 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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(
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue