Commit Graph

5 Commits

Author SHA1 Message Date
Ahmad Mehrabi 715499fe4e feat(date-picker): add Jalali (Persian) calendar support (#1429)
* feat(date-picker): add Jalali (Persian) calendar support

- Add pure Jalali calendar math algorithms (no npm packages)
- Add JalaliDate class with valueOf() for reliable calendar comparison
- Add BrnJalaliDateAdapter implementing BrnDateAdapter<JalaliDate>
- Add comprehensive unit tests for all adapter methods
- Add Persian (Farsi) calendar i18n with RTL layout
- Add Jalali date picker example to docs page
- Add Storybook story with Persian locale
- Extend TranslateService to support 'fa' language

* feat(date-picker): add Jalali (Persian) calendar support

Add pure Jalali calendar math, JalaliDate class, and BrnJalaliDateAdapter with tests.

Move example from component docs to blocks/calendar page per PR review.

* refactor: clean up jalali date-time code

- Deduplicate JALALI_MONTHS array in calendar i18n files
- snake_case to camelCase in PersianDate (gregorianDaysInMonth, jalaliDaysInMonth)
- Expand cryptic param names (j_y to jalaliYear, g_y to gregorianYear, etc.)
- Remove parseInt() no-ops on typed number params
- Remove getMonthName (i18n concern, not calendrical)
- Destructure tuples with descriptive names across adapter/date/persian-date
- Fix month+day add drift: clamp day after month step before day arithmetic

* style: fix long line formatting to pass nx format check

* fix(date-picker): resolve merge conflicts from upstream and stashed changes

Merge descriptive variable names (_constrain, parseInt, getMonthName,
full descriptive names) with upstream descriptive names. All tests pass.

* refactor: remove parseInt unwrapping and getMonthName, add PersianDate tests
2026-06-15 15:05:30 +02:00
Merlin 9e34f79ded refactor: consistent type import 2025-09-29 14:42:31 +02:00
moosme 3e878f1baf feat(date-picker): add date range picker #606 (#823)
* feat(date-picker): add date range picker #606

* feat(date-picker): finalize date range picker #606

* feat(date-picker): add utc date adapter #606

* feat(date-picker): add health checks #606

* feat(date-picker): code suggestions #606

* feat(date-picker): restore selected month #606

---------

Co-authored-by: Merlin Moos <merlin.moos@oldendorff.com>
2025-08-24 22:29:00 +02:00
Max Hovens 35908a58e6 fix: ensure BrnLuxonDateAdapter#getDay() returns a value between 0 and 6 (#676)
* fix: ensure BrnLuxDateAdapter#getDay() returns a value between 0-6 (#675)

* docs: document expectations on return type for the DateAdapter (#675)

* test: add tests for BrnLuxonDateAdapter and BrnNativeDateAdapter (#675)

* chore: fix linting issues
2025-05-05 12:39:40 +02:00
Ashley Hunter be4a87dc87 refactor: migrating remaining brain libraries to secondary entrypoints (#523)
* refactor: migrating remaining brain libraries to secondary entrypoints

* refactor: migrating remaining brain libraries to secondary entrypoints
2024-12-10 18:40:46 +01:00