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
ELEMENTS-1450: compute validity based on the current value #495
Merged
Gabez0r
merged 1 commit into
maintenance-3.0.x
from
ELEMENTS-1450-fix-date-picker-validation-3.0.x
Feb 11, 2022
Merged
ELEMENTS-1450: compute validity based on the current value #495
Gabez0r
merged 1 commit into
maintenance-3.0.x
from
ELEMENTS-1450-fix-date-picker-validation-3.0.x
Feb 11, 2022
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
View issue in JIRA: ELEMENTS-1450: Fix auto-search when changing the select in nuxeo-date-picker |
Gabez0r
previously approved these changes
Dec 20, 2021
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.
richardsd
previously approved these changes
Dec 21, 2021
mnixo
force-pushed
the
ELEMENTS-1450-fix-date-picker-validation-3.0.x
branch
from
December 21, 2021 16:51
30d6d44
to
f75a353
Compare
richardsd
previously approved these changes
Dec 21, 2021
Gabez0r
previously approved these changes
Dec 22, 2021
semisse
previously approved these changes
Dec 30, 2021
At last, 🔵 pipeline run. |
Gabez0r
dismissed stale reviews from semisse, richardsd, and themself
via
February 10, 2022 14:54
b9a1828
Gabez0r
force-pushed
the
ELEMENTS-1450-fix-date-picker-validation-3.0.x
branch
from
February 10, 2022 14:54
f75a353
to
b9a1828
Compare
Cross-repo check 🔵 : https://github.com/nuxeo/nuxeo-web-ui/actions/runs/1824512436 |
richardsd
approved these changes
Feb 11, 2022
semisse
approved these changes
Feb 11, 2022
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.
Context
auto
search, the results are updated as the user tweaks the values of the widgets in the search form layout.<nuxeo-date-picker>
the user is able to set a date and the results are updated automatically.<vaadin-date-picker>
checks the validity of its value:<vaadin-date-picker>
does its own validation but doesn't seem to be ready, as at this moment there's still a difference betweenvalue
(same asthis._inputValue
, still the first date the user picked) andthis._selectedDate
(which is already the second date picked).Proposed Solution
this.value
inthis.$.date.validate()
it ensures that the comparison is done with the most up to date value, instead of relying on the outdatedthis._inputValue
.<vaadin-date-picker>
uses (relies on locales), but since<nuxeo-date-picker>
has no access to theVaadin
global variable and its helpers,I propose using thewe should just usemoment
formatting (also based on locales) that is already used throughout<nuxeo-date-picker>
this.$.date.i18n.formatDate()
.