Skip to content

Commit

Permalink
Fix date demo in gallery (home-assistant#16894)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Jun 13, 2023
1 parent 6e3cf09 commit 197638b
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions gallery/src/pages/date-time/date.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import { html, css, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../../src/components/ha-card";
import { HomeAssistant } from "../../../../src/types";
import { translationMetadata } from "../../../../src/resources/translations-metadata";
import "@material/mwc-list/mwc-list";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
import { formatDateNumeric } from "../../../../src/common/datetime/format_date";
import "../../../../src/components/ha-card";
import {
DateFormat,
FirstWeekday,
FrontendLocaleData,
NumberFormat,
TimeFormat,
DateFormat,
FirstWeekday,
TimeZone,
} 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")
export class DemoDateTimeDate extends LitElement {
@property({ attribute: false }) hass!: HomeAssistant;

protected render() {
const defaultLocale: FrontendLocaleData = {
language: "en",
Expand Down Expand Up @@ -51,7 +49,7 @@ export class DemoDateTimeDate extends LitElement {
language: key,
date_format: DateFormat.language,
},
this.hass.config
demoConfig
)}
</div>
<div class="center">
Expand All @@ -62,7 +60,7 @@ export class DemoDateTimeDate extends LitElement {
language: key,
date_format: DateFormat.DMY,
},
this.hass.config
demoConfig
)}
</div>
<div class="center">
Expand All @@ -73,7 +71,7 @@ export class DemoDateTimeDate extends LitElement {
language: key,
date_format: DateFormat.MDY,
},
this.hass.config
demoConfig
)}
</div>
<div class="center">
Expand All @@ -84,7 +82,7 @@ export class DemoDateTimeDate extends LitElement {
language: key,
date_format: DateFormat.YMD,
},
this.hass.config
demoConfig
)}
</div>
</div>
Expand Down

0 comments on commit 197638b

Please sign in to comment.