Skip to content

Releases: ng-bootstrap/ng-bootstrap

11.0.0-beta.2

05 Jul 08:44
Compare
Choose a tag to compare
11.0.0-beta.2 Pre-release
Pre-release

This release adds Angular 12 support for the Bootstrap 5 beta version along with a couple of bugfixes.

Bug Fixes

  • accordion: fix broken collapse animation (801093a)
  • datepicker: fix header colors (c24880c)

10.0.0

01 Jul 14:00
Compare
Choose a tag to compare

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 accepts 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'; }
}