Skip to main content

Getting Started

Wrapper for react-dates to work with formik.

It can be helpful to understand the formik hook useFormikContext() for accessing values from the form. The documentation can be found here.

Installation

NPM

npm install @availity/date @availity/form formik reactstrap@^8.0.0

Yarn

yarn add @availity/date @availity/form formik reactstrap@^8.0.0

Styling

You must import the styles.scss file @availity/date provides in order to have the field styled correctly

import Date from '@availity/date';
import '@availity/date/styles.scss';

Validation

See yup and @availity/yup. Note: to use this package with @availity/yup you will need to import the moment version as noted in the example below.

References