/
types.d.ts
72 lines (54 loc) · 1.5 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { IFormControlProps } from "gd-bs/src/components/form/controlTypes";
/**
* Date/Time
*/
export const DateTime: (props: IDateTimeProps) => IDateTime
/**
* Date/Time
*/
export interface IDateTime {
/** The date/time picker element. */
el: HTMLDivElement;
/** The flatpickr object. */
flatpickrObj: any;
/** Returns the date as a Date/Time object. */
getDate: () => Date;
/** Method to get the value. */
getValue: () => string;
/** Method to set the value. */
setValue: (dt: string | Date, dtFormat?: string) => void;
}
/**
* Date/Time Props
*/
export interface IDateTimeProps {
/** Assigns the object to the input parameter. */
assignTo?: (obj: IDateTime) => void;
/** The class name to apply to the element. */
className?: string;
/** The element to render the form to. */
el?: HTMLElement;
/** True to disable the date/time plugin */
disabled?: boolean;
/** The date/time label. */
label?: string;
/** The change event. */
onChange?: (value: string) => void;
/** The flatpickr options. */
options?: any;
/** Flag to display the time. */
showTime?: boolean;
/** The date/time value. */
value?: string;
}
/**
* Form Control Properties - DateTime
*/
export interface IFormControlPropsDateTime extends IFormControlProps {
/** The flatpickr options. */
options?: any;
/** Flag to display the time. */
showTime?: boolean;
/** The date/time value. */
value?: string;
}