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 new Events & Fixes Related to Single Month View #298

Merged
merged 5 commits into from Sep 9, 2021
Merged

Add new Events & Fixes Related to Single Month View #298

merged 5 commits into from Sep 9, 2021

Conversation

maaqib121
Copy link
Contributor

@maaqib121 maaqib121 commented Sep 6, 2021

#277

Issues in single month view:

  1. Let's suppose today is September 6, 2021. If we pass :singleMonth="true" and endDate="2021-11-15", it will stop paginating at October and will not allow us to go to November which is basically the month of endDate.

  2. Create two months in generateInitialMonths() method even if we pass :singleMonth="true". The disadvantage of this is when we are in singleMonth view and the current month is September, the next-month-rendered with send November as its argument instead of October.

Fixes

  1. In case of :singleMonth="true", the pagination will now stop at the month of end date rather than a month before the month of end date, while the existing behavior for double months will remain the same

  2. In case of :singleMonth="true", generateInitialMonths() method will create one month, while the default behavior for double months will remain the same.

Events Added

  1. 'previous-month-rendered' event will emit whenever user will click on previous month.
  2. 'check-in-selected' event will emit whenever user will click on check in date irrespective of whether it is the consecutive click on the same checkin date or not. ('check-in-changed' event does not trigger when selects the same check in date consecutively).

@matiasperrone
Copy link
Collaborator

@maaqib121 did you tested the "normal" functionality, let say all the other configuration that does not have this issue?

@maaqib121
Copy link
Contributor Author

@matiasperrone Yes, I have tested the normal functionality before each commit and then tested as a whole before making the PR.

@matiasperrone matiasperrone merged commit 3071e3e into ZestfulNation:main Sep 9, 2021
@matiasperrone
Copy link
Collaborator

Can you upload the docs (readme.md) for the new events?... so I can publish the new version?

@maaqib121
Copy link
Contributor Author

Can you upload the docs (readme.md) for the new events?... so I can publish the new version?

Sure, I'll update it

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.

None yet

2 participants