Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 1.63 KB

README.md

File metadata and controls

51 lines (41 loc) · 1.63 KB

ng2-datetime

npm version

Datetime picker (plugins wrapper) for Angular.

Dependencies

Installation

npm install --save ng2-datetime

If your project does not use jQuery yet, add the required jQuery packages as well:

npm install jquery --save
npm install @types/jquery --save

Usage

  1. import some way or another the required dependencies in the following order:

    • Bootstrap CSS
    • jQuery
    • bootstrap-timepicker + bootstrap-datepicker

    See this example

  2. import { NKDatetimeModule } from 'ng2-datetime/ng2-datetime';

  3. Add it to your app module's imports property

@NgModule({
    ...
    imports: [NKDatetimeModule, ...],
    ...
})
  1. Use it: <datetime [(ngModel)]="date"></datetime>

See the DEMO and it source for more info and available options.

Contributing

Fork > Create > Pull request

Thanks to