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

Fix for second event now showing when range is less than a day and event spans across 2 days #29

Merged
merged 1 commit into from
Oct 30, 2019
Merged

Fix for second event now showing when range is less than a day and event spans across 2 days #29

merged 1 commit into from
Oct 30, 2019

Conversation

itsnorbertkalacska
Copy link
Contributor

Description

If for EventsCollection the displayAllDay flag was set to false and the range was less than a day and the event spanned across 2 days (i.e. 2019-10-25 23:00:00 - 2019-10-26 09:00:00) then the event for the second day didn't show. This PR fixes this issue.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Related links
https://github.com/rotaready/moment-range#snapto
https://github.com/rotaready/moment-range#by - see the part when .snapTo() method is used

Changelog

Added

  • test for case when range is less than one day but event spans across 2 days

Fixed

  • EventsCollection's constructor when it calculates the days for events

@itsnorbertkalacska
Copy link
Contributor Author

@nathanstitt Hi there!

Thank you for your cooperation with us! It's such a tremendous help for us! We love using your component!

We'd really appreciate if you could take a look at this quick fix!

Thank you in advance!

Cheers 🤙🏼

@itsnorbertkalacska
Copy link
Contributor Author

@nathanstitt is there any chance you could take a look at this? It's just a short one :)

@nathanstitt
Copy link
Owner

Nifty! I wasn't aware of snapTo, that solves it cleanly

@nathanstitt nathanstitt merged commit a2c91a9 into nathanstitt:master Oct 30, 2019
@itsnorbertkalacska itsnorbertkalacska deleted the fix/range-is-less-than-a-day-shows-up-only-as-one-event branch October 31, 2019 08:55
@itsnorbertkalacska
Copy link
Contributor Author

@nathanstitt Thank you so much!

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