-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Constrain day on blur #8385
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
Open
boutahlilsoufiane
wants to merge
53
commits into
adobe:main
Choose a base branch
from
boutahlilsoufiane:constrain-date
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+363
−195
Open
Changes from 46 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
f84a158
fix: Constrain day on blur
boutahlilsoufiane 38ab4fe
Merge branch 'main' of https://github.com/boutahlilsoufiane/react-spe…
boutahlilsoufiane 2611a8e
feat: add tests
boutahlilsoufiane f130aae
feat: add blur
boutahlilsoufiane 577bcdb
feat: update constrain
boutahlilsoufiane 56c5849
feat: change NumberFormat
boutahlilsoufiane 596af68
feat: fix tests
boutahlilsoufiane 9a30cc2
feat: fix tests
boutahlilsoufiane 56fe492
fix: remove unnecessary changes
boutahlilsoufiane dd9675b
fix: improve tests
boutahlilsoufiane ac477ec
fix: improve tests
boutahlilsoufiane ab552f9
fix: fix tests
boutahlilsoufiane 5d98150
fix: Fix clear timefield
boutahlilsoufiane 53fb4d7
fix: Fix tests
boutahlilsoufiane 4cc6ffc
fix: Fix tests RangeDatePicker
boutahlilsoufiane 4eb5712
fix: Fix increment value
boutahlilsoufiane c9945d5
fix: Fix DateRnagePickers tests
boutahlilsoufiane 28e3927
fix: Fix test DateField.test.js
boutahlilsoufiane 3fc093f
fix: Fix tests
boutahlilsoufiane b60fe24
fix: Fix tests
boutahlilsoufiane 6c0645b
fix: Remove unnecessary changes
boutahlilsoufiane 18967fc
fix: Add max days
boutahlilsoufiane 6990d69
Merge branch 'main' of https://github.com/boutahlilsoufiane/react-spe…
boutahlilsoufiane 4701afa
fix: Fix tests
boutahlilsoufiane 8acff74
refactor: remove useRef
boutahlilsoufiane 6a0a839
refactor: use useState
boutahlilsoufiane 4500be8
refactor: don't update placeholder
boutahlilsoufiane 2493f45
refactor: Remove comment
boutahlilsoufiane 1bc224d
refactor: Remove currentValue
boutahlilsoufiane 3fd1d6f
test: Fix linting issues
boutahlilsoufiane bf0d184
test: Fix linting issues
boutahlilsoufiane 7d281e3
fix: Fix linting issue
boutahlilsoufiane 46c9e71
fix: Fix linting issues
boutahlilsoufiane 296d894
refactor: Add description
boutahlilsoufiane 48bcd5a
fix: revert changes
boutahlilsoufiane 11d37fa
fix: don't constrain day
boutahlilsoufiane b0f2963
fix: Fix linting issues
boutahlilsoufiane 2d4520e
Merge branch 'main' of https://github.com/boutahlilsoufiane/react-spe…
boutahlilsoufiane af7884d
fix: Fix linting issues
boutahlilsoufiane 27bed18
fix: Fix linting issues
boutahlilsoufiane 0096396
fix: don't constrain day
boutahlilsoufiane 5f5d411
fix: Fix linting issues
boutahlilsoufiane cfad64d
fix: fix rule no dup class members
boutahlilsoufiane 984ae81
fix: fix rule no dup class members
boutahlilsoufiane 673361b
Merge branch 'main' into constrain-date
boutahlilsoufiane 47d9cab
Merge branch 'main' into constrain-date
snowystinger 26cc987
fix: Fix constructor
boutahlilsoufiane 51671bb
Merge branch 'main' into constrain-date
boutahlilsoufiane 0c432e8
fix: Add default value
boutahlilsoufiane c02a20e
Merge branch 'constrain-date' of https://github.com/boutahlilsoufiane…
boutahlilsoufiane de9fa3c
Merge branch 'main' into constrain-date
boutahlilsoufiane 918d8a2
fix: Remove default value
boutahlilsoufiane fda81ce
Merge branch 'constrain-date' of https://github.com/boutahlilsoufiane…
boutahlilsoufiane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
I noticed when testing locally that typing in
2/30/2(aka Feb 30 2xxx) into a datefield would constrain the30into28. Looks likeshiftArgsdoesn't handleconstrainDayso the providedconstraintDayfrom https://github.com/boutahlilsoufiane/react-spectrum/blob/47d9cab7f5e62e5fb894543c17633a69cbafd498/packages/%40internationalized/date/src/manipulation.ts#L154 isn't coming through. However,shiftArgsmight also be handling timezones/etc so either we need to tweakshiftArgsand clamp down on its type definition so we know what args may follow afterdayOR perhaps you can just grabconstraintDayfrom the last arg inargshere and just double check that it is a boolean.Making that change locally seemed to fix the behavior for me, but a couple of tests failed since now we aren't truly constraining in the
setcall by defaultUh oh!
There was an error while loading. Please reload this page.
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.
Yes, the expected behavior is to constrain day on blur, I think I changed something by mistake. I attempted to fix it in the last commit, but the tests are still failing. I'll investigate further to resolve this.