Pular para o conteúdo principal

DatePicker

Import

import { DatePicker } from '@resultadosdigitais/tangram-react-datepicker'

Properties

dateFormat

Typestring
Default'dd/MM/yyyy'

Description

Sets input date format.

Check the Unicode Tokens docs to see all available formats: https://git.io/fxCyr

defaultValue

Typeinstance of Date

Description

Sets DatePicker's default value.

double

Typebool
Defaultfalse

Description

Open with two calendars.

inline

Typebool

Description

Enables inline mode.

locale

Typeobject
DefaultptBR

Description

Sets DatePicker's locale. To change this, it's necessary get local in 'date-fns/locale'.

import enUS from 'date-fns/locale/en-US';

onChange

Typefunc
Default() => {}
Paramevent React.SyntheticEvent - The event triggered when a date is changed.
Paramdate Date - The date.

Description

Callback fired when the DatePicker changes.

placeholder

Typestring

Description

Sets input placeholder.

position

Type
Enum of:
  • DatePicker.positions.top
  • DatePicker.positions.bottom
DefaultDatePicker.positions.bottom

Description

Sets DatePicker's position.

value

Typeinstance of Date

Description

Sets DatePicker's value.

shouldCloseOnSelect

Typebool

Description

Sets if should close after select.

titleAction

Typefunc

Description

Pass a callback to title when clicked.

yearlyView

Typebool
Defaultfalse

Description

Enables yearly view.

Feedback