myoperator-ui 0.0.186 → 0.0.187
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/index.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8530,6 +8530,10 @@ export interface DateRangeModalProps {
|
|
|
8530
8530
|
loading?: boolean;
|
|
8531
8531
|
minDate?: Date;
|
|
8532
8532
|
maxDate?: Date;
|
|
8533
|
+
/** Preselected start date when modal opens (e.g. from URL when reopening custom date) */
|
|
8534
|
+
defaultStartDate?: Date;
|
|
8535
|
+
/** Preselected end date when modal opens (e.g. from URL when reopening custom date) */
|
|
8536
|
+
defaultEndDate?: Date;
|
|
8533
8537
|
}
|
|
8534
8538
|
|
|
8535
8539
|
function DateRangeModal({
|
|
@@ -8543,9 +8547,11 @@ function DateRangeModal({
|
|
|
8543
8547
|
loading = false,
|
|
8544
8548
|
minDate,
|
|
8545
8549
|
maxDate,
|
|
8550
|
+
defaultStartDate,
|
|
8551
|
+
defaultEndDate,
|
|
8546
8552
|
}: DateRangeModalProps) {
|
|
8547
|
-
const [startDate, setStartDate] = React.useState<Date | undefined>(
|
|
8548
|
-
const [endDate, setEndDate] = React.useState<Date | undefined>(
|
|
8553
|
+
const [startDate, setStartDate] = React.useState<Date | undefined>(defaultStartDate);
|
|
8554
|
+
const [endDate, setEndDate] = React.useState<Date | undefined>(defaultEndDate);
|
|
8549
8555
|
|
|
8550
8556
|
const canConfirm = !!startDate && !!endDate;
|
|
8551
8557
|
|