diff --git a/packages/terra-clinical-onset-picker/CHANGELOG.md b/packages/terra-clinical-onset-picker/CHANGELOG.md index a04bbdcca..f262b61b8 100644 --- a/packages/terra-clinical-onset-picker/CHANGELOG.md +++ b/packages/terra-clinical-onset-picker/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Added + * Added required prop to mark fields as required based on granularity. + ## 4.36.0 - (September 21, 2023) * Added diff --git a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx index a99bc0bf0..3c6956b78 100644 --- a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx +++ b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx @@ -84,11 +84,16 @@ const propTypes = { * The intl object containing translations. This is retrieved from the context automatically by injectIntl. */ intl: PropTypes.shape({ formatMessage: PropTypes.func }).isRequired, + /** + * Whether the field is required. + */ + required: PropTypes.bool, }; const defaultProps = { precisionSet: ['on/at', 'about', 'before', 'after', 'unknown'], isLegendHidden: false, + required: false, }; class OnsetPicker extends React.Component { @@ -181,6 +186,7 @@ class OnsetPicker extends React.Component { getYearInput(intl, id) { return ( (

{`Birthdate: ${birthdate.format('MM-DD-YYYY')}`}