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/esm/index.js CHANGED
@@ -1911,7 +1911,13 @@ const SimpleDateChooser = (props) => {
1911
1911
  }
1912
1912
  const monthName = getMonthName(month).full;
1913
1913
  // Year is start year +1 for each 12 months
1914
- const year = (startYear + (Math.floor(unmoddedMonth / 12)));
1914
+ let yearsToAdd = 0;
1915
+ let monthsOfYearsToAdd = unmoddedMonth;
1916
+ while (monthsOfYearsToAdd > 12) {
1917
+ monthsOfYearsToAdd -= 12;
1918
+ yearsToAdd += 1;
1919
+ }
1920
+ const year = startYear + yearsToAdd;
1915
1921
  // Figure out which days are allowed
1916
1922
  const days = [];
1917
1923
  const numDaysInMonth = (new Date(year, month, 0)).getDate();
@@ -1962,7 +1968,7 @@ const SimpleDateChooser = (props) => {
1962
1968
  });
1963
1969
  }
1964
1970
  });
1965
- return (React__default.createElement("div", { className: "SimpleDateChooser d-inline-block", "aria-label": `date chooser with selected date: ${month} ${day}, ${year}` },
1971
+ return (React__default.createElement("div", { className: "SimpleDateChooser d-inline-block", "aria-label": `date chooser with selected date: ${month}/${day}/${year}` },
1966
1972
  React__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) => {
1967
1973
  const choice = choices[e.target.selectedIndex];
1968
1974
  // Change day, month, and year