mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix recurrence rule generation for UNTIL rules (#14541)
This commit is contained in:
parent
71a5d8c6f9
commit
1aa6bd5577
@ -189,6 +189,7 @@ class DialogCalendarEventEditor extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<ha-recurrence-rule-editor
|
<ha-recurrence-rule-editor
|
||||||
.locale=${this.hass.locale}
|
.locale=${this.hass.locale}
|
||||||
|
.timezone=${this.hass.config.time_zone}
|
||||||
.value=${this._rrule || ""}
|
.value=${this._rrule || ""}
|
||||||
@value-changed=${this._handleRRuleChanged}
|
@value-changed=${this._handleRRuleChanged}
|
||||||
>
|
>
|
||||||
|
@ -34,6 +34,8 @@ export class RecurrenceRuleEditor extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public locale!: HomeAssistant["locale"];
|
@property({ attribute: false }) public locale!: HomeAssistant["locale"];
|
||||||
|
|
||||||
|
@property() public timezone?: string;
|
||||||
|
|
||||||
@state() private _computedRRule = "";
|
@state() private _computedRRule = "";
|
||||||
|
|
||||||
@state() private _freq?: RepeatFrequency = "none";
|
@state() private _freq?: RepeatFrequency = "none";
|
||||||
@ -292,6 +294,7 @@ export class RecurrenceRuleEditor extends LitElement {
|
|||||||
byweekday: ruleByWeekDay(this._weekday),
|
byweekday: ruleByWeekDay(this._weekday),
|
||||||
count: this._count,
|
count: this._count,
|
||||||
until: this._until,
|
until: this._until,
|
||||||
|
tzid: this.timezone,
|
||||||
};
|
};
|
||||||
const contentline = RRule.optionsToString(options);
|
const contentline = RRule.optionsToString(options);
|
||||||
return contentline.slice(6); // Strip "RRULE:" prefix
|
return contentline.slice(6); // Strip "RRULE:" prefix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user