Menu

#4461 formbcar2007pg1.jsp LMP to EDD Calculation issue

OSCAR Main Trunk
open
nobody
None
3
2016-11-02
2016-11-02
No

OSCAR build date: 2015-08-22 18:00:00
OSCAR build tag: OSCAR 12.1 build 536
Client browser: Firefox 17 ESR
Client OS: OSX/Windows

Preconditions:
On the 31st of any month, when enterring an LMP in any month that does not have 31 days, the EDD will be miscalculared on the formbcar2007pg1.jsp.

Steps to reproduce:
Set the date on your server to the 31st of any month, set the date of the LMP on the ar2007 form to anything on a month with less than 31 days and it will give the incorrect EDD when double clicking in that field to calculate.

Solution:
In jsp file /form/formbcar2007pg1.jsp:
calByLMP() function instantiates a date with new Date() and then sets a Year, month, date. It should instantiate the date via:
var calDate=new Date(yyyy,mm,dd);
and not set the year, month, date separately.

Discussion

MongoDB Logo MongoDB