Skip to content

feat: add granular date/time part format presets#142

Merged
liamwalder merged 2 commits intodevelopfrom
feat/more-date-formatting-options
Apr 9, 2026
Merged

feat: add granular date/time part format presets#142
liamwalder merged 2 commits intodevelopfrom
feat/more-date-formatting-options

Conversation

@tristan-mouchet
Copy link
Copy Markdown
Collaborator

@tristan-mouchet tristan-mouchet commented Apr 8, 2026

Summary

Add individual date and time part format options when binding CMS date/time fields to text, allowing users to display just the day, month, year, hour, minute, or AM/PM independently.

Changes

  • Add "Date parts" preset section with weekday, month, day, and year variants (long/short, padded/unpadded)
  • Add "Time parts" preset section with hour (12h/24h, padded/unpadded), minute, and AM/PM
  • Add detail helper text to part presets for clarity in the dropdown
  • Use a fixed sample date for all format previews so padding differences are visible
  • Make the format selector popover scrollable for long preset lists
  • Fix SSR date formatting to use raw ISO values instead of pre-formatted strings when applying custom format presets

Test plan

  • Bind a date/time CMS field to a text layer and verify all new part formats appear in the dropdown
  • Bind a date-only CMS field and verify only date parts appear (no time parts)
  • Select a part format (e.g. "Month name") and verify it renders correctly on canvas
  • Publish the page and verify the same format renders correctly on the generated page
  • Verify the format dropdown scrolls when the list is long
  • Verify preview labels show correct padding differences (e.g. "7" vs "07")

- Add "Date parts" section (weekday, month, day, year with variants)
- Add "Time parts" section (hour 12h/24h, minute, AM/PM)
- Use fixed sample date for consistent format previews
- Make format dropdown scrollable for long lists
- Fix SSR rendering to use raw ISO values for custom formats
@tristan-mouchet tristan-mouchet added the Feature request A new feature request label Apr 8, 2026
@tristan-mouchet tristan-mouchet self-assigned this Apr 8, 2026
@liamwalder liamwalder merged commit 5e86a6a into develop Apr 9, 2026
3 checks passed
@liamwalder liamwalder deleted the feat/more-date-formatting-options branch April 9, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature request A new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants