dce-reactkit 4.2.0 → 4.2.2
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 +6 -6
- 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 +6 -6
- 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/ErrorBox.tsx +1 -1
- package/src/components/SimpleDateChooser.tsx +5 -0
- package/src/components/SimpleTimeChooser.tsx +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -316,6 +316,7 @@ type Props$g = {
|
|
|
316
316
|
numMonthsToShow?: number;
|
|
317
317
|
dontAllowPast?: boolean;
|
|
318
318
|
dontAllowFuture?: boolean;
|
|
319
|
+
isDisabled?: boolean;
|
|
319
320
|
};
|
|
320
321
|
declare const SimpleDateChooser: React$1.FC<Props$g>;
|
|
321
322
|
|
|
@@ -336,6 +337,7 @@ type Props$f = {
|
|
|
336
337
|
*/
|
|
337
338
|
onChange: (hour: number, minute: number) => void;
|
|
338
339
|
intervalMin?: number;
|
|
340
|
+
isDisabled?: boolean;
|
|
339
341
|
};
|
|
340
342
|
declare const SimpleTimeChooser: React$1.FC<Props$f>;
|
|
341
343
|
|
package/package.json
CHANGED
|
@@ -51,6 +51,8 @@ type Props = {
|
|
|
51
51
|
dontAllowPast?: boolean,
|
|
52
52
|
// If true, the user isn't allowed to select dates in the future
|
|
53
53
|
dontAllowFuture?: boolean,
|
|
54
|
+
// If true, the chooser is disabled
|
|
55
|
+
isDisabled?: boolean,
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
/*------------------------------------------------------------------------*/
|
|
@@ -291,6 +293,7 @@ const SimpleDateChooser: React.FC<Props> = (props) => {
|
|
|
291
293
|
month,
|
|
292
294
|
day,
|
|
293
295
|
year,
|
|
296
|
+
isDisabled = false,
|
|
294
297
|
} = props;
|
|
295
298
|
|
|
296
299
|
// Get choices
|
|
@@ -435,6 +438,7 @@ const SimpleDateChooser: React.FC<Props> = (props) => {
|
|
|
435
438
|
choice.year,
|
|
436
439
|
);
|
|
437
440
|
}}
|
|
441
|
+
disabled={isDisabled}
|
|
438
442
|
>
|
|
439
443
|
{monthOptions}
|
|
440
444
|
</select>
|
|
@@ -454,6 +458,7 @@ const SimpleDateChooser: React.FC<Props> = (props) => {
|
|
|
454
458
|
year,
|
|
455
459
|
);
|
|
456
460
|
}}
|
|
461
|
+
disabled={isDisabled}
|
|
457
462
|
>
|
|
458
463
|
{dayOptions}
|
|
459
464
|
</select>
|
|
@@ -32,6 +32,8 @@ type Props = {
|
|
|
32
32
|
// Allowed options: 15, 30, 60, defaults to 15
|
|
33
33
|
// If an unsupported interval is passed in, it will default to 15
|
|
34
34
|
intervalMin?: number,
|
|
35
|
+
// If true, the chooser is disabled
|
|
36
|
+
isDisabled?: boolean,
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
/*------------------------------------------------------------------------*/
|
|
@@ -61,6 +63,7 @@ const SimpleTimeChooser: React.FC<Props> = (props) => {
|
|
|
61
63
|
hour,
|
|
62
64
|
minute,
|
|
63
65
|
onChange,
|
|
66
|
+
isDisabled = false,
|
|
64
67
|
} = props;
|
|
65
68
|
let {
|
|
66
69
|
intervalMin = DEFAULT_INTERVAL,
|
|
@@ -181,6 +184,7 @@ const SimpleTimeChooser: React.FC<Props> = (props) => {
|
|
|
181
184
|
// Notify parent
|
|
182
185
|
onChange(timeInfo.hours, timeInfo.minutes);
|
|
183
186
|
}}
|
|
187
|
+
disabled={isDisabled}
|
|
184
188
|
>
|
|
185
189
|
{timeOptions}
|
|
186
190
|
</select>
|