mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Fix date demo in gallery (#16894)
This commit is contained in:
parent
6e3cf0975b
commit
197638b282
@ -1,23 +1,21 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { css, html, LitElement } from "lit";
|
||||||
import "../../../../src/components/ha-card";
|
import { customElement } from "lit/decorators";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatDateNumeric } from "../../../../src/common/datetime/format_date";
|
import { formatDateNumeric } from "../../../../src/common/datetime/format_date";
|
||||||
|
import "../../../../src/components/ha-card";
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
import "@material/mwc-list/mwc-list";
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
|
||||||
@customElement("demo-date-time-date")
|
@customElement("demo-date-time-date")
|
||||||
export class DemoDateTimeDate extends LitElement {
|
export class DemoDateTimeDate extends LitElement {
|
||||||
@property({ attribute: false }) hass!: HomeAssistant;
|
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
const defaultLocale: FrontendLocaleData = {
|
const defaultLocale: FrontendLocaleData = {
|
||||||
language: "en",
|
language: "en",
|
||||||
@ -51,7 +49,7 @@ export class DemoDateTimeDate extends LitElement {
|
|||||||
language: key,
|
language: key,
|
||||||
date_format: DateFormat.language,
|
date_format: DateFormat.language,
|
||||||
},
|
},
|
||||||
this.hass.config
|
demoConfig
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@ -62,7 +60,7 @@ export class DemoDateTimeDate extends LitElement {
|
|||||||
language: key,
|
language: key,
|
||||||
date_format: DateFormat.DMY,
|
date_format: DateFormat.DMY,
|
||||||
},
|
},
|
||||||
this.hass.config
|
demoConfig
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@ -73,7 +71,7 @@ export class DemoDateTimeDate extends LitElement {
|
|||||||
language: key,
|
language: key,
|
||||||
date_format: DateFormat.MDY,
|
date_format: DateFormat.MDY,
|
||||||
},
|
},
|
||||||
this.hass.config
|
demoConfig
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@ -84,7 +82,7 @@ export class DemoDateTimeDate extends LitElement {
|
|||||||
language: key,
|
language: key,
|
||||||
date_format: DateFormat.YMD,
|
date_format: DateFormat.YMD,
|
||||||
},
|
},
|
||||||
this.hass.config
|
demoConfig
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user