Datetime picker (plugins wrapper) for Angular2.
Demo and docs: https://nkalinov.github.io/ng2-datetime
- Bootstrap3 (CSS only)
- jQuery 2+ (supports v3)
- Bootstrap-datepicker (JS+CSS)
npm install --save bootstrap-datepicker
- or use the bundled version from
src/vendor/bootstrap-datepicker
- Bootstrap-timepicker (JS+CSS)
npm install --save bootstrap-timepicker
- or use the bundled version from
src/vendor/bootstrap-timepicker
npm install --save ng2-datetime
- import some way or another the required dependencies
import { NKDatetimeModule } from 'ng2-datetime/ng2-datetime';
- Add it to your app module's
imports
property
@NgModule({
...
imports: [NKDatetimeModule, ...],
...
})
- Use it:
<datetime [(ngModel)]="date"></datetime>
See the DEMO and it source for more info and available options.
Fork > Create > Pull request
- @jdewit for the timepicker plugin
- @eternicode for the datepicker plugin