mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
Fix Date Time Helper (#11367)
This commit is contained in:
parent
303e065433
commit
3bf19883a8
@ -2,13 +2,13 @@ import "@polymer/paper-input/paper-input";
|
|||||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||||
|
import "../../../../components/ha-formfield";
|
||||||
import "../../../../components/ha-icon-picker";
|
import "../../../../components/ha-icon-picker";
|
||||||
|
import "../../../../components/ha-radio";
|
||||||
|
import type { HaRadio } from "../../../../components/ha-radio";
|
||||||
import { InputDateTime } from "../../../../data/input_datetime";
|
import { InputDateTime } from "../../../../data/input_datetime";
|
||||||
import { haStyle } from "../../../../resources/styles";
|
import { haStyle } from "../../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../../types";
|
import { HomeAssistant } from "../../../../types";
|
||||||
import "../../../../components/ha-formfield";
|
|
||||||
import "../../../../components/ha-radio";
|
|
||||||
import type { HaRadio } from "../../../../components/ha-radio";
|
|
||||||
|
|
||||||
@customElement("ha-input_datetime-form")
|
@customElement("ha-input_datetime-form")
|
||||||
class HaInputDateTimeForm extends LitElement {
|
class HaInputDateTimeForm extends LitElement {
|
||||||
@ -35,6 +35,8 @@ class HaInputDateTimeForm extends LitElement {
|
|||||||
: item.has_time
|
: item.has_time
|
||||||
? "time"
|
? "time"
|
||||||
: "date";
|
: "date";
|
||||||
|
this._item.has_date =
|
||||||
|
!item.has_date && !item.has_time ? true : item.has_date;
|
||||||
} else {
|
} else {
|
||||||
this._name = "";
|
this._name = "";
|
||||||
this._icon = "";
|
this._icon = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user