-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
add daterange component #305
base: master
Are you sure you want to change the base?
Conversation
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.
My first comment is that it's really nice and feature complete. Having said that, I do have the following comments on the UI:
- The styling of this component is not similar enough to the other re-com components, in particular the
datepicker
. It's certainly more contemporary and I do really like it, however we should bring it back to a similar look and feel to the others. Additionally, I have a couple of sub-points- I see throughout the UI (and the code) currently Monday and Wednesday are represented with single letters, so they should be two letters to match the other days (or even possibly three letters (with small-caps formatting) to match the current datepicker)
- Another inconsistency is that daterange doesn't fill the entire grid with the dates of the days in previous and next month. I'm not saying this is bad, but datepicker does do that, and I do actually find it handy sometimes, so please fill in those empty cells
:disabled?
doesn't prevent navigation. I know it's in the docs but I see that datepicker also disables navigation, so I would think we should make them both consistent. Happy to discussion, given that perhaps the reason navigation is not disabled is because the selected date range might span more than two months?- When you select a date range but then single click on a date, which deselects the selected date range, the external model does not match the state of the component. I see that this is documented but I am questioning (suggesting) model be updated to nil. If a user wanted to cancel the date range, they would leave it in this incomplete state, however the value of the component to the calling code would be the last valid date range
- The dropdown version drops down right justified but if there's no room underneath, it drops up center justified. I do note that the datepicker does exactly the same thing, so I wouldn't worry about this one
- Very optional stretch goal: Could allow click-n-drag in addition to click-n-click (more marks for auto-next/previous month when dragging beyond left/right)
Also, I have now merged this PR into re-com proper as a branch (https://github.com/day8/re-com/tree/RT567-master) and added a commit of my own which contains coding comments and changes.
Please review that commit along with the above then we can have a session to discuss your thoughts when you are ready
Any changes you now make should be done in this branch, not you PR, but we should probably have our chat before you make further changes.
Nice work!
1c466ca
to
60d0594
Compare
37d2900
to
2cac684
Compare
e5fe19a
to
c6e5618
Compare
42f689b
to
fb41b0b
Compare
3e08afc
to
9249a83
Compare
No description provided.