Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Cherry-picks the calendar date formatting fixes from PR #16618 (merged to master/21.0.x) to the 20.1.x branch. Addresses date display issues in locales that include non-numeric characters (e.g., zh-CN displays "25日" instead of "25").

Changes

  • DayDigitPipe: New standalone pipe that extracts numeric day values from localized date strings using regex matching
  • Template binding: Days view now pipes formattedDate() through dayDigit to strip locale-specific suffixes/prefixes in the UI while preserving programmatic API format
  • Calendar styles: Added white-space: nowrap to %date-inner and %weekday-label to prevent unexpected text wrapping
  • Test coverage: Added spec verifying zh-CN locale behavior—programmatic API returns full "25日" while template displays "25"
  • Sample updates: Added formatViews property and zh-CN locale option for manual testing

Path Adaptations for 20.1.x

Original PR targeted projects/igniteui-angular/calendar/src/calendar/, adapted to 20.1.x structure at projects/igniteui-angular/src/lib/calendar/.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
Original prompt

Cherry-pick the changes from the merged pull request #16618 (fix(calendar): fix date styles and formatting) into the 20.1.x branch. Ensure all fixes for date styles and formatting in the Calendar component are accurately applied to maintain consistency across versions.

This pull request was created as a result of the following prompt from Copilot chat.

Cherry-pick the changes from the merged pull request #16618 (fix(calendar): fix date styles and formatting) into the 20.1.x branch. Ensure all fixes for date styles and formatting in the Calendar component are accurately applied to maintain consistency across versions.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…mponent

Co-authored-by: desig9stein <21260963+desig9stein@users.noreply.github.com>
@desig9stein desig9stein marked this pull request as ready for review December 12, 2025 12:31
Co-authored-by: desig9stein <21260963+desig9stein@users.noreply.github.com>
Copilot AI changed the title [WIP] Cherry-pick date styles and formatting fixes from PR #16618 Cherry-pick PR #16618: fix calendar date styles and formatting to 20.1.x Dec 12, 2025
Copilot AI requested a review from desig9stein December 12, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants