Skip to content

Commit

Permalink
docs: release 10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maxokorokov committed Jul 1, 2021
1 parent 08886af commit 11708c8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
54 changes: 54 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,57 @@
# [10.0.0](https://github.com/ng-bootstrap/ng-bootstrap/compare/9.1.3...10.0.0) (2021-07-01)

This release adds Angular 12 support

### BREAKING CHANGES

* **datepicker:** The deprecated datepicker `@Input() showWeekdays: boolean` is removed from `NgbDatepicker` and `NgbInputDatepicker`.
It was replaced by `@Input() weekdays: TranslationWidth | boolean;` that also allows providing `TranslationWidth` if necessary.

BEFORE:
```
<!-- datepicker -->
<ngb-datepicker [showWeekdays]="true"></ngb-datepicker>
<input ngbDatepicker [showWeekdays]="true"></input>
<!-- datepicker config -->
constructor(config: NgbDatepickerConfig) {
config.showWeekdays = true;
}
```

AFTER:
```
<!-- datepicker -->
<ngb-datepicker [weekdays]="true"></ngb-datepicker>
<input ngbDatepicker [weekdays]="true"></input>
<!-- datepicker config -->
constructor(config: NgbDatepickerConfig) {
config.weekdays = TranslationWidth.Short;
}
```
* **datepicker:** This change concerns you if you're creating custom datepicker calendars and i18ns.

The deprecated datepicker `getWeekdayShortName(weekday: number): string;` is removed from `NgbDatepickerI18n`.
It was replaced by `getWeekdayLabel(weekday: number, width?: TranslationWidth): string;` to add `TranslationWidth` option and align naming.

BEFORE:
```
@Injectable()
export class MyDatepickerI18n extends NgbDatepickerI18n {
getWeekdayShortName(weekday: number) { return 'your weekday short name'; }
}
```

AFTER:
```
@Injectable()
export class MyDatepickerI18n extends NgbDatepickerI18n {
getWeekdayLabel(weekday: number, width?: TranslationWidth) { return 'your weekday short name'; }
}
```


## [9.1.3](https://github.com/ng-bootstrap/ng-bootstrap/compare/9.1.2...9.1.3) (2021-06-16)


Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@ng-bootstrap/ng-bootstrap",
"version": "9.1.3",
"version": "10.0.0",
"description": "Angular powered Bootstrap",
"author": "https://github.com/ng-bootstrap/ng-bootstrap/graphs/contributors",
"engines": {
Expand Down

0 comments on commit 11708c8

Please sign in to comment.