-
Notifications
You must be signed in to change notification settings - Fork 72
[terra-date-picker] Remove placeholder #1239
Conversation
@@ -222,13 +229,25 @@ const DatePickerField = (props) => { | |||
mergedInputAttrs = { 'aria-describedby': ariaDescriptionIds, ...inputAttributes }; | |||
} | |||
|
|||
const helpLabel = help ? ( | |||
<div id="format" aria-label={`Date Format: ${intl.formatMessage({ id: 'Terra.datePicker.dateFormat' })}, ${help}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this id
also be randomized like the other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field component doesn't require a description id as they internally provide helpDescriptionIds
. I had format just to give that div an id.
@@ -20,6 +21,11 @@ const propTypes = { | |||
* Callback ref to pass into the calendar button dom element. | |||
*/ | |||
buttonRefCallback: PropTypes.func, | |||
/** | |||
* @private | |||
* To check if help element is provided by the field or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* To check if help element is provided by the field or not. | |
* NOTICE: Internal prop to be used only by Terra framework. This component provides a built-in format mask that is required to be displayed to users for proper accessibility and must not be removed. 'DatePickerField' is permitted to set this prop because it provides the same format mask in its 'help' prop. |
Suggestion to switch propType to a boolean, default to false, and update prop name (e.g. useExternalFormatMask
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here 80414a5. And added translations
Tested: PR #1239 Reviewed:
|
Summary
This PR
DatePicker
andDatePickerField
.Link: jira for translations.
A part of #1193
Deployment Link
https://terra-framework-deployed-pr-#.herokuapp.com/
Testing
Date Picker:

Date Picker Field:

Additional Details
Thank you for contributing to Terra.
@cerner/terra