Datetime picker (plugins wrapper) for Angular2.
- 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 {NKDatetime} from 'ng2-datetime/ng2-datetime';
- Add to your component's directives property
@Component({
...
directives: [NKDatetime],
...
})
- Use it:
<datetime [(ngModel)]="date"></datetime>
See the DEMO and it source for more information.
Fork > Create > Pull request
- @jdewit for the timepicker plugin
- @eternicode for the datepicker plugin
- test ControlValueAccessor