Date Format
Returns a date in an ISO date format. Eg. converts return value 10/01/2020 to 2020-01-10.
Installation
Install
yarn add @iag/chroma-react-ui.components
Import
import { DateFormat } from '@iag/chroma-react-ui.components';
Accessibility
Accessibility Documentation(opens in new window)Default
Error
Valid
Disabled
Properties
Name
Description
- classNamestringAdditional CSS classes to be applied
- disabledbooleanSpecifies whether the input is disabled.
- errorbooleanSpecifies whether an error state should be displayed.
- idstringHTML id attribute for the component
- namestringThe name attribute for the input element.
- onChange*(event: ChangeEvent<HTMLInputElement>, isValidDate: string) => voidCallback function triggered when the input value changes. @param event - The change event of the input. @param isValidDate - The formatted and validated date string.
- validbooleanSpecifies whether the input value is valid.
- value*stringThe value of the input.