Skip to content

fix: use calendar/browser date locale for time entry date headers (#2740) - #2746

Merged
callumalpass merged 3 commits into
mainfrom
fix/2740-time-entry-date-locale
Nov 30, 2026
Merged

callumalpass merged 3 commits into
mainfrom
fix/2740-time-entry-date-locale

Conversation

@callumalpass

Copy link
Copy Markdown
Owner

Fixes #2740.

Summary

  • Updated TimeEntryEditorModal to format each time entry's date header using getPluginCalendarLocale(this.plugin) (configured calendarViewSettings.locale, falling back to navigator.language and then the runtime default locale) instead of uiLocale(), matching TaskNotes' documented numeric date-ordering policy (docs/development/translations.md) and the native <input type="datetime-local"> controls directly below it.
  • Restored dateDisplayFormat === "iso" handling for the time entry header (using parseVaultDateOption + formatDateLabel), which had been added in [FR]: FR: Support configurable ISO-8601 date format in "Task Information" modal #2354 and dropped during the v5 Lingui merge, and preserved configured vault time zone handling.
  • Added fallback handling if a configured calendarViewSettings.locale is invalid.
  • Left the other two toLocaleDateString(uiLocale(), ...) call sites unchanged:
    • src/components/CustomRecurrenceModal.ts:238 (weekday: "long" inside "Weekly on {day}")
    • src/ui/NotificationService.ts:732 (month: "short", day: "numeric" inside missed-reminder sentences)
      Both format prose weekday/month names inside translated UI sentences, so they should continue to follow uiLocale().
  • Added unit tests in tests/unit/modals/TimeEntryEditorModal.test.ts and updated docs/releases/unreleased.md.

Validation

  • npm run i18n:check
  • npm run build
  • npm run typecheck
  • npm run lint
  • npx jest tests/unit/modals/TimeEntryEditorModal.test.ts tests/unit/issues/issue-2354-date-display-format.test.ts tests/unit/issues/issue-2206-time-entry-editor-large-list.test.ts tests/unit/issues/issue-1602-time-entry-timezone-mismatch.test.ts

@callumalpass
callumalpass merged commit 1e5b832 into main Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Time entry date header uses US date order while the rest of the dialog uses the system date locale

1 participant