Base on Input
Related component
Install moment
npm install moment --saveoryarn add moment
import { DateTimeInput } from '@doopage/react-ui-kit'const Example = () => <DateTimeInput label={'DateTime Input'}/>;export default Example;
‹ | August 2021 | › | ||||
---|---|---|---|---|---|---|
Su | Mo | Tu | We | Th | Fr | Sa |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
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 | 1 | 2 | 3 | 4 |
Prop name | Type | Default | Required | Description |
---|---|---|---|---|
onChange | ((value?: string | undefined) => void) | undefined | — | false | |
inputProps | InputProps | undefined | — | false | |
loading | boolean | undefined | — | false | |
hide | boolean | undefined | — | false | |
helperText | string | undefined | — | false | |
error | string | undefined | — | false | |
label | string | undefined | — | false | |
placeholder | string | undefined | — | false | |
native | boolean | undefined | — | false | |
className | string | undefined | — | false | |
input | boolean | undefined | — | false | |
renderInput | ((props: any, openCalendar: Function, closeCalendar: Function) => Element) | undefined | — | false | |
onClose | EventOrValueHandler<FocusEvent<any>> | undefined | — | false | |
onOpen | ((event: FocusEvent<any>) => void) | undefined | — | false | |
open | boolean | undefined | — | false | |
value | string | Date | Moment | undefined | — | false | |
locale | string | undefined | — | false | |
initialValue | string | Date | Moment | undefined | — | false | |
initialViewDate | string | Date | Moment | undefined | — | false | |
initialViewMode | "time" | "months" | "years" | "days" | undefined | — | false | |
updateOnView | string | undefined | — | false | |
dateFormat | string | boolean | undefined | — | false | |
timeFormat | string | boolean | undefined | — | false | |
utc | boolean | undefined | — | false | |
displayTimeZone | string | undefined | — | false | |
onNavigate | ((viewMode: string) => void) | undefined | — | false | |
onBeforeNavigate | ((nextView: string, currentView: string, viewDate: Moment) => string) | undefined | — | false | |
onNavigateBack | ((amount: number, type: string) => void) | undefined | — | false | |
onNavigateForward | ((amount: number, type: string) => void) | undefined | — | false | |
isValidDate | ((currentDate: any, selectedDate: any) => boolean) | undefined | — | false | |
renderView | ((viewMode: string, renderCalendar: Function) => Element) | undefined | — | false | |
renderDay | ((props: any, currentDate: any, selectedDate: any) => Element) | undefined | — | false | |
renderMonth | ((props: any, month: number, year: number, selectedDate: any) => Element) | undefined | — | false | |
renderYear | ((props: any, year: number, selectedDate: any) => Element) | undefined | — | false | |
strictParsing | boolean | undefined | — | false | |
closeOnSelect | boolean | undefined | — | false | |
timeConstraints | TimeConstraints | undefined | — | false | |
closeOnClickOutside | boolean | undefined | — | false |