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>
//<![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;
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(
{