Ignore:
Timestamp:
Dec 4, 2012, 10:34:30 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #437: Rules for comparing 'sampling date' and 'RNA later' date should be the same

File:
1 edited

Legend:

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

    r1767 r1768  
    453453  {
    454454    var samplingTimestamp = Dates.parseString(frm.samplingDate.value + ' ' + frm.samplingTime.value, 'yyyyMMdd Hmm');
    455     if (samplingTimestamp && rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
    456     {
    457       setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'warning');
     455    if (samplingTimestamp)
     456    {
     457      if (rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
     458      {
     459        setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'warning');
     460      }
     461      else if (rnaLaterTimestamp.getTime() < samplingTimestamp.getTime())
     462      {
     463        setInputStatus('rnaLaterDate', 'RNA later time is before Sampling time', 'warning');
     464      }
    458465    }
    459466  }
Note: See TracChangeset for help on using the changeset viewer.