ng-bootstrap-daterangepicker-plus 0.1.0

source | bootstrap-daterangepicker

Simple sample

<input ng-daterange ng-model="dates1"> {{dates1|json}}
{{dates1|json}}

Formatting

<input ng-daterange ng-model="dates2" format="MMM DD" separator="/">{{dates2|json}}
{{dates2|json}}

Limiting range length and possible dates

<input ng-daterange ng-model="dates3" separator="/" min-date="2013-09-10" max-date="2013-09-20" limit="1 day"> {{dates3|json}}
{{dates3|json}}

Preset ranges

<input type="daterange" ng-model="dates4" ranges="ranges"> {{dates4|json}}
function sampleCtrl($scope) {
	$scope.ranges = {
		'Today': [moment(), moment()],
		'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
		'Last 7 days': [moment().subtract('days', 7), moment()],
		'Last 30 days': [moment().subtract('days', 30), moment()],
		'This month': [moment().startOf('month'), moment().endOf('month')]
	};
}
{{dates4|json}}

Localization

<input type="daterange" ng-model="dates5" locale="locale"> {{dates5|json}}
function sampleCtrl($scope) {
	$scope.locale = {
		applyLabel: 'Готово',
		cancelLabel: 'Отмена',
		fromLabel: 'С',
		toLabel: 'По',
		weekLabel: 'Н',
		customRangeLabel: 'Другой промежуток',
		daysOfWeek: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
		monthNames: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
		firstDay: 1
	};
}
{{dates5|json}}

Originally authored by Luis Farzati