I am trying to use Tempus Dominus with Bootstrap 4 and AngularJS.
Sadly, I can't get it to work, I get an error.
I have the following code:
var picker = $('#datetimepicker1'); // I tried this
var picker = angular.element( document.querySelector( '#datetimepicker1' ) ); // And this
picker.datetimepicker();
I get the following error:
Uncaught TypeError: picker.datetimepicker is not a function
at HTMLDocument.<anonymous> (eventDetailController.js:15)
at j (jquery.min.js:2)
at k (jquery.min.js:2)
Require
I am using RequireJS and this is my shim loader part for datetimepicker:
'datetimepicker': {
deps: ['jquery', 'moment-wrapper', 'moment']
}
More Information
I am using NPM and Bower (no Webpack).
- Bootstrap: v4.0.0-alpha.6
- jQuery: latest