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

Start date is not highlighted when setting date range externally #222

Open
vicacid opened this issue Oct 1, 2019 · 2 comments
Open

Start date is not highlighted when setting date range externally #222

vicacid opened this issue Oct 1, 2019 · 2 comments

Comments

@vicacid
Copy link

vicacid commented Oct 1, 2019

The demo page contains example for the "Setting Calendar Range Externally"
image

Pressing "Last 7 days" range is set from September 24, 2019 to October 1, 2019 but "24" is not highlighted in the component.

I assume first date of the range should be included to the visual selection.

@vicacid
Copy link
Author

vicacid commented Oct 1, 2019

When setting in the component directly - everything is highlighted correctly for the same range.
image

@yuepywu
Copy link

yuepywu commented Dec 31, 2019

@vicacid

I have crosscheck their official demo source code (not sandbox one, and it's a bad example) and they have used moment startOf, below is a workable single date selection example using endOf:

value={moment.range(moment().startOf('day'), moment().endOf('day'))}

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

No branches or pull requests

2 participants