forked from syncfusion/ej2-react-ui-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimepicker.component.tsx
44 lines (37 loc) · 1.42 KB
/
timepicker.component.tsx
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
import * as React from 'react';
import { TimePicker, TimePickerModel } from '@syncfusion/ej2-calendars';
import { ComponentBase, applyMixins, DefaultHtmlAttributes } from '@syncfusion/ej2-react-base';
/**
* Represents the Essential JS 2 React TimePicker Component.
* ```html
* <TimePickerComponent value={value}></TimePickerComponent>
* ```
*/
export class TimePickerComponent extends TimePicker {
public state: Readonly<{ children?: React.ReactNode | React.ReactNode[] }>
& Readonly<TimePickerModel & DefaultHtmlAttributes>;
public setState: any;
private getDefaultAttributes: Function;
public initRenderCalled: boolean = false;
private checkInjectedModules: boolean = false;
public props: Readonly<{ children?: React.ReactNode | React.ReactNode[] }>
& Readonly<TimePickerModel & DefaultHtmlAttributes>;
public forceUpdate: (callBack?: () => any) => void;
public context: Object;
public isReactComponent: Object;
public refs: {
[key: string]: React.ReactInstance
};
constructor(props: any) {
super(props);
}
public render(): any {
if ((this.element && !this.initRenderCalled) || this.refreshing) {
super.render();
this.initRenderCalled = true;
} else {
return React.createElement('input', this.getDefaultAttributes());
}
}
}
applyMixins(TimePickerComponent, [ComponentBase, React.PureComponent]);