dce-reactkit 4.2.0 → 4.2.1
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 +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/SimpleDateChooser.d.ts +1 -0
- package/dist/cjs/types/components/SimpleTimeChooser.d.ts +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/SimpleDateChooser.d.ts +1 -0
- package/dist/esm/types/components/SimpleTimeChooser.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/SimpleDateChooser.tsx +5 -0
- package/src/components/SimpleTimeChooser.tsx +4 -0
package/dist/esm/index.js
CHANGED
|
@@ -2789,7 +2789,7 @@ const SimpleDateChooser = (props) => {
|
|
|
2789
2789
|
/* -------------------------------- Setup ------------------------------- */
|
|
2790
2790
|
/*------------------------------------------------------------------------*/
|
|
2791
2791
|
/* -------------- Props ------------- */
|
|
2792
|
-
const { ariaLabel, name, dontAllowPast, dontAllowFuture, numMonthsToShow, onChange, month, day, year, } = props;
|
|
2792
|
+
const { ariaLabel, name, dontAllowPast, dontAllowFuture, numMonthsToShow, onChange, month, day, year, isDisabled = false, } = props;
|
|
2793
2793
|
// Get choices
|
|
2794
2794
|
const choices = getChoices({
|
|
2795
2795
|
numMonthsToShow,
|
|
@@ -2874,11 +2874,11 @@ const SimpleDateChooser = (props) => {
|
|
|
2874
2874
|
const choice = choices[e.target.selectedIndex];
|
|
2875
2875
|
// Change day, month, and year
|
|
2876
2876
|
onChange(choice.month, choice.days[0], choice.year);
|
|
2877
|
-
} }, monthOptions),
|
|
2877
|
+
}, disabled: isDisabled }, monthOptions),
|
|
2878
2878
|
React__default.createElement("select", { "aria-label": `day for ${ariaLabel}`, className: "custom-select form-select d-inline-block", style: { width: 'auto' }, id: `SimpleDateChooser-${name}-day`, value: day, onChange: (e) => {
|
|
2879
2879
|
// Only change the day
|
|
2880
2880
|
onChange(month, Number.parseInt(e.target.value, 10), year);
|
|
2881
|
-
} }, dayOptions)));
|
|
2881
|
+
}, disabled: isDisabled }, dayOptions)));
|
|
2882
2882
|
}
|
|
2883
2883
|
/* --------- DateOutOfRange --------- */
|
|
2884
2884
|
if (view === View.InvalidDate) {
|
|
@@ -2936,7 +2936,7 @@ const SimpleTimeChooser = (props) => {
|
|
|
2936
2936
|
/* -------------------------------- Setup ------------------------------- */
|
|
2937
2937
|
/*------------------------------------------------------------------------*/
|
|
2938
2938
|
/* -------------- Props ------------- */
|
|
2939
|
-
const { ariaLabel, name, hour, minute, onChange, } = props;
|
|
2939
|
+
const { ariaLabel, name, hour, minute, onChange, isDisabled = false, } = props;
|
|
2940
2940
|
let { intervalMin = DEFAULT_INTERVAL, } = props;
|
|
2941
2941
|
// Use default interval if not supported
|
|
2942
2942
|
if (!ALLOWED_INTERVALS.includes(intervalMin)) {
|
|
@@ -3015,7 +3015,7 @@ const SimpleTimeChooser = (props) => {
|
|
|
3015
3015
|
const timeInfo = convertMinSinceMidnightToHoursAndMin(newTime);
|
|
3016
3016
|
// Notify parent
|
|
3017
3017
|
onChange(timeInfo.hours, timeInfo.minutes);
|
|
3018
|
-
} }, timeOptions)));
|
|
3018
|
+
}, disabled: isDisabled }, timeOptions)));
|
|
3019
3019
|
};
|
|
3020
3020
|
|
|
3021
3021
|
/**
|