ng-zorro-antd
ng-zorro-antd copied to clipboard
feat(module:datepicker): date-adapter support for other calendars
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] The commit message follows our guidelines: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md#commit
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:
What is the current behavior?
Issue Number: #6270
What is the new behavior?
CandyDate utility functions moved to a separate date adapter class which can be provided by its token. now users are able to provide custom date adapters to represent other calendars like Jalali or Hijri and deal with native Date objects differently.
Example
jalali-moment date adapter example
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
This preview will be available after the AzureCI is passed.
Codecov Report
Merging #7485 (47d6d5e) into master (40815ad) will increase coverage by
0.05%
. The diff coverage is90.57%
.
@@ Coverage Diff @@
## master #7485 +/- ##
==========================================
+ Coverage 91.58% 91.63% +0.05%
==========================================
Files 496 497 +1
Lines 16418 16518 +100
Branches 2548 2549 +1
==========================================
+ Hits 15037 15137 +100
+ Misses 1057 1056 -1
- Partials 324 325 +1
Impacted Files | Coverage Δ | |
---|---|---|
...mponents/date-picker/lib/decade-table.component.ts | 94.73% <ø> (ø) |
|
components/i18n/nz-i18n.service.ts | 87.50% <ø> (ø) |
|
components/i18n/nz-i18n.token.ts | 100.00% <ø> (ø) |
|
...omponents/date-picker/lib/abstract-panel-header.ts | 95.34% <50.00%> (+0.11%) |
:arrow_up: |
components/date-picker/lib/abstract-table.ts | 92.15% <80.00%> (+0.49%) |
:arrow_up: |
...mponents/date-picker/date-range-popup.component.ts | 95.18% <83.33%> (+0.02%) |
:arrow_up: |
components/core/time/date-adapter.ts | 84.90% <84.90%> (ø) |
|
components/i18n/date-helper.service.ts | 92.10% <90.00%> (+1.19%) |
:arrow_up: |
components/core/time/candy-date.ts | 94.73% <95.00%> (+8.25%) |
:arrow_up: |
components/calendar/calendar-header.component.ts | 100.00% <100.00%> (ø) |
|
... and 12 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 40815ad...47d6d5e. Read the comment docs.
This is very useful. Please apply
+1. This is a heavily needed feature.
Please add date adapter support for other calendars to the framework https://github.com/NG-ZORRO/ng-zorro-antd/issues/7567
+1
Can we hope for this feature to be merged anytime soon?
oh, this feature is so good, please merge it ...
+1
I think this feature is a most-wanted. @wenqi73 seems to be inactive for a while. Consider to reassign the code review? cc @simplejason
@wenqi73 @simplejason This useful feature should have been added to the framework a long time ago. This is also available in the ng-bootstrap framework. https://ng-bootstrap.github.io/#/components/datepicker/calendars
after six months, still, no update about this feature. awesome 😶
I released the package for this issue, please visit my library : https://www.npmjs.com/package/ng-met-antd
thanks @moein459
I released the package for this issue, please visit my library : https://www.npmjs.com/package/nz-date-picker-jalali
thanks @moein459
this package does not work for my project. I have been waiting for months for this issue to be resolved :( @hullis @wenqi73 @simplejason
Can you explain your planning for this task? @hullis
I released the package for this issue, please visit my library : https://www.npmjs.com/package/nz-date-picker-jalali thanks @moein459
this package does not work for my project. I have been waiting for months for this issue to be resolved :( @hullis @wenqi73 @simplejason
check new package bro: https://www.npmjs.com/package/ng-met-antd
Is this going to happen anytime soon? :( it's been years...
@saeidi-dev Didn't you find a way to have this feature without consider the package update? I really do need this one
@saeidi-dev Didn't you find a way to have this feature without consider the package update? I really do need this one
You can use this package https://www.npmjs.com/package/ng-met-antd
@saeidi-dev Didn't you find a way to have this feature without consider the package update? I really do need this one
You can use this package https://www.npmjs.com/package/ng-met-antd
But it's not compatible with angular 17. I couldn't use it
@saeidi-dev Didn't you find a way to have this feature without consider the package update? I really do need this one
You can use this package https://www.npmjs.com/package/ng-met-antd
But it's not compatible with angular 17. I couldn't use it
I am using this package on version 17