feat: exposes gotoPeriod method to top level, removes unused event parameter #212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Please put "X" in the below checkboxes that apply::
I have tested the following:
This PR solves the following problem**.
Allows for more customization of the calendar. A fully custom header can be achieved by hiding the default one, calling for example
@click="$refs.calendar.mode = 'month'
to change mode, and with my pull request, utilize the existing goToPeriod method to change period rather than having to create a method that modifies selected-date.I have run the existing Vitest suite, and I guess an improvement could be to create a test along with buttons in the same file as the Qalendar element, with the test running the method through the ref by clicking
How to test this PR**.
For example:
$refs.<refname>.goToPeriod('next')
and$refs.<refname>.goToPeriod('previous')