-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(DatePicker): updated onBlur logic for empty date #9373
Merged
tlabaj
merged 3 commits into
patternfly:main
from
thatblindgeye:iss8779_datePicker_onBlur
Aug 8, 2023
Merged
fix(DatePicker): updated onBlur logic for empty date #9373
tlabaj
merged 3 commits into
patternfly:main
from
thatblindgeye:iss8779_datePicker_onBlur
Aug 8, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thatblindgeye
force-pushed
the
iss8779_datePicker_onBlur
branch
from
July 18, 2023 15:50
92263f2
to
ad46e4d
Compare
Preview: https://patternfly-react-pr-9373.surge.sh A11y report: https://patternfly-react-pr-9373-a11y.surge.sh |
edonehoo
reviewed
Jul 19, 2023
packages/react-core/src/components/DatePicker/examples/DatePicker.md
Outdated
Show resolved
Hide resolved
thatblindgeye
force-pushed
the
iss8779_datePicker_onBlur
branch
from
July 21, 2023 14:08
ad46e4d
to
6d659bb
Compare
edonehoo
approved these changes
Jul 21, 2023
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.
looks good!
kmcfaul
approved these changes
Jul 26, 2023
adamviktora
added a commit
to adamviktora/patternfly-react
that referenced
this pull request
Jul 31, 2023
thatblindgeye
force-pushed
the
iss8779_datePicker_onBlur
branch
from
July 31, 2023 18:42
6d659bb
to
96bce1d
Compare
nicolethoen
approved these changes
Aug 3, 2023
tlabaj
requested changes
Aug 7, 2023
thatblindgeye
force-pushed
the
iss8779_datePicker_onBlur
branch
from
August 8, 2023 13:21
96bce1d
to
c62c19c
Compare
tlabaj
approved these changes
Aug 8, 2023
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.
lgtm
adamviktora
added a commit
to adamviktora/patternfly-react
that referenced
this pull request
Aug 18, 2023
thatblindgeye
pushed a commit
that referenced
this pull request
Aug 24, 2023
* fix(DatePicker): clear error on date reset * feat(DatePicker): add clear date example to controlled DatePicker * test(DatePicker): add integration test for clear date * feat(DatePicker): update clear date logic based on #9373 * fix(DatePicker): hide error when date cleared and not required + show error when cleared and required * refactor(DatePicker) * fix(DatePicker): prop removal
nicolethoen
pushed a commit
to Kells512/patternfly-react
that referenced
this pull request
Sep 1, 2023
* fix(DatePicker): updated onBlur logic for empty date * Updated example description * Grouped isRequired and emptyDateText props as one
nicolethoen
pushed a commit
to Kells512/patternfly-react
that referenced
this pull request
Sep 1, 2023
…y#9267) * fix(DatePicker): clear error on date reset * feat(DatePicker): add clear date example to controlled DatePicker * test(DatePicker): add integration test for clear date * feat(DatePicker): update clear date logic based on patternfly#9373 * fix(DatePicker): hide error when date cleared and not required + show error when cleared and required * refactor(DatePicker) * fix(DatePicker): prop removal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What: Closes #8779
Originally had added logic to call
setError
ifpristine && isRequired
, but that would have required a consumer to always pass in a validator tovalidators
array; something along the lines ofvalidators={[(date) => !date ? 'Date cannot be blank' : '']}
.Just adding a new isRequired and emptyDateText props will make it easier for consumers, and it avoids a case of
isRequired
being passed in but an error message never appearing if a validator isn't passed in.This is somewhat dependent on #9267, but should just require a slight tweak in that PRs code (the
value === '' && setErrorText('')
line)Additional issues: