Skip to content

fix(flex-fields): make DateTimeViewComponent respect DateTime.InputMode - #235

Merged
duguankui merged 1 commit into
mainfrom
fix/date-time-view-input-mode-234
Sep 6, 2026
Merged

fix(flex-fields): make DateTimeViewComponent respect DateTime.InputMode#235
duguankui merged 1 commit into
mainfrom
fix/date-time-view-input-mode-234

Conversation

@duguankui

Copy link
Copy Markdown
Member

Summary

  • DateTimeViewComponent always rendered value | shortDateTime, ignoring the field's DateTime.InputMode configuration, so Date/Month-mode fields showed a spurious time part in every read-only context (including Table columns dispatched through ff-table-view).
  • It now mirrors DateTimeControlComponent's approach: look up the configured mode's format in DATE_INPUT_MODE_FORMATS, format with DatePipe, and fall back to the shortDateTime pipe when no configuration/mode is available (so existing usages that never pass field.configuration render unchanged).
  • Added CHANGELOG.md entry under [Unreleased].

Closes #234

Test plan

  • ng test flex-fields — full suite, 43 files / 306 tests, all passing (including 3 new InputMode cases + 1 no-configuration fallback case in date-time-view.component.spec.ts)
  • ng build flex-fields — builds cleanly

DateTimeViewComponent always rendered value | shortDateTime, ignoring
the field's DateTime.InputMode configuration. Date/Month-mode fields
therefore showed a spurious time part in every read-only context,
including Table columns dispatched through ff-table-view.

Mirror DateTimeControlComponent's approach: look up the configured
mode's format in DATE_INPUT_MODE_FORMATS and format with DatePipe,
falling back to the shortDateTime pipe when no configuration/mode is
available.

Fixes #234
@github-actions github-actions Bot added documentation Improvements or additions to documentation area: angular Changes under either module's angular/ Angular workspace module: flex-fields Changes under flex-fields/ (Dignite.Abp.FlexFields) labels Sep 6, 2026
@duguankui
duguankui merged commit 63fe7b2 into main Sep 6, 2026
3 checks passed
@duguankui
duguankui deleted the fix/date-time-view-input-mode-234 branch September 6, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: angular Changes under either module's angular/ Angular workspace documentation Improvements or additions to documentation module: flex-fields Changes under flex-fields/ (Dignite.Abp.FlexFields)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flex-fields: DateTimeViewComponent ignores DateTime.InputMode, always shows short date-time

1 participant