Ignore:
Timestamp:
Sep 23, 2011, 12:32:49 PM (10 years ago)
Author:
Martin Svensson
Message:

References #317. Date-check is now done properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/specimentube.jsp

    r1390 r1397  
    366366      return;
    367367    }   
    368     if (todaysDate < new Date(samplingDate.substring(0,4),(samplingDate.substring(4,6)-1), samplingDate.substring(6)) )
     368    if (todaysDate < new Date(samplingDate.substring(0,4),new Number(samplingDate.substring(4,6)-1), samplingDate.substring(6)) )
    369369    {
    370370      setInputStatus('samplingDate', 'Future date is not valid', 'invalid');
     
    583583      return;
    584584    }
    585     if (todaysDate < new Date(rnaLaterDate.substring(0,4),(rnaLaterDate.substring(4,6)-1), rnaLaterDate.substring(6)) )
     585    if (todaysDate < new Date(rnaLaterDate.substring(0,4),new Number(rnaLaterDate.substring(4,6)-1), rnaLaterDate.substring(6)) )
    586586    {
    587587      setInputStatus('rnaLaterDate', 'Future date is not valid', 'invalid');
     
    628628      return;
    629629    }
    630     if (todaysDate < new Date(arrivalDate.substring(0,4), arrivalDate.substring(4,6), arrivalDate.substring(6)))
     630    if (todaysDate < new Date(arrivalDate.substring(0,4), new Number(arrivalDate.substring(4,6))-1, arrivalDate.substring(6)))
    631631    {
    632632      setInputStatus('arrivalDate', 'Future dates are not valid','invalid');
Note: See TracChangeset for help on using the changeset viewer.