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

Set initial calendar event date based on active calendar view #14516

Merged
merged 3 commits into from Dec 5, 2022

Conversation

spacegaier
Copy link
Member

Breaking change

Proposed change

When calendar view is in week or day view and a new event is added, pre-fill the starting date appropriately.

Month view => Current date (logic unchanged)
Week view => First day of week
Day view => Displayed day is used

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@RosemaryOrchard
Copy link

If you're in a month view that's not the current month, would it make sense to choose the first day of that month as the default?

@spacegaier
Copy link
Member Author

If you're in a month view that's not the current month, would it make sense to choose the first day of that month as the default?

That's a valid point. I did not change the month view so far, since for the current month, the current date is highlighted / selected and I did not want to default back to another day. But for the other months I agree it makes sense to default to the first day of month (not the first shown day in the view though, as for December we see the 27th since the first week started back then).

RosemaryOrchard
RosemaryOrchard previously approved these changes Dec 2, 2022
@spacegaier spacegaier added this to the 2022.12 milestone Dec 3, 2022
Copy link
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@bramkragten bramkragten merged commit 96080f3 into home-assistant:dev Dec 5, 2022
@spacegaier spacegaier deleted the cal-selected-date branch December 5, 2022 14:50
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants