Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add daterange component #305

wants to merge 3 commits into from

Conversation

RT567
Copy link
Contributor

@RT567 RT567 commented Sep 6, 2021

No description provided.

Copy link
Contributor

@Gregg8 Gregg8 left a 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!

@kimo-k kimo-k force-pushed the master branch 6 times, most recently from 1c466ca to 60d0594 Compare March 22, 2024 01:39
@kimo-k kimo-k force-pushed the master branch 6 times, most recently from 37d2900 to 2cac684 Compare April 24, 2024 23:13
@kimo-k kimo-k force-pushed the master branch 3 times, most recently from e5fe19a to c6e5618 Compare May 7, 2024 16:43
@kimo-k kimo-k force-pushed the master branch 3 times, most recently from 42f689b to fb41b0b Compare June 4, 2024 11:54
@kimo-k kimo-k force-pushed the master branch 3 times, most recently from 3e08afc to 9249a83 Compare June 18, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants