1 | import PropTypes from 'prop-types';
|
2 | import React from 'react';
|
3 | import { WidgetProps } from './Widget';
|
4 | export interface TimeInputProps extends Omit<WidgetProps, 'value' | 'onChange'> {
|
5 | value?: Date | null;
|
6 | onChange?: (date: Date | null, ctx?: any) => void;
|
7 | datePart?: Date;
|
8 | use12HourClock?: boolean;
|
9 | padValues?: boolean;
|
10 | emptyCharacter?: string;
|
11 | noClearButton?: boolean;
|
12 | disabled?: boolean;
|
13 | readOnly?: boolean;
|
14 | precision: 'minutes' | 'seconds' | 'milliseconds';
|
15 | hoursAddon?: React.ReactNode;
|
16 | minutesAddon?: React.ReactNode;
|
17 | secondsAddon?: React.ReactNode;
|
18 | millisecondsAddon?: React.ReactNode;
|
19 | }
|
20 | declare function TimeInput(uncontrolledProps: TimeInputProps): JSX.Element;
|
21 | declare namespace TimeInput {
|
22 | var propTypes: {
|
23 | |
24 |
|
25 |
|
26 | value: PropTypes.Requireable<Date>;
|
27 | |
28 |
|
29 |
|
30 | onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 | datePart: PropTypes.Requireable<Date>;
|
37 | |
38 |
|
39 |
|
40 |
|
41 | use12HourClock: PropTypes.Requireable<boolean>;
|
42 |
|
43 | padValues: PropTypes.Requireable<boolean>;
|
44 |
|
45 | emptyCharacter: PropTypes.Requireable<string>;
|
46 |
|
47 | noClearButton: PropTypes.Requireable<boolean>;
|
48 | |
49 |
|
50 |
|
51 | disabled: PropTypes.Requireable<boolean>;
|
52 | |
53 |
|
54 |
|
55 | readOnly: PropTypes.Requireable<boolean>;
|
56 |
|
57 | precision: PropTypes.Validator<string>;
|
58 | |
59 |
|
60 |
|
61 |
|
62 | hoursAddon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
63 | |
64 |
|
65 |
|
66 |
|
67 | minutesAddon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
68 | |
69 |
|
70 |
|
71 |
|
72 | secondsAddon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
73 | |
74 |
|
75 |
|
76 |
|
77 | millisecondsAddon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
78 | };
|
79 | var defaultProps: {
|
80 | hoursAddon: string;
|
81 | padValues: boolean;
|
82 | precision: string;
|
83 | emptyCharacter: string;
|
84 | };
|
85 | }
|
86 | export default TimeInput;
|
87 |
|
\ | No newline at end of file |