-
Notifications
You must be signed in to change notification settings - Fork 79
fix(input-date-picker): allow clearing invalid date value #11937
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(input-date-picker): allow clearing invalid date value #11937
Conversation
const input = await page.find("calcite-input-date-picker >>> calcite-input-text"); | ||
await inputDatePicker.callMethod("setFocus"); | ||
await inputDatePicker.type(inputValue); | ||
await inputDatePicker.press("Escape"); |
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.
Nitpick: Don't think this is required. Applies to all other tests.
const oldValue = this._value; | ||
if (value !== oldValue) { | ||
const valueChanged = value !== this._value; | ||
const invalidValueCleared = value === "" && this.startInput?.value !== ""; |
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.
If the user skip setting startInput & set an invalid value in endInput value, clearing those values wouldn't work.
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.
Great catch. Fixed!
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.
Looking good, added a few comments.
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! 👍
…gis-deps * origin/dev: (31 commits) chore: add workflow manager to team issue templates (#11971) chore: release next feat(accordion-item): enhance component's interactivity states (#11935) chore: release next build(deps): update dependency lerna to v8.2.2 (#11948) feat(switch): enhance component's colors for a11y and usability (#11951) chore: release next ci: remove redundant test mode environment variable (#11958) fix(input-date-picker): allow clearing invalid date value (#11937) build: update browserslist db (#11946) feat(notice): add token for close icon and title text color (#11938) fix(list, block-group): fix drag handle events when lists or blocks are nested (#11816) chore: release next build(deps): update dependency vite to v5.4.18 (#11949) ci: default to stable tests when experimental mode is not set (#11957) fix(input-number): cancel arrow down event (#11956) refactor: tidy up (#11945) docs(checkbox): update icon color prop context (#11950) build(deps): bump node minor version (#11927) chore: release next ...
Related Issue: #10169
Summary
Fixes issue where clearing the value failed if input was invalid/incomplete and not committed.