- <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="CalendarDueDate" style="cursor: pointer;" />
- <script language="JavaScript" type="text/javascript">
- //<![CDATA[
- function validate1(date) {
- var today = new Date();
- if ( date < today ) {
- return true;
- } else {
- return false;
- }
- };
- function refocus(calendar) {
- $('#barcode').focus();
- calendar.hide();
- };
- //#TODO - ADD syspref (AllowPostDatedCheckouts).
- Calendar.setup(
- {
- inputField : "duedatespec",
- ifFormat : "[% DHTMLcalendar_dateformat %]",
- button : "CalendarDueDate",
-// disableFunc : validate1,
-// dateStatusFunc : validate1,
- onClose : refocus
- }
- );
- //]]>
- </script>
-