dce-reactkit 3.9.8 → 3.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1939,7 +1939,13 @@ const SimpleDateChooser = (props) => {
1939
1939
  }
1940
1940
  const monthName = getMonthName(month).full;
1941
1941
  // Year is start year +1 for each 12 months
1942
- const year = (startYear + (Math.floor(unmoddedMonth / 12)));
1942
+ let yearsToAdd = 0;
1943
+ let monthsOfYearsToAdd = unmoddedMonth;
1944
+ while (monthsOfYearsToAdd > 12) {
1945
+ monthsOfYearsToAdd -= 12;
1946
+ yearsToAdd += 1;
1947
+ }
1948
+ const year = startYear + yearsToAdd;
1943
1949
  // Figure out which days are allowed
1944
1950
  const days = [];
1945
1951
  const numDaysInMonth = (new Date(year, month, 0)).getDate();
@@ -1990,7 +1996,7 @@ const SimpleDateChooser = (props) => {
1990
1996
  });
1991
1997
  }
1992
1998
  });
1993
- return (React__default["default"].createElement("div", { className: "SimpleDateChooser d-inline-block", "aria-label": `date chooser with selected date: ${month} ${day}, ${year}` },
1999
+ return (React__default["default"].createElement("div", { className: "SimpleDateChooser d-inline-block", "aria-label": `date chooser with selected date: ${month}/${day}/${year}` },
1994
2000
  React__default["default"].createElement("select", { "aria-label": `month for ${ariaLabel}`, className: "custom-select d-inline-block mr-1", style: { width: 'auto' }, id: `SimpleDateChooser-${name}-month`, value: `${month}-${year}`, onChange: (e) => {
1995
2001
  const choice = choices[e.target.selectedIndex];
1996
2002
  // Change day, month, and year