mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Enable all-day / multi-day rendering for calendar (#14660)
This commit is contained in:
parent
0b377c060c
commit
fe0492c2e0
@ -69,7 +69,6 @@ const defaultFullCalendarConfig: CalendarOptions = {
|
|||||||
initialView: "dayGridMonth",
|
initialView: "dayGridMonth",
|
||||||
dayMaxEventRows: true,
|
dayMaxEventRows: true,
|
||||||
height: "parent",
|
height: "parent",
|
||||||
eventDisplay: "list-item",
|
|
||||||
locales: allLocales,
|
locales: allLocales,
|
||||||
views: {
|
views: {
|
||||||
listWeek: {
|
listWeek: {
|
||||||
@ -97,6 +96,8 @@ export class HAFullCalendar extends LitElement {
|
|||||||
|
|
||||||
@property() public initialView: FullCalendarView = "dayGridMonth";
|
@property() public initialView: FullCalendarView = "dayGridMonth";
|
||||||
|
|
||||||
|
@property() public eventDisplay = "auto";
|
||||||
|
|
||||||
@property({ attribute: false }) public error?: string = undefined;
|
@property({ attribute: false }) public error?: string = undefined;
|
||||||
|
|
||||||
private calendar?: Calendar;
|
private calendar?: Calendar;
|
||||||
@ -246,6 +247,7 @@ export class HAFullCalendar extends LitElement {
|
|||||||
locale: this.hass.language,
|
locale: this.hass.language,
|
||||||
firstDay: firstWeekdayIndex(this.hass.locale),
|
firstDay: firstWeekdayIndex(this.hass.locale),
|
||||||
initialView: this.initialView,
|
initialView: this.initialView,
|
||||||
|
eventDisplay: this.eventDisplay,
|
||||||
eventTimeFormat: {
|
eventTimeFormat: {
|
||||||
hour: useAmPm(this.hass.locale) ? "numeric" : "2-digit",
|
hour: useAmPm(this.hass.locale) ? "numeric" : "2-digit",
|
||||||
minute: useAmPm(this.hass.locale) ? "numeric" : "2-digit",
|
minute: useAmPm(this.hass.locale) ? "numeric" : "2-digit",
|
||||||
|
@ -134,6 +134,7 @@ export class HuiCalendarCard extends LitElement implements LovelaceCard {
|
|||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.views=${views}
|
.views=${views}
|
||||||
.initialView=${this._config.initial_view!}
|
.initialView=${this._config.initial_view!}
|
||||||
|
.eventDisplay=${"list-item"}
|
||||||
.error=${this._error}
|
.error=${this._error}
|
||||||
@view-changed=${this._handleViewChanged}
|
@view-changed=${this._handleViewChanged}
|
||||||
></ha-full-calendar>
|
></ha-full-calendar>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user