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

Calendar events when user changes month/year #7039

Closed
dlyushukov opened this issue Apr 1, 2020 · 6 comments · Fixed by #7748
Closed

Calendar events when user changes month/year #7039

dlyushukov opened this issue Apr 1, 2020 · 6 comments · Fixed by #7748
Assignees
Labels
📆 calendar size: M 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@dlyushukov
Copy link

Is your feature request related to a problem? Please describe.

When user clicks on previous/next month arrow icon or select another year from the calendar's header an event should be emitted.

Describe the solution you'd like

New @output events on calendar component should be implemented

Additional context

image

@zdrawku
Copy link
Contributor

zdrawku commented Apr 13, 2020

Thank you @dlyushukov for this feature request. @radomirchev @StefanIvanov we might consider the following:

  • Add onActiveDateSelection event emitter, that will fire when the active element is changed. We currently have two views month and year and the active element is the current date on calendar initialization. The active element is changed on keyboard navigation as well.

Note: currently we have only onSelection event emitter that fires when a date is selected. Respectively when a year is selected from "years" view the current date will be set as active in the newly selected year.

  • Set active date on month/year change. Our default behavior now is selecting (and activating) the current day, and on month change (e.g. with the arrows) the corresponding day of the next/prev month will be selected.

Note: for the cases when the current month doesn't have date equivalent for next/prev month, we will put in "active state" the last day of the month.

Feel free to share your thoughts as well.

As for terminology, we might consider the following - Focused element (13th of April) and active element (14th of April):
image

@github-actions
Copy link

There has been no recent activity and this issue has been marked inactive.

@github-actions github-actions bot added the status: inactive Used to stale issues and pull requests label Jun 13, 2020
@dlyushukov
Copy link
Author

Hello! Any updates on it?

@radomirchev radomirchev added size: M and removed status: inactive Used to stale issues and pull requests labels Jun 16, 2020
@StefanIvanov
Copy link
Contributor

@zdrawku I think the first approach is a more general solution to the customer request extending the emission of an event on month, year change with additional emission when another date is activated. However, I'd suggest using something like onDateActivation. The second approach would work as well but to me solves just this instance of the problem seen by the customer and is not an ultimate type of solution.

@radomirchev
Copy link
Contributor

@dlyushukov, the feature request is in the list for the current milestone. You could follow the milestone progress on the Roadmap board or in the Roadmap file.

@zdrawku
Copy link
Contributor

zdrawku commented Jul 3, 2020

The following will be addressed with the POC before the meeting:

  • onViewDateChanged event will be exposed, it will emit IViewDateChangedEventArgs with previousValue and currentValue properties. Both properties will return the first day of the month.

Note: If viewDate is not set, we will return the first day of the month.

  • onActiveViewChanged event will be exposed as well, that will emit CalendarView enum for Default, Year, Decade views.

@zdrawku zdrawku added the 🛠️ status: in-development Issues and PRs with active development on them label Jul 3, 2020
@zdrawku zdrawku added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Jul 8, 2020
hanastasov added a commit that referenced this issue Jul 8, 2020
hanastasov added a commit that referenced this issue Jul 9, 2020
zdrawku added a commit that referenced this issue Jul 10, 2020
Add calendar events when presented month/year in view is changed #7039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📆 calendar size: M 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants