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",
|
||||
dayMaxEventRows: true,
|
||||
height: "parent",
|
||||
eventDisplay: "list-item",
|
||||
locales: allLocales,
|
||||
views: {
|
||||
listWeek: {
|
||||
|
@ -97,6 +96,8 @@ export class HAFullCalendar extends LitElement {
|
|||
|
||||
@property() public initialView: FullCalendarView = "dayGridMonth";
|
||||
|
||||
@property() public eventDisplay = "auto";
|
||||
|
||||
@property({ attribute: false }) public error?: string = undefined;
|
||||
|
||||
private calendar?: Calendar;
|
||||
|
@ -246,6 +247,7 @@ export class HAFullCalendar extends LitElement {
|
|||
locale: this.hass.language,
|
||||
firstDay: firstWeekdayIndex(this.hass.locale),
|
||||
initialView: this.initialView,
|
||||
eventDisplay: this.eventDisplay,
|
||||
eventTimeFormat: {
|
||||
hour: 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}
|
||||
.views=${views}
|
||||
.initialView=${this._config.initial_view!}
|
||||
.eventDisplay=${"list-item"}
|
||||
.error=${this._error}
|
||||
@view-changed=${this._handleViewChanged}
|
||||
></ha-full-calendar>
|
||||
|
|
Loading…
Reference in New Issue