[6.x] Date picker today shortcut#14651
Draft
jaygeorge wants to merge 13 commits into
Draft
Conversation
…today" to orient yourself, and then use "apply" to escape the calendar easily
… select, today's date becomes the first selection
…date to the correct month
…elect, but pick another day, "select" should reset to "today"
… you should not be able to select today
Contributor
Author
|
Hmmm, I've only just noticed that the "clear" It's not quite the same because if the field is not required, then clearing it will not focus on today's date. I wonder if it's possible to copy the button and make a few modifications rather than make all these changes, if you don't like the amount of lines changed @jasonvarga. I kind of want to reach for a "today" button because it's a more obvious affordance than mentally clearing the field in order to focus on today's date. |
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
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.
Description of the Problem
If you're dealing with an old date and want to change it, it can be a bit of mental effort to find / re-orient yourself to today's date.
What this PR Does
TodaybecomesApply. This solves two things:Todayfocuses on today's date, and then prompts you toSelectit as the first point in the range. If you ignore theSelectbutton you can click a different date within the view to start the range selectionConditions Enforced
Todayshould forward the date view, as well as selecting the current dateFor Date Ranges
Applyshould only show when there is a date range to start making the selectionTodayshould reset the date range selectionTodayshould then showSelect, but if you click another date before clickingSelectthenSelectshould reset toTodayBefore (inline)
Here you can see the calendar is slightly misaligned to the right – for example, you can see
28is closer to the right here vs22After (inline)
With "today" button and alignment fixed
How to Reproduce
(blueprint below)
Here's the sidebar bit of a blueprint with various configurations to help replicate: