angular-daterangepicker-plus

WebJar for angular-daterangepicker-plus

Лицензия

Лицензия

MIT
Категории

Категории

Angular Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

angular-daterangepicker-plus
Последняя версия

Последняя версия

0.1.17
Дата

Дата

Тип

Тип

jar
Описание

Описание

angular-daterangepicker-plus
WebJar for angular-daterangepicker-plus
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/martindalec/angular-daterangepicker-plus

Скачать angular-daterangepicker-plus

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-daterangepicker-plus/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-daterangepicker-plus</artifactId>
    <version>0.1.17</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-daterangepicker-plus/
implementation 'org.webjars.bower:angular-daterangepicker-plus:0.1.17'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-daterangepicker-plus/
implementation ("org.webjars.bower:angular-daterangepicker-plus:0.1.17")
'org.webjars.bower:angular-daterangepicker-plus:jar:0.1.17'
<dependency org="org.webjars.bower" name="angular-daterangepicker-plus" rev="0.1.17">
  <artifact name="angular-daterangepicker-plus" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-daterangepicker-plus', version='0.1.17')
)
libraryDependencies += "org.webjars.bower" % "angular-daterangepicker-plus" % "0.1.17"
[org.webjars.bower/angular-daterangepicker-plus "0.1.17"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.bower : angular jar [1.3.0,1.4)
org.webjars.bower : bootstrap jar [3.3.0,3.4)
org.webjars.bower : bootstrap-daterangepicker jar [1.3.17,1.4)

Модули Проекта

Данный проект не имеет модулей.

Date Range Picker for Angular and Bootstrap

Dependencies

Based on code from Fragaria

Angular.js directive for Dan Grossmans's Bootstrap Datepicker.

Date Range Picker screenshot

Installation via Bower

The easiest way to install the picker is:

bower install angular-daterangepicker-plus --save

Manual installation

This directive depends on Bootstrap Datepicker, Bootstrap, Moment.js and jQuery. Download dependencies above and then use minified or normal version.

Basic usage

Assuming that bower installation directory is bower_components. In case of other installation directory, please update paths accordingly.

<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/momentjs/moment.js"></script>
<script src="bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<script src="bower_components/angular-daterangepicker/js/angular-daterangepicker-plus.js"></script>

<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/>
<link rel="stylesheet" href="bower_components/bootstrap-daterangepicker/daterangepicker-bs3.css"/>

Declare dependency:

App = angular.module('app', ['daterangepicker']);

Prepare model in your controller. The model must have startDate and endDate attributes:

exampleApp.controller('TestCtrl', function ($scope) {
	$scope.date = {startDate: null, endDate: null};
}

Then in your HTML just add attribute date-range-picker to any input and bind it to model.

<div ng-controller="TestCtrl">
<input date-range-picker class="form-control date-picker" type="text" ng-model="date" />
</div>

See example.html or click here for working demo.

Advanced usage

Min and max value can be set via additional attributes:

<input date-range-picker class="form-control date-picker" type="text" ng-model="date" min="'2014-02-23'" max="'2015-02-25'"/>

The date picker can be later customized by passing options attribute.

options = {
        format: 'MM/DD/YYYY',
        ranges: {
            'Standard': [moment().subtract(7, 'days'), moment().add(7, 'days')],
            'Today': [moment(), moment()],
            'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
            'Last 7 days': [moment().subtract(7, 'days'), moment()],
            'Last 30 days': [moment().subtract(30, 'days'), moment()],
            'This month': [moment().startOf('month'), moment().endOf('month')]
        }

Compatibility

Version > 0.1.1 requires Bootstrap Datepicker 1.3.3 and newer.

Version 0.1.0 works with Bootstrap Datepicker 1.3.2 and older.

Links

See original documentation.

Версии библиотеки

Версия
0.1.17