# 📅 新日历功能：循环活动的结束日期

**URL:** <https://meta.discourse.org/t/new-calendar-feature-end-date-for-recurring-events/368527>\
**Category:** Announcements\
**Tags:** events\
**Created:** [2025 年6 月 2 日 11:42 UTC](https://meta.discourse.org/t/new-calendar-feature-end-date-for-recurring-events/368527 "2025-06-02T11:42:29Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

作者： ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
发布日期： [2026 年9 月 4 日 20:23 UTC](https://meta.discourse.org/t/new-calendar-feature-end-date-for-recurring-events/368527/7 "2026-09-04T20:23:50Z")

</div>

我认为截图显示的是 **插入日期/时间** 对话框，而不是 **创建事件** 对话框。

在 Discourse Calendar 中，这是两个不同的工作流程：

- `插入日期/时间` 用于回复中包含 `[calendar]` 代码块的帖子。
- `创建事件` 会创建一个实际的事件（`[event ...][/event]`），并且在这里可以设置重复事件的选项，包括重复结束日期。

因此，对于本主题中提到的功能，请尝试打开编辑器中的 `+` 菜单，选择 **创建事件** ，而不是 **插入日期/时间** 。

我最近也在测试重复事件流程，并发现了一个边界情况：当有界重复完全过期后会出现问题。我已经在此处提交了一个修复：

> <https://github.com/discourse/discourse/pull/43260>
>
> \## Summary
> 
> Fixes recurring Event labels rendering \`Every Invalid date\` after a …bounded recurrence has expired.
> 
> When the final occurrence of a recurring Event has passed, \`starts\_at\` can be \`nil\` while the Event still retains its recurrence and serialized RRULE. The recurrence label was deriving its weekday from the missing \`starts\_at\`, resulting in an invalid Moment date.
> 
> This change falls back to the original \`DTSTART\` contained in the serialized RRULE when there is no current \`startsAt\`.
> 
> Existing behavior is unchanged while a current occurrence is available.
> 
> \## Tests
> 
> Added coverage for:
> 
> \- an expired all-day weekly Event with no current occurrence
> \- an expired timed monthly Event using the fourth weekday of the month
> 
> Manual smoke testing also covered:
> 
> \- the original all-day weekly reproduction
> \- a timed weekly Event in \`Europe/London\`
> \- a timed fourth-Thursday monthly Event
> 
> The broader discourse-events JavaScript run completed with:
> 
> \> 274 tests, 273 passed, 1 skipped, 0 failed
> 
> The focused expired-event tests pass with no deprecation warnings.
> 
> Also verified with Prettier, ESLint, and \`git diff --check\`.

---

_[View the full topic](https://meta.discourse.org/t/new-calendar-feature-end-date-for-recurring-events/368527)._
