Widget:VisitSchedulerRedux: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 85: | Line 85: | ||
errorFlag = true; | errorFlag = true; | ||
$("#visit-1").css("border", "3px solid red"); | $("#visit-1").css("border", "3px solid red"); | ||
$("#visit-1").addClass("invalid"); | |||
} | } | ||
if((new Date($("#visit-2").val()).getTime() - new Date($("#visit-1").val()).getTime()) > (24*60*60*1000*30)){ | if((new Date($("#visit-2").val()).getTime() - new Date($("#visit-1").val()).getTime()) > (24*60*60*1000*30)){ | ||
errorFlag = true; | errorFlag = true; | ||
$("#visit-2").css("border", "3px solid red"); | $("#visit-2").css("border", "3px solid red"); | ||
$("#visit-2").addClass("invalid"); | |||
} | |||
if((new Date($("#visit-3").val()).getTime() - new Date($("#visit-1").val()).getTime()) > (24*60*60*1000*30)){ | if((new Date($("#visit-3").val()).getTime() - new Date($("#visit-1").val()).getTime()) > (24*60*60*1000*30)){ | ||
errorFlag = true; | errorFlag = true; | ||
$("#visit-3").css("border", "3px solid red"); | $("#visit-3").css("border", "3px solid red"); | ||
$("#visit-3").addClass("invalid"); | |||
} | } | ||
if((new Date($("#visit-4").val()).getTime() - new Date($("#visit-1").val()).getTime()) > (24*60*60*1000*30)){ | if((new Date($("#visit-4").val()).getTime() - new Date($("#visit-1").val()).getTime()) > (24*60*60*1000*30)){ | ||
errorFlag = true; | errorFlag = true; | ||
$("#visit-4").css("border", "3px solid red"); | $("#visit-4").css("border", "3px solid red"); | ||
$("#visit-4").addClass("invalid"); | |||
} | } | ||
if(errorFlag){alert("Visits in red fall out of the 30 day window and infusions may not be scheduled on those dates. For help with this matter, call the AEGIS II Hotline");} | if(errorFlag){alert("Visits in red fall out of the 30 day window and infusions may not be scheduled on those dates. For help with this matter, call the AEGIS II Hotline");} | ||
}; | }; |