Repository navigation
Update date picker to allow typing in dates #101454
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
Krishna2323
wants to merge
98
commits into
Expensify:main
Choose a base branch
from
Krishna2323:krishna2323/issue-101117
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.
Open
Changes from all commits
Commits
Show all changes
98 commits
Select commit
Hold shift + click to select a range
c306f00
feat: allow typing a date into the date field, one segment at a time
Krishna2323 79a94e8
fix: reach the overlay-free popover from a narrow pane, and open the …
Krishna2323 de3a085
fix: keep the date mask a fixed width and track the caret per digit
Krishna2323 59e4711
fix: match the prototype's segment rules for typed dates
Krishna2323 0d46d4f
fix: do not drag the calendar to the date limit while a year is typed
Krishna2323 b13855f
fix: fill the month and day from the right so a single digit shows as 02
Krishna2323 b9896d6
fix: send a click on the field's empty space to the first unfilled se…
Krishna2323 905605a
fix: hide the calendar icon once a digit is typed
Krishna2323 7d4f9c6
fix: keep the typing calendar attached to its field while the page sc…
Krishna2323 fc6df11
fix: keep the calendar open while the year or month picker is used
Krishna2323 6010595
refactor: remove the workarounds that accumulated around the typed da…
Krishna2323 cf9bbd1
feat: update the date field when a month or year is picked
Krishna2323 6848a74
fix: stop a stray caret report moving the date field's active segment
Krishna2323 c534524
refactor: rebuild the date field as one input per segment
Krishna2323 8f9b152
fix: measure each date segment instead of estimating its width
Krishna2323 1f44f08
fix: show the committed date when the date field is not being edited
Krishna2323 d3068c3
fix: let a press land on the date segment it was aimed at
Krishna2323 1d90b46
fix: stop the date field's props being dropped by the segmented input
Krishna2323 996c988
fix: land the caret at the end of a date segment reached by keystroke
Krishna2323 62993b7
fix: reposition the calendar when the date field changes height
Krishna2323 aa094c3
fix: keep a committed date from restarting the segment being typed
Krishna2323 6970cff
fix: drop a date segment keystroke that cannot complete a leading zero
Krishna2323 c763339
feat: keep the unreached mask letters on screen while a date is typed
Krishna2323 b1ba2f0
Merge branch 'main' into krishna2323/issue-101117
Krishna2323 ef0e09a
fix: keep the date field's empty space from taking focus off its segm…
Krishna2323 32108c3
fix: block submission when the date field is left holding an unusable…
Krishna2323 44b6350
fix: return the date field to its first segment when it is cleared
Krishna2323 2588a05
fix: report a date field's value as it is typed rather than when it i…
Krishna2323 30187a5
Merge branch 'main' into krishna2323/issue-101117
Krishna2323 acadecd
fix: address the design review on the typed date field
Krishna2323 cb275ea
Merge branch 'main' into krishna2323/issue-101117
Krishna2323 6b32216
fix: limit month and year commits to typing, and hide decorative date…
Krishna2323 c09056e
refactor: follow existing patterns in the typed date field
Krishna2323 1deb756
chore: remove local debug files committed by mistake
Krishna2323 f394b45
refactor: tidy the typed date field to match codebase conventions
Krishna2323 ef67e16
chore: stop exporting the date segment hook's params type
Krishna2323 95ae9b0
fix: keep the date mask on one line
Krishna2323 80e330f
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 c070ec0
fix: paste into the segment the user is in, rather than rebuilding th…
Krishna2323 e947fe0
fix: keep the typed date while the value prop catches up
Krishna2323 116d61c
fix: show the clear button while a date is still being typed
Krishna2323 1bd6f79
fix: follow a month typed before the year is filled in
Krishna2323 b83e90d
fix: follow the typed year into the calendar, even outside the pickab…
Krishna2323 b24cd31
fix: keep the typed date when the calendar is reopened
Krishna2323 8031665
fix: refuse a date that was typed but does not exist
Krishna2323 c5302c2
fix: hold the day to the month that was typed
Krishna2323 2efce43
fix: move the day back when the month typed after it is too short
Krishna2323 cf5bb1a
fix: block submitting a date the calendar would never have offered
Krishna2323 c9f21ab
fix: open the calendar in range, keep pasted digits, and delete to th…
Krishna2323 48c8e94
fix: let the calendar tell a date it holds from one standing in for none
Krishna2323 5726876
fix: use the shared color helper for the date mask
Krishna2323 04d939f
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 f423ceb
fix: collapse a selected date on press and copy it on cmd+c
Krishna2323 a68efd2
fix: hold back a date being typed, and block saving one that cannot b…
Krishna2323 d3b92dd
fix: show a date field's required error once it is left, not as it em…
Krishna2323 61d823a
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 22a74af
fix: let a date be cut, keep the separator in place, and block confir…
Krishna2323 2ee096b
fix: copy a date that is only part typed instead of refusing to
Krishna2323 e236b1a
fix: report a pasted date that does not exist instead of nudging it t…
Krishna2323 02e667e
fix: match a text field's double and triple click beside the date
Krishna2323 9b227b1
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 3542415
fix: keep a day its month does not have instead of moving the user of…
Krishna2323 0d7e1e7
fix: let a typed date be undone, and dismiss the calendar on tabbing …
Krishna2323 e63c369
Merge remote-tracking branch 'upstream/main' into krishna2323/issue-1…
Krishna2323 793d83f
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 c90b3e6
Merge remote-tracking branch 'upstream/main' into krishna2323/issue-1…
Krishna2323 7c9d115
Merge remote-tracking branch 'upstream/main' into krishna2323/issue-1…
Krishna2323 56b6ea5
fix: keep the day on a year pick, read a paste by what it inserted, a…
Krishna2323 e62aade
fix: read a paste too short to fill a date segment into the digits al…
Krishna2323 07218af
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 9bbc7ee
Merge remote-tracking branch 'upstream/main' into krishna2323/issue-1…
Krishna2323 de7a4d0
fix: leave Escape to a modal opened above an overlay-free popover
Krishna2323 13e26f1
fix: answer autofocus the way a text field does
Krishna2323 eff5a47
fix: count the calendar as part of the field rather than somewhere ou…
Krishna2323 66a152a
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 75eb56b
fix: put focus back in the date field after a month or year is picked
Krishna2323 1661f17
fix: take focus back once the month or year picker has closed, not wh…
Krishna2323 2689ce6
fix: show the field as focused on any segment, and let typing open th…
Krishna2323 a802aa7
fix: open the calendar when a date is deleted, not only when one is t…
Krishna2323 9c712ae
fix: report a missing date on submit rather than on leaving the field
Krishna2323 12daf75
Merge remote-tracking branch 'upstream/main' into krishna2323/issue-1…
Krishna2323 fa29d47
fix: settle a date segment left reading as zero on the first month or…
Krishna2323 873b666
Merge branch 'Expensify:main' into krishna2323/issue-101117
Krishna2323 b271050
fix: read a date segment of zeroes as the first month or day
Krishna2323 bf7ecaa
fix: settle a zero that starts a filled date segment over on the firs…
Krishna2323 7f362d3
Merge branch 'krishna2323/issue-101117' of https://github.com/Krishna…
Krishna2323 5aeb011
Merge branch 'main' into krishna2323/issue-101117
Krishna2323 538d9b9
fix: paste over a selected date, cutting one segment, and re-picking …
Krishna2323 f5fea3c
Merge branch 'main' into krishna2323/issue-101117
Krishna2323 017bea5
fix: clamp a month or year pick, skip a dead separator, and clear a s…
Krishna2323 21b6201
refactor: name the date field's handlers for what they do and share t…
Krishna2323 e476d8a
test: cover the date range validator and the zero segment settling
Krishna2323 e4bb2cd
test: cover the error paths a date field reports through the form
Krishna2323 9db0c63
test: cover the date segment hook's state machine
Krishna2323 575ad90
refactor: share the start date validation between the pages asking fo…
Krishna2323 8f43bdb
test: cover the popover guards the typed calendar depends on
Krishna2323 90e7788
test: cover the date field's blur, its click selections and typing a …
Krishna2323 9728b6d
fix: drop a lint suppression that had nothing left to suppress
Krishna2323 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.