feat(material/datepicker): Support drag and drop to adjust date ranges#25548
feat(material/datepicker): Support drag and drop to adjust date ranges#25548crisbeto merged 1 commit intoangular:mainfrom
Conversation
| return new DateRange<D>(start, end); | ||
| } | ||
|
|
||
| createDrag(dragOrigin: D, originalRange: DateRange<D>, newDate: D) { |
There was a problem hiding this comment.
I don't quite get why the range selection strategy needs to know about dragging. I was imagining that we'd treat it as a preview that is updated on mousemove.
There was a problem hiding this comment.
It needs to know the additional information, and the behavior is pretty different than the click-click behavior in regular preview generation.
There was a problem hiding this comment.
As well, there could be differing opinions on what this behavior should be, or whether dragging should be supported at all, so this gives folks that flexibility.
05c001e to
25fff00
Compare
|
Note to reviewers: the test failure appears to be an unrelated flake |
| _cellWidth: string; | ||
|
|
||
| private _didDragSinceMouseDown = false; | ||
|
|
There was a problem hiding this comment.
Not sure what you mean - the 19 appears to be in the currently hovered state. Is the mouse not currently over 19?
There was a problem hiding this comment.
I wasn't hovering the 19, I started dragging from it but my mouse was completely outside of the calendar.
There was a problem hiding this comment.
I couldn't really track this one down. One thing I noticed is that the hover effect does not show up in chrome's simulated touch mode. It seems to work as expected in mouse mode the vast majority of the time. Are we willing to live with this for now?
There was a problem hiding this comment.
Sure, we can fix it in a follow-up.
|
@crisbeto Thanks for the review! Fixed a couple things and have a couple follow-up questions on 2 other comments. PTAL |
|
@crisbeto Got the drag behavior fixed. Not sure what to do about the hover effect, but IMO it's not that big an issue. Ok to proceed at this point? |
| _cellWidth: string; | ||
|
|
||
| private _didDragSinceMouseDown = false; | ||
|
|
There was a problem hiding this comment.
Sure, we can fix it in a follow-up.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |

No description provided.