@ui-platform/angularjs-bootstrap4-datetimepicker
v1.0.1
Published
This directive allows you to add a datetime-picker to your form elements.
Downloads
4
Maintainers
Readme
Angular bootstrap date & time picker
Native AngularJS datetime picker directive styled by Twitter Bootstrap 4
[![MIT License][license-image]][license-url]
Forked from dalelotts/angularjs-bootstrap-datetimepicker
updated to use bootstrap 4 instead of bootstrap 3
Install
npm i @ui-platform/angularjs-bootstrap4-datetimepicker
Usage
Add the css:
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css"> <!-- "bootstrap": "^4.1.3"-->
<link rel="stylesheet" href="node_modules/@fortawesome/fontawesome-free/css/all.css"> <!-- "@fortawesome/fontawesome-free": "^5.3.1"-->
<link rel="stylesheet" href="node_modules/@ui-platform/angularjs-bootstrap4-datetimepicker/dist/datetimepicker.css"/>
Load the script files in your application:
<script type="text/javascript" src="node_modules/moment/moment.js"></script> <!-- "moment": "^2.x" -->
<script type="text/javascript" src="node_modules/angular/angular.js"></script> <!-- "angular": "^1.x"-->
<script type="text/javascript" src="node_modules/@ui-platform/angularjs-bootstrap4-datetimepicker/dist/datetimepicker.js"></script>
<script type="text/javascript" src="node_modules/angular-date-time-input/src/dateTimeInput.js"></script> <!-- "angular-date-time-input": "^1.2.1" -->
Add the date module as a dependency to your application module:
var myAppModule = angular.module('MyApp', ['ui.bootstrap.datetimepicker'])
Apply the directive to your form elements:
<datetimepicker data-ng-model="data.date"></datetimepicker>