Angular Tempus Dominus Bootstrap 4
About
This is an angular wrapper for the Bootstrap 4 datepicker: "Tempus Dominus" version 5.
This version depends on the current version of tempus dominus bootstrap wich is in development, so this wrapper could have a lot of change in future.
Installation
- Install the directive via npm
npm install ng-tempusdominus-bootstrap4 --save
-
Install & Include dependents libraries in your application:
-
jquery.js,
-
bootstrap (.js & .css),
-
tempusdominus bootstrap 4 (.js & .css),
-
moment.
npm install jquery bootstrap moment tempusdominus-core tempusdominus-bootstrap-4 --save
Example configuration for Angular-cli project with Angular 2, 4, and 5.
In .angular-cli.json file:"styles":,"scripts":,
-
-
Add the
NgTempusdominusBootstrapModule
module import in your module.:
;; @ {}
- Start using!
Usage
Input group: (there are 3 directive you shoud use: NgTempusdominusBootstrap
, NgTempusdominusBootstrapInput
, and NgTempusdominusBootstrapToggle
)
Input Only: (use: NgTempusdominusBootstrapInput
)
NgTempusdominusBootstrapInput
Parameters with options
With options
attribute you can pass an object containing all the required configuration for the tempus dominus v5.
All the options available in the original library are supported. Check the list of options on official website: https://tempusdominus.github.io/bootstrap-4/Options/
options = format: "DD.MM.YYYY" maxDate: minDate: date // ...;