Fix Date Time Helper (#11367)

This commit is contained in:
Zack Barett 2022-01-21 08:36:39 -06:00 committed by GitHub
parent 303e065433
commit 3bf19883a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,13 +2,13 @@ import "@polymer/paper-input/paper-input";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators";
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/ha-formfield";
import "../../../../components/ha-icon-picker";
import "../../../../components/ha-radio";
import type { HaRadio } from "../../../../components/ha-radio";
import { InputDateTime } from "../../../../data/input_datetime";
import { haStyle } from "../../../../resources/styles";
import { HomeAssistant } from "../../../../types";
import "../../../../components/ha-formfield";
import "../../../../components/ha-radio";
import type { HaRadio } from "../../../../components/ha-radio";
@customElement("ha-input_datetime-form")
class HaInputDateTimeForm extends LitElement {
@ -35,6 +35,8 @@ class HaInputDateTimeForm extends LitElement {
: item.has_time
? "time"
: "date";
this._item.has_date =
!item.has_date && !item.has_time ? true : item.has_date;
} else {
this._name = "";
this._icon = "";