Skip to content

Allow initial View in Calendar Card#6982

Merged
bramkragten merged 3 commits intodevfrom
calendar-inital-view
Sep 25, 2020
Merged

Allow initial View in Calendar Card#6982
bramkragten merged 3 commits intodevfrom
calendar-inital-view

Conversation

@zsarnett
Copy link
Contributor

Breaking change

Proposed change

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

inital_view: dayGridMonth | listWeek | dayGridDay

Additional information

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

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:

@zsarnett zsarnett linked an issue Sep 17, 2020 that may be closed by this pull request
});

this._config = config;
this._config = { initial_view: "dayGridMonth", ...config };
Copy link
Member

Choose a reason for hiding this comment

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

The default already is dayGridMonth, so this is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, if this._config.initialView is undefined then we set it on the calendar as undefined. The property default gets overridden by Undefined. ifDefined directive is only for attributes I believe (or I didn't set it up correctly) so the default here is needed unless there is another way I have missed (which I am sure there is)

@cadavre
Copy link

cadavre commented Sep 24, 2020

@zsarnett really looking forward to get this merged!

@bramkragten
Copy link
Member

@zsarnett really looking forward to get this merged!

Please just add a thumbs-up reaction for things like this. Now everyone is pinged.

@bramkragten bramkragten merged commit 9cf9e6e into dev Sep 25, 2020
@bramkragten bramkragten deleted the calendar-inital-view branch September 25, 2020 07:58
@bramkragten bramkragten mentioned this pull request Sep 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
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.

Calendar card: Allow choosing default view

4 participants