DateRangePicker
Importβ
import { DateRangePicker } from '@resultadosdigitais/tangram-react-datepicker'
Propertiesβ
dateFormatβ
| Type | string |
|---|---|
| Default | 'dd/MM/yyyy' |
Descriptionβ
Sets input date format.
Check the Unicode Tokens docs to see all available formats: https://git.io/fxCyr
endDateβ
inlineβ
localeβ
| Type | object |
|---|---|
| Default | ptBR |
Descriptionβ
Sets DateRangePicker's locale. To change this, it's necessary get local in 'date-fns/locale'.
import enUS from 'date-fns/locale/en-US';
onSelectEndβ
| Type | func |
|---|---|
| Default | () => {} |
| Param | date Date - The date. |
Descriptionβ
Callback fired when the DateRangePicker end date is selected.
onSelectStartβ
| Type | func |
|---|---|
| Default | () => {} |
| Param | date Date - The date. |
Descriptionβ
Callback fired when the DateRangePicker start date is selected.
positionβ
startDateβ
| Type | instance of Date |
|---|---|
| Default | new Date() |
Descriptionβ
Sets DateRangePicker's pre-selected initial date.