Migrating Datepickers from Semantic UI to Bootstrap

In this document we'll be using SUI for ng2-semantic-ui and Bootstrap for ng-bootstrap. `

Support

In order to use the ngbDatePicker you need to declare the provider in app.module.ts.

import { NgbDateAdapter, NgbDateNativeUTCAdapter } from '@ng-bootstrap/ng-bootstrap';

... 

providers: [
    ...,
    {provide: NgbDateAdapter, useClass: NgbDateNativeUTCAdapter}
  ],

Migration

SUI date pickers follow this structure:

<input suiDatepicker
       id="endDatePicker"
       [(ngModel)]="endDate"
       [pickerMode]="'date'"
       [pickerPlacement] = "left"
       (pickerSelectedDateChange)="onEndDateChange()"
       [pickerFirstDayOfWeek]="1"
       [pickerUseNativeOnMobile]="false">

Bootstrap templates follow this structure instead:

<input ngbDatepicker
     placeholder="YYYY-MM-DD"
     #endDP="ngbDatepicker"
     [(ngModel)]="endDate"
     (click)="endDP.toggle()"
     (ngModelChange)="onEndDateChange()">

Notes