aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bower_components/bootstrap-daterangepicker
diff options
context:
space:
mode:
authorMarvin Borner2018-07-13 19:06:45 +0200
committerMarvin Borner2018-07-13 19:06:45 +0200
commit6fcfb7c04d32e1c8b26a312295bf7ac3ec2d2ad7 (patch)
treedbc87ef16fa01d5d99116de283592b8fe5e02944 /public/bower_components/bootstrap-daterangepicker
parentdfd839f27146df0ad0494e11734fc7d310c70ebf (diff)
Fixed many permissions and began admin interface
Diffstat (limited to 'public/bower_components/bootstrap-daterangepicker')
-rw-r--r--public/bower_components/bootstrap-daterangepicker/.bower.json31
-rw-r--r--public/bower_components/bootstrap-daterangepicker/README.md44
-rw-r--r--public/bower_components/bootstrap-daterangepicker/bower.json20
-rw-r--r--public/bower_components/bootstrap-daterangepicker/daterangepicker.css269
-rw-r--r--public/bower_components/bootstrap-daterangepicker/daterangepicker.js1653
-rw-r--r--public/bower_components/bootstrap-daterangepicker/daterangepicker.scss611
-rw-r--r--public/bower_components/bootstrap-daterangepicker/demo.html369
-rw-r--r--public/bower_components/bootstrap-daterangepicker/drp.pngbin0 -> 216210 bytes
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/amd/index.html210
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/amd/main.js141
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/amd/require.js36
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/browserify/README.md11
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/browserify/bundle.js0
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/browserify/index.html209
-rw-r--r--public/bower_components/bootstrap-daterangepicker/example/browserify/main.js135
-rw-r--r--public/bower_components/bootstrap-daterangepicker/package.js18
-rw-r--r--public/bower_components/bootstrap-daterangepicker/package.json32
-rw-r--r--public/bower_components/bootstrap-daterangepicker/website/index.html836
-rw-r--r--public/bower_components/bootstrap-daterangepicker/website/website.css127
-rw-r--r--public/bower_components/bootstrap-daterangepicker/website/website.js146
20 files changed, 4898 insertions, 0 deletions
diff --git a/public/bower_components/bootstrap-daterangepicker/.bower.json b/public/bower_components/bootstrap-daterangepicker/.bower.json
new file mode 100644
index 0000000..859cfc5
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/.bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "bootstrap-daterangepicker",
+ "main": [
+ "daterangepicker.js",
+ "daterangepicker.css"
+ ],
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests",
+ "moment.js",
+ "moment.min.js"
+ ],
+ "dependencies": {
+ "jquery": "1.9.1 - 3",
+ "moment": ">=2.9.0"
+ },
+ "homepage": "https://github.com/dangrossman/bootstrap-daterangepicker",
+ "version": "2.1.27",
+ "_release": "2.1.27",
+ "_resolution": {
+ "type": "version",
+ "tag": "v2.1.27",
+ "commit": "d4aabfbceaf57117e1af33f3f82e92162719eee9"
+ },
+ "_source": "https://github.com/dangrossman/bootstrap-daterangepicker.git",
+ "_target": "^2.1.25",
+ "_originalSource": "bootstrap-daterangepicker"
+} \ No newline at end of file
diff --git a/public/bower_components/bootstrap-daterangepicker/README.md b/public/bower_components/bootstrap-daterangepicker/README.md
new file mode 100644
index 0000000..d6be83d
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/README.md
@@ -0,0 +1,44 @@
+# Date Range Picker for Bootstrap
+
+![Improvely.com](http://i.imgur.com/LbAMf3D.png)
+
+This date range picker component for Bootstrap creates a dropdown menu from which a user can
+select a range of dates. I created it while building the UI for [Improvely](http://www.improvely.com),
+which needed a way to select date ranges for reports.
+
+Features include limiting the selectable date range, localizable strings and date formats,
+a single date picker mode, optional time picker (for e.g. making appointments or reservations),
+and styles that match the default Bootstrap 3 theme.
+
+## [Documentation and Live Usage Examples](http://www.daterangepicker.com)
+
+## [See It In a Live Application](https://awio.iljmp.com/5/drpdemogh)
+
+## License
+
+This code is made available under the same license as Bootstrap. Moment.js is included in this repository
+for convenience. It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
+
+--
+
+The MIT License (MIT)
+
+Copyright (c) 2012-2017 Dan Grossman
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/public/bower_components/bootstrap-daterangepicker/bower.json b/public/bower_components/bootstrap-daterangepicker/bower.json
new file mode 100644
index 0000000..d42995a
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/bower.json
@@ -0,0 +1,20 @@
+{
+ "name": "bootstrap-daterangepicker",
+ "main": [
+ "daterangepicker.js",
+ "daterangepicker.css"
+ ],
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests",
+ "moment.js",
+ "moment.min.js"
+ ],
+ "dependencies": {
+ "jquery": "1.9.1 - 3",
+ "moment": ">=2.9.0"
+ }
+}
diff --git a/public/bower_components/bootstrap-daterangepicker/daterangepicker.css b/public/bower_components/bootstrap-daterangepicker/daterangepicker.css
new file mode 100644
index 0000000..86f4b77
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/daterangepicker.css
@@ -0,0 +1,269 @@
+.daterangepicker {
+ position: absolute;
+ color: inherit;
+ background-color: #fff;
+ border-radius: 4px;
+ width: 278px;
+ padding: 4px;
+ margin-top: 1px;
+ top: 100px;
+ left: 20px;
+ /* Calendars */ }
+ .daterangepicker:before, .daterangepicker:after {
+ position: absolute;
+ display: inline-block;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: ''; }
+ .daterangepicker:before {
+ top: -7px;
+ border-right: 7px solid transparent;
+ border-left: 7px solid transparent;
+ border-bottom: 7px solid #ccc; }
+ .daterangepicker:after {
+ top: -6px;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #fff;
+ border-left: 6px solid transparent; }
+ .daterangepicker.opensleft:before {
+ right: 9px; }
+ .daterangepicker.opensleft:after {
+ right: 10px; }
+ .daterangepicker.openscenter:before {
+ left: 0;
+ right: 0;
+ width: 0;
+ margin-left: auto;
+ margin-right: auto; }
+ .daterangepicker.openscenter:after {
+ left: 0;
+ right: 0;
+ width: 0;
+ margin-left: auto;
+ margin-right: auto; }
+ .daterangepicker.opensright:before {
+ left: 9px; }
+ .daterangepicker.opensright:after {
+ left: 10px; }
+ .daterangepicker.dropup {
+ margin-top: -5px; }
+ .daterangepicker.dropup:before {
+ top: initial;
+ bottom: -7px;
+ border-bottom: initial;
+ border-top: 7px solid #ccc; }
+ .daterangepicker.dropup:after {
+ top: initial;
+ bottom: -6px;
+ border-bottom: initial;
+ border-top: 6px solid #fff; }
+ .daterangepicker.dropdown-menu {
+ max-width: none;
+ z-index: 3001; }
+ .daterangepicker.single .ranges, .daterangepicker.single .calendar {
+ float: none; }
+ .daterangepicker.show-calendar .calendar {
+ display: block; }
+ .daterangepicker .calendar {
+ display: none;
+ max-width: 270px;
+ margin: 4px; }
+ .daterangepicker .calendar.single .calendar-table {
+ border: none; }
+ .daterangepicker .calendar th, .daterangepicker .calendar td {
+ white-space: nowrap;
+ text-align: center;
+ min-width: 32px; }
+ .daterangepicker .calendar-table {
+ border: 1px solid #fff;
+ padding: 4px;
+ border-radius: 4px;
+ background-color: #fff; }
+ .daterangepicker table {
+ width: 100%;
+ margin: 0; }
+ .daterangepicker td, .daterangepicker th {
+ text-align: center;
+ width: 20px;
+ height: 20px;
+ border-radius: 4px;
+ border: 1px solid transparent;
+ white-space: nowrap;
+ cursor: pointer; }
+ .daterangepicker td.available:hover, .daterangepicker th.available:hover {
+ background-color: #eee;
+ border-color: transparent;
+ color: inherit; }
+ .daterangepicker td.week, .daterangepicker th.week {
+ font-size: 80%;
+ color: #ccc; }
+ .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
+ background-color: #fff;
+ border-color: transparent;
+ color: #999; }
+ .daterangepicker td.in-range {
+ background-color: #ebf4f8;
+ border-color: transparent;
+ color: #000;
+ border-radius: 0; }
+ .daterangepicker td.start-date {
+ border-radius: 4px 0 0 4px; }
+ .daterangepicker td.end-date {
+ border-radius: 0 4px 4px 0; }
+ .daterangepicker td.start-date.end-date {
+ border-radius: 4px; }
+ .daterangepicker td.active, .daterangepicker td.active:hover {
+ background-color: #357ebd;
+ border-color: transparent;
+ color: #fff; }
+ .daterangepicker th.month {
+ width: auto; }
+ .daterangepicker td.disabled, .daterangepicker option.disabled {
+ color: #999;
+ cursor: not-allowed;
+ text-decoration: line-through; }
+ .daterangepicker select.monthselect, .daterangepicker select.yearselect {
+ font-size: 12px;
+ padding: 1px;
+ height: auto;
+ margin: 0;
+ cursor: default; }
+ .daterangepicker select.monthselect {
+ margin-right: 2%;
+ width: 56%; }
+ .daterangepicker select.yearselect {
+ width: 40%; }
+ .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
+ width: 50px;
+ margin-bottom: 0; }
+ .daterangepicker .input-mini {
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #555;
+ height: 30px;
+ line-height: 30px;
+ display: block;
+ vertical-align: middle;
+ margin: 0 0 5px 0;
+ padding: 0 6px 0 28px;
+ width: 100%; }
+ .daterangepicker .input-mini.active {
+ border: 1px solid #08c;
+ border-radius: 4px; }
+ .daterangepicker .daterangepicker_input {
+ position: relative; }
+ .daterangepicker .daterangepicker_input i {
+ position: absolute;
+ left: 8px;
+ top: 8px; }
+ .daterangepicker.rtl .input-mini {
+ padding-right: 28px;
+ padding-left: 6px; }
+ .daterangepicker.rtl .daterangepicker_input i {
+ left: auto;
+ right: 8px; }
+ .daterangepicker .calendar-time {
+ text-align: center;
+ margin: 5px auto;
+ line-height: 30px;
+ position: relative;
+ padding-left: 28px; }
+ .daterangepicker .calendar-time select.disabled {
+ color: #ccc;
+ cursor: not-allowed; }
+
+.ranges {
+ font-size: 11px;
+ float: none;
+ margin: 4px;
+ text-align: left; }
+ .ranges ul {
+ list-style: none;
+ margin: 0 auto;
+ padding: 0;
+ width: 100%; }
+ .ranges li {
+ font-size: 13px;
+ background-color: #f5f5f5;
+ border: 1px solid #f5f5f5;
+ border-radius: 4px;
+ color: #08c;
+ padding: 3px 12px;
+ margin-bottom: 8px;
+ cursor: pointer; }
+ .ranges li:hover {
+ background-color: #08c;
+ border: 1px solid #08c;
+ color: #fff; }
+ .ranges li.active {
+ background-color: #08c;
+ border: 1px solid #08c;
+ color: #fff; }
+
+/* Larger Screen Styling */
+@media (min-width: 564px) {
+ .daterangepicker {
+ width: auto; }
+ .daterangepicker .ranges ul {
+ width: 160px; }
+ .daterangepicker.single .ranges ul {
+ width: 100%; }
+ .daterangepicker.single .calendar.left {
+ clear: none; }
+ .daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .calendar {
+ float: left; }
+ .daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .calendar {
+ float: right; }
+ .daterangepicker.ltr {
+ direction: ltr;
+ text-align: left; }
+ .daterangepicker.ltr .calendar.left {
+ clear: left;
+ margin-right: 0; }
+ .daterangepicker.ltr .calendar.left .calendar-table {
+ border-right: none;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0; }
+ .daterangepicker.ltr .calendar.right {
+ margin-left: 0; }
+ .daterangepicker.ltr .calendar.right .calendar-table {
+ border-left: none;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0; }
+ .daterangepicker.ltr .left .daterangepicker_input {
+ padding-right: 12px; }
+ .daterangepicker.ltr .calendar.left .calendar-table {
+ padding-right: 12px; }
+ .daterangepicker.ltr .ranges, .daterangepicker.ltr .calendar {
+ float: left; }
+ .daterangepicker.rtl {
+ direction: rtl;
+ text-align: right; }
+ .daterangepicker.rtl .calendar.left {
+ clear: right;
+ margin-left: 0; }
+ .daterangepicker.rtl .calendar.left .calendar-table {
+ border-left: none;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0; }
+ .daterangepicker.rtl .calendar.right {
+ margin-right: 0; }
+ .daterangepicker.rtl .calendar.right .calendar-table {
+ border-right: none;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0; }
+ .daterangepicker.rtl .left .daterangepicker_input {
+ padding-left: 12px; }
+ .daterangepicker.rtl .calendar.left .calendar-table {
+ padding-left: 12px; }
+ .daterangepicker.rtl .ranges, .daterangepicker.rtl .calendar {
+ text-align: right;
+ float: right; } }
+@media (min-width: 730px) {
+ .daterangepicker .ranges {
+ width: auto; }
+ .daterangepicker.ltr .ranges {
+ float: left; }
+ .daterangepicker.rtl .ranges {
+ float: right; }
+ .daterangepicker .calendar.left {
+ clear: none !important; } }
diff --git a/public/bower_components/bootstrap-daterangepicker/daterangepicker.js b/public/bower_components/bootstrap-daterangepicker/daterangepicker.js
new file mode 100644
index 0000000..079cde6
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/daterangepicker.js
@@ -0,0 +1,1653 @@
+/**
+* @version: 2.1.27
+* @author: Dan Grossman http://www.dangrossman.info/
+* @copyright: Copyright (c) 2012-2017 Dan Grossman. All rights reserved.
+* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
+* @website: http://www.daterangepicker.com/
+*/
+// Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Make globaly available as well
+ define(['moment', 'jquery'], function (moment, jquery) {
+ if (!jquery.fn) jquery.fn = {}; // webpack server rendering
+ return factory(moment, jquery);
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node / Browserify
+ //isomorphic issue
+ var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined;
+ if (!jQuery) {
+ jQuery = require('jquery');
+ if (!jQuery.fn) jQuery.fn = {};
+ }
+ var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment');
+ module.exports = factory(moment, jQuery);
+ } else {
+ // Browser globals
+ root.daterangepicker = factory(root.moment, root.jQuery);
+ }
+}(this, function(moment, $) {
+ var DateRangePicker = function(element, options, cb) {
+
+ //default settings for options
+ this.parentEl = 'body';
+ this.element = $(element);
+ this.startDate = moment().startOf('day');
+ this.endDate = moment().endOf('day');
+ this.minDate = false;
+ this.maxDate = false;
+ this.dateLimit = false;
+ this.autoApply = false;
+ this.singleDatePicker = false;
+ this.showDropdowns = false;
+ this.showWeekNumbers = false;
+ this.showISOWeekNumbers = false;
+ this.showCustomRangeLabel = true;
+ this.timePicker = false;
+ this.timePicker24Hour = false;
+ this.timePickerIncrement = 1;
+ this.timePickerSeconds = false;
+ this.linkedCalendars = true;
+ this.autoUpdateInput = true;
+ this.alwaysShowCalendars = false;
+ this.ranges = {};
+
+ this.opens = 'right';
+ if (this.element.hasClass('pull-right'))
+ this.opens = 'left';
+
+ this.drops = 'down';
+ if (this.element.hasClass('dropup'))
+ this.drops = 'up';
+
+ this.buttonClasses = 'btn btn-sm';
+ this.applyClass = 'btn-success';
+ this.cancelClass = 'btn-default';
+
+ this.locale = {
+ direction: 'ltr',
+ format: moment.localeData().longDateFormat('L'),
+ separator: ' - ',
+ applyLabel: 'Apply',
+ cancelLabel: 'Cancel',
+ weekLabel: 'W',
+ customRangeLabel: 'Custom Range',
+ daysOfWeek: moment.weekdaysMin(),
+ monthNames: moment.monthsShort(),
+ firstDay: moment.localeData().firstDayOfWeek()
+ };
+
+ this.callback = function() { };
+
+ //some state information
+ this.isShowing = false;
+ this.leftCalendar = {};
+ this.rightCalendar = {};
+
+ //custom options from user
+ if (typeof options !== 'object' || options === null)
+ options = {};
+
+ //allow setting options with data attributes
+ //data-api options will be overwritten with custom javascript options
+ options = $.extend(this.element.data(), options);
+
+ //html template for the picker UI
+ if (typeof options.template !== 'string' && !(options.template instanceof $))
+ options.template = '<div class="daterangepicker dropdown-menu">' +
+ '<div class="calendar left">' +
+ '<div class="daterangepicker_input">' +
+ '<input class="input-mini form-control" type="text" name="daterangepicker_start" value="" />' +
+ '<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' +
+ '<div class="calendar-time">' +
+ '<div></div>' +
+ '<i class="fa fa-clock-o glyphicon glyphicon-time"></i>' +
+ '</div>' +
+ '</div>' +
+ '<div class="calendar-table"></div>' +
+ '</div>' +
+ '<div class="calendar right">' +
+ '<div class="daterangepicker_input">' +
+ '<input class="input-mini form-control" type="text" name="daterangepicker_end" value="" />' +
+ '<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' +
+ '<div class="calendar-time">' +
+ '<div></div>' +
+ '<i class="fa fa-clock-o glyphicon glyphicon-time"></i>' +
+ '</div>' +
+ '</div>' +
+ '<div class="calendar-table"></div>' +
+ '</div>' +
+ '<div class="ranges">' +
+ '<div class="range_inputs">' +
+ '<button class="applyBtn" disabled="disabled" type="button"></button> ' +
+ '<button class="cancelBtn" type="button"></button>' +
+ '</div>' +
+ '</div>' +
+ '</div>';
+
+ this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl);
+ this.container = $(options.template).appendTo(this.parentEl);
+
+ //
+ // handle all the possible options overriding defaults
+ //
+
+ if (typeof options.locale === 'object') {
+
+ if (typeof options.locale.direction === 'string')
+ this.locale.direction = options.locale.direction;
+
+ if (typeof options.locale.format === 'string')
+ this.locale.format = options.locale.format;
+
+ if (typeof options.locale.separator === 'string')
+ this.locale.separator = options.locale.separator;
+
+ if (typeof options.locale.daysOfWeek === 'object')
+ this.locale.daysOfWeek = options.locale.daysOfWeek.slice();
+
+ if (typeof options.locale.monthNames === 'object')
+ this.locale.monthNames = options.locale.monthNames.slice();
+
+ if (typeof options.locale.firstDay === 'number')
+ this.locale.firstDay = options.locale.firstDay;
+
+ if (typeof options.locale.applyLabel === 'string')
+ this.locale.applyLabel = options.locale.applyLabel;
+
+ if (typeof options.locale.cancelLabel === 'string')
+ this.locale.cancelLabel = options.locale.cancelLabel;
+
+ if (typeof options.locale.weekLabel === 'string')
+ this.locale.weekLabel = options.locale.weekLabel;
+
+ if (typeof options.locale.customRangeLabel === 'string'){
+ //Support unicode chars in the custom range name.
+ var elem = document.createElement('textarea');
+ elem.innerHTML = options.locale.customRangeLabel;
+ var rangeHtml = elem.value;
+ this.locale.customRangeLabel = rangeHtml;
+ }
+ }
+ this.container.addClass(this.locale.direction);
+
+ if (typeof options.startDate === 'string')
+ this.startDate = moment(options.startDate, this.locale.format);
+
+ if (typeof options.endDate === 'string')
+ this.endDate = moment(options.endDate, this.locale.format);
+
+ if (typeof options.minDate === 'string')
+ this.minDate = moment(options.minDate, this.locale.format);
+
+ if (typeof options.maxDate === 'string')
+ this.maxDate = moment(options.maxDate, this.locale.format);
+
+ if (typeof options.startDate === 'object')
+ this.startDate = moment(options.startDate);
+
+ if (typeof options.endDate === 'object')
+ this.endDate = moment(options.endDate);
+
+ if (typeof options.minDate === 'object')
+ this.minDate = moment(options.minDate);
+
+ if (typeof options.maxDate === 'object')
+ this.maxDate = moment(options.maxDate);
+
+ // sanity check for bad options
+ if (this.minDate && this.startDate.isBefore(this.minDate))
+ this.startDate = this.minDate.clone();
+
+ // sanity check for bad options
+ if (this.maxDate && this.endDate.isAfter(this.maxDate))
+ this.endDate = this.maxDate.clone();
+
+ if (typeof options.applyClass === 'string')
+ this.applyClass = options.applyClass;
+
+ if (typeof options.cancelClass === 'string')
+ this.cancelClass = options.cancelClass;
+
+ if (typeof options.dateLimit === 'object')
+ this.dateLimit = options.dateLimit;
+
+ if (typeof options.opens === 'string')
+ this.opens = options.opens;
+
+ if (typeof options.drops === 'string')
+ this.drops = options.drops;
+
+ if (typeof options.showWeekNumbers === 'boolean')
+ this.showWeekNumbers = options.showWeekNumbers;
+
+ if (typeof options.showISOWeekNumbers === 'boolean')
+ this.showISOWeekNumbers = options.showISOWeekNumbers;
+
+ if (typeof options.buttonClasses === 'string')
+ this.buttonClasses = options.buttonClasses;
+
+ if (typeof options.buttonClasses === 'object')
+ this.buttonClasses = options.buttonClasses.join(' ');
+
+ if (typeof options.showDropdowns === 'boolean')
+ this.showDropdowns = options.showDropdowns;
+
+ if (typeof options.showCustomRangeLabel === 'boolean')
+ this.showCustomRangeLabel = options.showCustomRangeLabel;
+
+ if (typeof options.singleDatePicker === 'boolean') {
+ this.singleDatePicker = options.singleDatePicker;
+ if (this.singleDatePicker)
+ this.endDate = this.startDate.clone();
+ }
+
+ if (typeof options.timePicker === 'boolean')
+ this.timePicker = options.timePicker;
+
+ if (typeof options.timePickerSeconds === 'boolean')
+ this.timePickerSeconds = options.timePickerSeconds;
+
+ if (typeof options.timePickerIncrement === 'number')
+ this.timePickerIncrement = options.timePickerIncrement;
+
+ if (typeof options.timePicker24Hour === 'boolean')
+ this.timePicker24Hour = options.timePicker24Hour;
+
+ if (typeof options.autoApply === 'boolean')
+ this.autoApply = options.autoApply;
+
+ if (typeof options.autoUpdateInput === 'boolean')
+ this.autoUpdateInput = options.autoUpdateInput;
+
+ if (typeof options.linkedCalendars === 'boolean')
+ this.linkedCalendars = options.linkedCalendars;
+
+ if (typeof options.isInvalidDate === 'function')
+ this.isInvalidDate = options.isInvalidDate;
+
+ if (typeof options.isCustomDate === 'function')
+ this.isCustomDate = options.isCustomDate;
+
+ if (typeof options.alwaysShowCalendars === 'boolean')
+ this.alwaysShowCalendars = options.alwaysShowCalendars;
+
+ // update day names order to firstDay
+ if (this.locale.firstDay != 0) {
+ var iterator = this.locale.firstDay;
+ while (iterator > 0) {
+ this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());
+ iterator--;
+ }
+ }
+
+ var start, end, range;
+
+ //if no start/end dates set, check if an input element contains initial values
+ if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {
+ if ($(this.element).is('input[type=text]')) {
+ var val = $(this.element).val(),
+ split = val.split(this.locale.separator);
+
+ start = end = null;
+
+ if (split.length == 2) {
+ start = moment(split[0], this.locale.format);
+ end = moment(split[1], this.locale.format);
+ } else if (this.singleDatePicker && val !== "") {
+ start = moment(val, this.locale.format);
+ end = moment(val, this.locale.format);
+ }
+ if (start !== null && end !== null) {
+ this.setStartDate(start);
+ this.setEndDate(end);
+ }
+ }
+ }
+
+ if (typeof options.ranges === 'object') {
+ for (range in options.ranges) {
+
+ if (typeof options.ranges[range][0] === 'string')
+ start = moment(options.ranges[range][0], this.locale.format);
+ else
+ start = moment(options.ranges[range][0]);
+
+ if (typeof options.ranges[range][1] === 'string')
+ end = moment(options.ranges[range][1], this.locale.format);
+ else
+ end = moment(options.ranges[range][1]);
+
+ // If the start or end date exceed those allowed by the minDate or dateLimit
+ // options, shorten the range to the allowable period.
+ if (this.minDate && start.isBefore(this.minDate))
+ start = this.minDate.clone();
+
+ var maxDate = this.maxDate;
+ if (this.dateLimit && maxDate && start.clone().add(this.dateLimit).isAfter(maxDate))
+ maxDate = start.clone().add(this.dateLimit);
+ if (maxDate && end.isAfter(maxDate))
+ end = maxDate.clone();
+
+ // If the end of the range is before the minimum or the start of the range is
+ // after the maximum, don't display this range option at all.
+ if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day'))
+ || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day')))
+ continue;
+
+ //Support unicode chars in the range names.
+ var elem = document.createElement('textarea');
+ elem.innerHTML = range;
+ var rangeHtml = elem.value;
+
+ this.ranges[rangeHtml] = [start, end];
+ }
+
+ var list = '<ul>';
+ for (range in this.ranges) {
+ list += '<li data-range-key="' + range + '">' + range + '</li>';
+ }
+ if (this.showCustomRangeLabel) {
+ list += '<li data-range-key="' + this.locale.customRangeLabel + '">' + this.locale.customRangeLabel + '</li>';
+ }
+ list += '</ul>';
+ this.container.find('.ranges').prepend(list);
+ }
+
+ if (typeof cb === 'function') {
+ this.callback = cb;
+ }
+
+ if (!this.timePicker) {
+ this.startDate = this.startDate.startOf('day');
+ this.endDate = this.endDate.endOf('day');
+ this.container.find('.calendar-time').hide();
+ }
+
+ //can't be used together for now
+ if (this.timePicker && this.autoApply)
+ this.autoApply = false;
+
+ if (this.autoApply && typeof options.ranges !== 'object') {
+ this.container.find('.ranges').hide();
+ } else if (this.autoApply) {
+ this.container.find('.applyBtn, .cancelBtn').addClass('hide');
+ }
+
+ if (this.singleDatePicker) {
+ this.container.addClass('single');
+ this.container.find('.calendar.left').addClass('single');
+ this.container.find('.calendar.left').show();
+ this.container.find('.calendar.right').hide();
+ this.container.find('.daterangepicker_input input, .daterangepicker_input > i').hide();
+ if (this.timePicker) {
+ this.container.find('.ranges ul').hide();
+ } else {
+ this.container.find('.ranges').hide();
+ }
+ }
+
+ if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) {
+ this.container.addClass('show-calendar');
+ }
+
+ this.container.addClass('opens' + this.opens);
+
+ //swap the position of the predefined ranges if opens right
+ if (typeof options.ranges !== 'undefined' && this.opens == 'right') {
+ this.container.find('.ranges').prependTo( this.container.find('.calendar.left').parent() );
+ }
+
+ //apply CSS classes and labels to buttons
+ this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses);
+ if (this.applyClass.length)
+ this.container.find('.applyBtn').addClass(this.applyClass);
+ if (this.cancelClass.length)
+ this.container.find('.cancelBtn').addClass(this.cancelClass);
+ this.container.find('.applyBtn').html(this.locale.applyLabel);
+ this.container.find('.cancelBtn').html(this.locale.cancelLabel);
+
+ //
+ // event listeners
+ //
+
+ this.container.find('.calendar')
+ .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))
+ .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))
+ .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this))
+ .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))
+ .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this))
+ .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this))
+ .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this))
+ .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this))
+ .on('click.daterangepicker', '.daterangepicker_input input', $.proxy(this.showCalendars, this))
+ .on('focus.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsFocused, this))
+ .on('blur.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsBlurred, this))
+ .on('change.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsChanged, this))
+ .on('keydown.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsKeydown, this));
+
+ this.container.find('.ranges')
+ .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))
+ .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))
+ .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))
+ .on('mouseenter.daterangepicker', 'li', $.proxy(this.hoverRange, this))
+ .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));
+
+ if (this.element.is('input') || this.element.is('button')) {
+ this.element.on({
+ 'click.daterangepicker': $.proxy(this.show, this),
+ 'focus.daterangepicker': $.proxy(this.show, this),
+ 'keyup.daterangepicker': $.proxy(this.elementChanged, this),
+ 'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility
+ });
+ } else {
+ this.element.on('click.daterangepicker', $.proxy(this.toggle, this));
+ this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this));
+ }
+
+ //
+ // if attached to a text input, set the initial value
+ //
+
+ if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {
+ this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
+ this.element.trigger('change');
+ } else if (this.element.is('input') && this.autoUpdateInput) {
+ this.element.val(this.startDate.format(this.locale.format));
+ this.element.trigger('change');
+ }
+
+ };
+
+ DateRangePicker.prototype = {
+
+ constructor: DateRangePicker,
+
+ setStartDate: function(startDate) {
+ if (typeof startDate === 'string')
+ this.startDate = moment(startDate, this.locale.format);
+
+ if (typeof startDate === 'object')
+ this.startDate = moment(startDate);
+
+ if (!this.timePicker)
+ this.startDate = this.startDate.startOf('day');
+
+ if (this.timePicker && this.timePickerIncrement)
+ this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
+
+ if (this.minDate && this.startDate.isBefore(this.minDate)) {
+ this.startDate = this.minDate.clone();
+ if (this.timePicker && this.timePickerIncrement)
+ this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
+ }
+
+ if (this.maxDate && this.startDate.isAfter(this.maxDate)) {
+ this.startDate = this.maxDate.clone();
+ if (this.timePicker && this.timePickerIncrement)
+ this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
+ }
+
+ if (!this.isShowing)
+ this.updateElement();
+
+ this.updateMonthsInView();
+ },
+
+ setEndDate: function(endDate) {
+ if (typeof endDate === 'string')
+ this.endDate = moment(endDate, this.locale.format);
+
+ if (typeof endDate === 'object')
+ this.endDate = moment(endDate);
+
+ if (!this.timePicker)
+ this.endDate = this.endDate.add(1,'d').startOf('day').subtract(1,'second');
+
+ if (this.timePicker && this.timePickerIncrement)
+ this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
+
+ if (this.endDate.isBefore(this.startDate))
+ this.endDate = this.startDate.clone();
+
+ if (this.maxDate && this.endDate.isAfter(this.maxDate))
+ this.endDate = this.maxDate.clone();
+
+ if (this.dateLimit && this.startDate.clone().add(this.dateLimit).isBefore(this.endDate))
+ this.endDate = this.startDate.clone().add(this.dateLimit);
+
+ this.previousRightTime = this.endDate.clone();
+
+ if (!this.isShowing)
+ this.updateElement();
+
+ this.updateMonthsInView();
+ },
+
+ isInvalidDate: function() {
+ return false;
+ },
+
+ isCustomDate: function() {
+ return false;
+ },
+
+ updateView: function() {
+ if (this.timePicker) {
+ this.renderTimePicker('left');
+ this.renderTimePicker('right');
+ if (!this.endDate) {
+ this.container.find('.right .calendar-time select').attr('disabled', 'disabled').addClass('disabled');
+ } else {
+ this.container.find('.right .calendar-time select').removeAttr('disabled').removeClass('disabled');
+ }
+ }
+ if (this.endDate) {
+ this.container.find('input[name="daterangepicker_end"]').removeClass('active');
+ this.container.find('input[name="daterangepicker_start"]').addClass('active');
+ } else {
+ this.container.find('input[name="daterangepicker_end"]').addClass('active');
+ this.container.find('input[name="daterangepicker_start"]').removeClass('active');
+ }
+ this.updateMonthsInView();
+ this.updateCalendars();
+ this.updateFormInputs();
+ },
+
+ updateMonthsInView: function() {
+ if (this.endDate) {
+
+ //if both dates are visible already, do nothing
+ if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month &&
+ (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
+ &&
+ (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
+ ) {
+ return;
+ }
+
+ this.leftCalendar.month = this.startDate.clone().date(2);
+ if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) {
+ this.rightCalendar.month = this.endDate.clone().date(2);
+ } else {
+ this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
+ }
+
+ } else {
+ if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) {
+ this.leftCalendar.month = this.startDate.clone().date(2);
+ this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
+ }
+ }
+ if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) {
+ this.rightCalendar.month = this.maxDate.clone().date(2);
+ this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');
+ }
+ },
+
+ updateCalendars: function() {
+
+ if (this.timePicker) {
+ var hour, minute, second;
+ if (this.endDate) {
+ hour = parseInt(this.container.find('.left .hourselect').val(), 10);
+ minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
+ second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
+ if (!this.timePicker24Hour) {
+ var ampm = this.container.find('.left .ampmselect').val();
+ if (ampm === 'PM' && hour < 12)
+ hour += 12;
+ if (ampm === 'AM' && hour === 12)
+ hour = 0;
+ }
+ } else {
+ hour = parseInt(this.container.find('.right .hourselect').val(), 10);
+ minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
+ second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
+ if (!this.timePicker24Hour) {
+ var ampm = this.container.find('.right .ampmselect').val();
+ if (ampm === 'PM' && hour < 12)
+ hour += 12;
+ if (ampm === 'AM' && hour === 12)
+ hour = 0;
+ }
+ }
+ this.leftCalendar.month.hour(hour).minute(minute).second(second);
+ this.rightCalendar.month.hour(hour).minute(minute).second(second);
+ }
+
+ this.renderCalendar('left');
+ this.renderCalendar('right');
+
+ //highlight any predefined range matching the current start and end dates
+ this.container.find('.ranges li').removeClass('active');
+ if (this.endDate == null) return;
+
+ this.calculateChosenLabel();
+ },
+
+ renderCalendar: function(side) {
+
+ //
+ // Build the matrix of dates that will populate the calendar
+ //
+
+ var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar;
+ var month = calendar.month.month();
+ var year = calendar.month.year();
+ var hour = calendar.month.hour();
+ var minute = calendar.month.minute();
+ var second = calendar.month.second();
+ var daysInMonth = moment([year, month]).daysInMonth();
+ var firstDay = moment([year, month, 1]);
+ var lastDay = moment([year, month, daysInMonth]);
+ var lastMonth = moment(firstDay).subtract(1, 'month').month();
+ var lastYear = moment(firstDay).subtract(1, 'month').year();
+ var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();
+ var dayOfWeek = firstDay.day();
+
+ //initialize a 6 rows x 7 columns array for the calendar
+ var calendar = [];
+ calendar.firstDay = firstDay;
+ calendar.lastDay = lastDay;
+
+ for (var i = 0; i < 6; i++) {
+ calendar[i] = [];
+ }
+
+ //populate the calendar with date objects
+ var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;
+ if (startDay > daysInLastMonth)
+ startDay -= 7;
+
+ if (dayOfWeek == this.locale.firstDay)
+ startDay = daysInLastMonth - 6;
+
+ var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]);
+
+ var col, row;
+ for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) {
+ if (i > 0 && col % 7 === 0) {
+ col = 0;
+ row++;
+ }
+ calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second);
+ curDate.hour(12);
+
+ if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') {
+ calendar[row][col] = this.minDate.clone();
+ }
+
+ if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') {
+ calendar[row][col] = this.maxDate.clone();
+ }
+
+ }
+
+ //make the calendar object available to hoverDate/clickDate
+ if (side == 'left') {
+ this.leftCalendar.calendar = calendar;
+ } else {
+ this.rightCalendar.calendar = calendar;
+ }
+
+ //
+ // Display the calendar
+ //
+
+ var minDate = side == 'left' ? this.minDate : this.startDate;
+ var maxDate = this.maxDate;
+ var selected = side == 'left' ? this.startDate : this.endDate;
+ var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'};
+
+ var html = '<table class="table-condensed">';
+ html += '<thead>';
+ html += '<tr>';
+
+ // add empty cell for week number
+ if (this.showWeekNumbers || this.showISOWeekNumbers)
+ html += '<th></th>';
+
+ if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) {
+ html += '<th class="prev available"><i class="fa fa-' + arrow.left + ' glyphicon glyphicon-' + arrow.left + '"></i></th>';
+ } else {
+ html += '<th></th>';
+ }
+
+ var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY");
+
+ if (this.showDropdowns) {
+ var currentMonth = calendar[1][1].month();
+ var currentYear = calendar[1][1].year();
+ var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);
+ var minYear = (minDate && minDate.year()) || (currentYear - 50);
+ var inMinYear = currentYear == minYear;
+ var inMaxYear = currentYear == maxYear;
+
+ var monthHtml = '<select class="monthselect">';
+ for (var m = 0; m < 12; m++) {
+ if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) {
+ monthHtml += "<option value='" + m + "'" +
+ (m === currentMonth ? " selected='selected'" : "") +
+ ">" + this.locale.monthNames[m] + "</option>";
+ } else {
+ monthHtml += "<option value='" + m + "'" +
+ (m === currentMonth ? " selected='selected'" : "") +
+ " disabled='disabled'>" + this.locale.monthNames[m] + "</option>";
+ }
+ }
+ monthHtml += "</select>";
+
+ var yearHtml = '<select class="yearselect">';
+ for (var y = minYear; y <= maxYear; y++) {
+ yearHtml += '<option value="' + y + '"' +
+ (y === currentYear ? ' selected="selected"' : '') +
+ '>' + y + '</option>';
+ }
+ yearHtml += '</select>';
+
+ dateHtml = monthHtml + yearHtml;
+ }
+
+ html += '<th colspan="5" class="month">' + dateHtml + '</th>';
+ if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) {
+ html += '<th class="next available"><i class="fa fa-' + arrow.right + ' glyphicon glyphicon-' + arrow.right + '"></i></th>';
+ } else {
+ html += '<th></th>';
+ }
+
+ html += '</tr>';
+ html += '<tr>';
+
+ // add week number label
+ if (this.showWeekNumbers || this.showISOWeekNumbers)
+ html += '<th class="week">' + this.locale.weekLabel + '</th>';
+
+ $.each(this.locale.daysOfWeek, function(index, dayOfWeek) {
+ html += '<th>' + dayOfWeek + '</th>';
+ });
+
+ html += '</tr>';
+ html += '</thead>';
+ html += '<tbody>';
+
+ //adjust maxDate to reflect the dateLimit setting in order to
+ //grey out end dates beyond the dateLimit
+ if (this.endDate == null && this.dateLimit) {
+ var maxLimit = this.startDate.clone().add(this.dateLimit).endOf('day');
+ if (!maxDate || maxLimit.isBefore(maxDate)) {
+ maxDate = maxLimit;
+ }
+ }
+
+ for (var row = 0; row < 6; row++) {
+ html += '<tr>';
+
+ // add week number
+ if (this.showWeekNumbers)
+ html += '<td class="week">' + calendar[row][0].week() + '</td>';
+ else if (this.showISOWeekNumbers)
+ html += '<td class="week">' + calendar[row][0].isoWeek() + '</td>';
+
+ for (var col = 0; col < 7; col++) {
+
+ var classes = [];
+
+ //highlight today's date
+ if (calendar[row][col].isSame(new Date(), "day"))
+ classes.push('today');
+
+ //highlight weekends
+ if (calendar[row][col].isoWeekday() > 5)
+ classes.push('weekend');
+
+ //grey out the dates in other months displayed at beginning and end of this calendar
+ if (calendar[row][col].month() != calendar[1][1].month())
+ classes.push('off');
+
+ //don't allow selection of dates before the minimum date
+ if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day'))
+ classes.push('off', 'disabled');
+
+ //don't allow selection of dates after the maximum date
+ if (maxDate && calendar[row][col].isAfter(maxDate, 'day'))
+ classes.push('off', 'disabled');
+
+ //don't allow selection of date if a custom function decides it's invalid
+ if (this.isInvalidDate(calendar[row][col]))
+ classes.push('off', 'disabled');
+
+ //highlight the currently selected start date
+ if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD'))
+ classes.push('active', 'start-date');
+
+ //highlight the currently selected end date
+ if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD'))
+ classes.push('active', 'end-date');
+
+ //highlight dates in-between the selected dates
+ if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate)
+ classes.push('in-range');
+
+ //apply custom classes for this date
+ var isCustom = this.isCustomDate(calendar[row][col]);
+ if (isCustom !== false) {
+ if (typeof isCustom === 'string')
+ classes.push(isCustom);
+ else
+ Array.prototype.push.apply(classes, isCustom);
+ }
+
+ var cname = '', disabled = false;
+ for (var i = 0; i < classes.length; i++) {
+ cname += classes[i] + ' ';
+ if (classes[i] == 'disabled')
+ disabled = true;
+ }
+ if (!disabled)
+ cname += 'available';
+
+ html += '<td class="' + cname.replace(/^\s+|\s+$/g, '') + '" data-title="' + 'r' + row + 'c' + col + '">' + calendar[row][col].date() + '</td>';
+
+ }
+ html += '</tr>';
+ }
+
+ html += '</tbody>';
+ html += '</table>';
+
+ this.container.find('.calendar.' + side + ' .calendar-table').html(html);
+
+ },
+
+ renderTimePicker: function(side) {
+
+ // Don't bother updating the time picker if it's currently disabled
+ // because an end date hasn't been clicked yet
+ if (side == 'right' && !this.endDate) return;
+
+ var html, selected, minDate, maxDate = this.maxDate;
+
+ if (this.dateLimit && (!this.maxDate || this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)))
+ maxDate = this.startDate.clone().add(this.dateLimit);
+
+ if (side == 'left') {
+ selected = this.startDate.clone();
+ minDate = this.minDate;
+ } else if (side == 'right') {
+ selected = this.endDate.clone();
+ minDate = this.startDate;
+
+ //Preserve the time already selected
+ var timeSelector = this.container.find('.calendar.right .calendar-time div');
+ if (timeSelector.html() != '') {
+
+ selected.hour(timeSelector.find('.hourselect option:selected').val() || selected.hour());
+ selected.minute(timeSelector.find('.minuteselect option:selected').val() || selected.minute());
+ selected.second(timeSelector.find('.secondselect option:selected').val() || selected.second());
+
+ if (!this.timePicker24Hour) {
+ var ampm = timeSelector.find('.ampmselect option:selected').val();
+ if (ampm === 'PM' && selected.hour() < 12)
+ selected.hour(selected.hour() + 12);
+ if (ampm === 'AM' && selected.hour() === 12)
+ selected.hour(0);
+ }
+
+ }
+
+ if (selected.isBefore(this.startDate))
+ selected = this.startDate.clone();
+
+ if (maxDate && selected.isAfter(maxDate))
+ selected = maxDate.clone();
+
+ }
+
+ //
+ // hours
+ //
+
+ html = '<select class="hourselect">';
+
+ var start = this.timePicker24Hour ? 0 : 1;
+ var end = this.timePicker24Hour ? 23 : 12;
+
+ for (var i = start; i <= end; i++) {
+ var i_in_24 = i;
+ if (!this.timePicker24Hour)
+ i_in_24 = selected.hour() >= 12 ? (i == 12 ? 12 : i + 12) : (i == 12 ? 0 : i);
+
+ var time = selected.clone().hour(i_in_24);
+ var disabled = false;
+ if (minDate && time.minute(59).isBefore(minDate))
+ disabled = true;
+ if (maxDate && time.minute(0).isAfter(maxDate))
+ disabled = true;
+
+ if (i_in_24 == selected.hour() && !disabled) {
+ html += '<option value="' + i + '" selected="selected">' + i + '</option>';
+ } else if (disabled) {
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + i + '</option>';
+ } else {
+ html += '<option value="' + i + '">' + i + '</option>';
+ }
+ }
+
+ html += '</select> ';
+
+ //
+ // minutes
+ //
+
+ html += ': <select class="minuteselect">';
+
+ for (var i = 0; i < 60; i += this.timePickerIncrement) {
+ var padded = i < 10 ? '0' + i : i;
+ var time = selected.clone().minute(i);
+
+ var disabled = false;
+ if (minDate && time.second(59).isBefore(minDate))
+ disabled = true;
+ if (maxDate && time.second(0).isAfter(maxDate))
+ disabled = true;
+
+ if (selected.minute() == i && !disabled) {
+ html += '<option value="' + i + '" selected="selected">' + padded + '</option>';
+ } else if (disabled) {
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>';
+ } else {
+ html += '<option value="' + i + '">' + padded + '</option>';
+ }
+ }
+
+ html += '</select> ';
+
+ //
+ // seconds
+ //
+
+ if (this.timePickerSeconds) {
+ html += ': <select class="secondselect">';
+
+ for (var i = 0; i < 60; i++) {
+ var padded = i < 10 ? '0' + i : i;
+ var time = selected.clone().second(i);
+
+ var disabled = false;
+ if (minDate && time.isBefore(minDate))
+ disabled = true;
+ if (maxDate && time.isAfter(maxDate))
+ disabled = true;
+
+ if (selected.second() == i && !disabled) {
+ html += '<option value="' + i + '" selected="selected">' + padded + '</option>';
+ } else if (disabled) {
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>';
+ } else {
+ html += '<option value="' + i + '">' + padded + '</option>';
+ }
+ }
+
+ html += '</select> ';
+ }
+
+ //
+ // AM/PM
+ //
+
+ if (!this.timePicker24Hour) {
+ html += '<select class="ampmselect">';
+
+ var am_html = '';
+ var pm_html = '';
+
+ if (minDate && selected.clone().hour(12).minute(0).second(0).isBefore(minDate))
+ am_html = ' disabled="disabled" class="disabled"';
+
+ if (maxDate && selected.clone().hour(0).minute(0).second(0).isAfter(maxDate))
+ pm_html = ' disabled="disabled" class="disabled"';
+
+ if (selected.hour() >= 12) {
+ html += '<option value="AM"' + am_html + '>AM</option><option value="PM" selected="selected"' + pm_html + '>PM</option>';
+ } else {
+ html += '<option value="AM" selected="selected"' + am_html + '>AM</option><option value="PM"' + pm_html + '>PM</option>';
+ }
+
+ html += '</select>';
+ }
+
+ this.container.find('.calendar.' + side + ' .calendar-time div').html(html);
+
+ },
+
+ updateFormInputs: function() {
+
+ //ignore mouse movements while an above-calendar text input has focus
+ if (this.container.find('input[name=daterangepicker_start]').is(":focus") || this.container.find('input[name=daterangepicker_end]').is(":focus"))
+ return;
+
+ this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.locale.format));
+ if (this.endDate)
+ this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.locale.format));
+
+ if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) {
+ this.container.find('button.applyBtn').removeAttr('disabled');
+ } else {
+ this.container.find('button.applyBtn').attr('disabled', 'disabled');
+ }
+
+ },
+
+ move: function() {
+ var parentOffset = { top: 0, left: 0 },
+ containerTop;
+ var parentRightEdge = $(window).width();
+ if (!this.parentEl.is('body')) {
+ parentOffset = {
+ top: this.parentEl.offset().top - this.parentEl.scrollTop(),
+ left: this.parentEl.offset().left - this.parentEl.scrollLeft()
+ };
+ parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left;
+ }
+
+ if (this.drops == 'up')
+ containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;
+ else
+ containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;
+ this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('dropup');
+
+ if (this.opens == 'left') {
+ this.container.css({
+ top: containerTop,
+ right: parentRightEdge - this.element.offset().left - this.element.outerWidth(),
+ left: 'auto'
+ });
+ if (this.container.offset().left < 0) {
+ this.container.css({
+ right: 'auto',
+ left: 9
+ });
+ }
+ } else if (this.opens == 'center') {
+ this.container.css({
+ top: containerTop,
+ left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2
+ - this.container.outerWidth() / 2,
+ right: 'auto'
+ });
+ if (this.container.offset().left < 0) {
+ this.container.css({
+ right: 'auto',
+ left: 9
+ });
+ }
+ } else {
+ this.container.css({
+ top: containerTop,
+ left: this.element.offset().left - parentOffset.left,
+ right: 'auto'
+ });
+ if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {
+ this.container.css({
+ left: 'auto',
+ right: 0
+ });
+ }
+ }
+ },
+
+ show: function(e) {
+ if (this.isShowing) return;
+
+ // Create a click proxy that is private to this instance of datepicker, for unbinding
+ this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this);
+
+ // Bind global datepicker mousedown for hiding and
+ $(document)
+ .on('mousedown.daterangepicker', this._outsideClickProxy)
+ // also support mobile devices
+ .on('touchend.daterangepicker', this._outsideClickProxy)
+ // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them
+ .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)
+ // and also close when focus changes to outside the picker (eg. tabbing between controls)
+ .on('focusin.daterangepicker', this._outsideClickProxy);
+
+ // Reposition the picker if the window is resized while it's open
+ $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this));
+
+ this.oldStartDate = this.startDate.clone();
+ this.oldEndDate = this.endDate.clone();
+ this.previousRightTime = this.endDate.clone();
+
+ this.updateView();
+ this.container.show();
+ this.move();
+ this.element.trigger('show.daterangepicker', this);
+ this.isShowing = true;
+ },
+
+ hide: function(e) {
+ if (!this.isShowing) return;
+
+ //incomplete date selection, revert to last values
+ if (!this.endDate) {
+ this.startDate = this.oldStartDate.clone();
+ this.endDate = this.oldEndDate.clone();
+ }
+
+ //if a new date range was selected, invoke the user callback function
+ if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
+ this.callback(this.startDate, this.endDate, this.chosenLabel);
+
+ //if picker is attached to a text input, update it
+ this.updateElement();
+
+ $(document).off('.daterangepicker');
+ $(window).off('.daterangepicker');
+ this.container.hide();
+ this.element.trigger('hide.daterangepicker', this);
+ this.isShowing = false;
+ },
+
+ toggle: function(e) {
+ if (this.isShowing) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ },
+
+ outsideClick: function(e) {
+ var target = $(e.target);
+ // if the page is clicked anywhere except within the daterangerpicker/button
+ // itself then call this.hide()
+ if (
+ // ie modal dialog fix
+ e.type == "focusin" ||
+ target.closest(this.element).length ||
+ target.closest(this.container).length ||
+ target.closest('.calendar-table').length
+ ) return;
+ this.hide();
+ this.element.trigger('outsideClick.daterangepicker', this);
+ },
+
+ showCalendars: function() {
+ this.container.addClass('show-calendar');
+ this.move();
+ this.element.trigger('showCalendar.daterangepicker', this);
+ },
+
+ hideCalendars: function() {
+ this.container.removeClass('show-calendar');
+ this.element.trigger('hideCalendar.daterangepicker', this);
+ },
+
+ hoverRange: function(e) {
+
+ //ignore mouse movements while an above-calendar text input has focus
+ if (this.container.find('input[name=daterangepicker_start]').is(":focus") || this.container.find('input[name=daterangepicker_end]').is(":focus"))
+ return;
+
+ var label = e.target.getAttribute('data-range-key');
+
+ if (label == this.locale.customRangeLabel) {
+ this.updateView();
+ } else {
+ var dates = this.ranges[label];
+ this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.locale.format));
+ this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.locale.format));
+ }
+
+ },
+
+ clickRange: function(e) {
+ var label = e.target.getAttribute('data-range-key');
+ this.chosenLabel = label;
+ if (label == this.locale.customRangeLabel) {
+ this.showCalendars();
+ } else {
+ var dates = this.ranges[label];
+ this.startDate = dates[0];
+ this.endDate = dates[1];
+
+ if (!this.timePicker) {
+ this.startDate.startOf('day');
+ this.endDate.endOf('day');
+ }
+
+ if (!this.alwaysShowCalendars)
+ this.hideCalendars();
+ this.clickApply();
+ }
+ },
+
+ clickPrev: function(e) {
+ var cal = $(e.target).parents('.calendar');
+ if (cal.hasClass('left')) {
+ this.leftCalendar.month.subtract(1, 'month');
+ if (this.linkedCalendars)
+ this.rightCalendar.month.subtract(1, 'month');
+ } else {
+ this.rightCalendar.month.subtract(1, 'month');
+ }
+ this.updateCalendars();
+ },
+
+ clickNext: function(e) {
+ var cal = $(e.target).parents('.calendar');
+ if (cal.hasClass('left')) {
+ this.leftCalendar.month.add(1, 'month');
+ } else {
+ this.rightCalendar.month.add(1, 'month');
+ if (this.linkedCalendars)
+ this.leftCalendar.month.add(1, 'month');
+ }
+ this.updateCalendars();
+ },
+
+ hoverDate: function(e) {
+
+ //ignore mouse movements while an above-calendar text input has focus
+ //if (this.container.find('input[name=daterangepicker_start]').is(":focus") || this.container.find('input[name=daterangepicker_end]').is(":focus"))
+ // return;
+
+ //ignore dates that can't be selected
+ if (!$(e.target).hasClass('available')) return;
+
+ //have the text inputs above calendars reflect the date being hovered over
+ var title = $(e.target).attr('data-title');
+ var row = title.substr(1, 1);
+ var col = title.substr(3, 1);
+ var cal = $(e.target).parents('.calendar');
+ var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];
+
+ if (this.endDate && !this.container.find('input[name=daterangepicker_start]').is(":focus")) {
+ this.container.find('input[name=daterangepicker_start]').val(date.format(this.locale.format));
+ } else if (!this.endDate && !this.container.find('input[name=daterangepicker_end]').is(":focus")) {
+ this.container.find('input[name=daterangepicker_end]').val(date.format(this.locale.format));
+ }
+
+ //highlight the dates between the start date and the date being hovered as a potential end date
+ var leftCalendar = this.leftCalendar;
+ var rightCalendar = this.rightCalendar;
+ var startDate = this.startDate;
+ if (!this.endDate) {
+ this.container.find('.calendar tbody td').each(function(index, el) {
+
+ //skip week numbers, only look at dates
+ if ($(el).hasClass('week')) return;
+
+ var title = $(el).attr('data-title');
+ var row = title.substr(1, 1);
+ var col = title.substr(3, 1);
+ var cal = $(el).parents('.calendar');
+ var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col];
+
+ if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) {
+ $(el).addClass('in-range');
+ } else {
+ $(el).removeClass('in-range');
+ }
+
+ });
+ }
+
+ },
+
+ clickDate: function(e) {
+
+ if (!$(e.target).hasClass('available')) return;
+
+ var title = $(e.target).attr('data-title');
+ var row = title.substr(1, 1);
+ var col = title.substr(3, 1);
+ var cal = $(e.target).parents('.calendar');
+ var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];
+
+ //
+ // this function needs to do a few things:
+ // * alternate between selecting a start and end date for the range,
+ // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date
+ // * if autoapply is enabled, and an end date was chosen, apply the selection
+ // * if single date picker mode, and time picker isn't enabled, apply the selection immediately
+ // * if one of the inputs above the calendars was focused, cancel that manual input
+ //
+
+ if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start
+ if (this.timePicker) {
+ var hour = parseInt(this.container.find('.left .hourselect').val(), 10);
+ if (!this.timePicker24Hour) {
+ var ampm = this.container.find('.left .ampmselect').val();
+ if (ampm === 'PM' && hour < 12)
+ hour += 12;
+ if (ampm === 'AM' && hour === 12)
+ hour = 0;
+ }
+ var minute = parseInt(this.container.find('.left .minuteselect').val(), 10);
+ var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;
+ date = date.clone().hour(hour).minute(minute).second(second);
+ }
+ this.endDate = null;
+ this.setStartDate(date.clone());
+ } else if (!this.endDate && date.isBefore(this.startDate)) {
+ //special case: clicking the same date for start/end,
+ //but the time of the end date is before the start date
+ this.setEndDate(this.startDate.clone());
+ } else { // picking end
+ if (this.timePicker) {
+ var hour = parseInt(this.container.find('.right .hourselect').val(), 10);
+ if (!this.timePicker24Hour) {
+ var ampm = this.container.find('.right .ampmselect').val();
+ if (ampm === 'PM' && hour < 12)
+ hour += 12;
+ if (ampm === 'AM' && hour === 12)
+ hour = 0;
+ }
+ var minute = parseInt(this.container.find('.right .minuteselect').val(), 10);
+ var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;
+ date = date.clone().hour(hour).minute(minute).second(second);
+ }
+ this.setEndDate(date.clone());
+ if (this.autoApply) {
+ this.calculateChosenLabel();
+ this.clickApply();
+ }
+ }
+
+ if (this.singleDatePicker) {
+ this.setEndDate(this.startDate);
+ if (!this.timePicker)
+ this.clickApply();
+ }
+
+ this.updateView();
+
+ //This is to cancel the blur event handler if the mouse was in one of the inputs
+ e.stopPropagation();
+
+ },
+
+ calculateChosenLabel: function () {
+ var customRange = true;
+ var i = 0;
+ for (var range in this.ranges) {
+ if (this.timePicker) {
+ var format = this.timePickerSeconds ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD hh:mm";
+ //ignore times when comparing dates if time picker seconds is not enabled
+ if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) {
+ customRange = false;
+ this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();
+ break;
+ }
+ } else {
+ //ignore times when comparing dates if time picker is not enabled
+ if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {
+ customRange = false;
+ this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();
+ break;
+ }
+ }
+ i++;
+ }
+ if (customRange) {
+ if (this.showCustomRangeLabel) {
+ this.chosenLabel = this.container.find('.ranges li:last').addClass('active').html();
+ } else {
+ this.chosenLabel = null;
+ }
+ this.showCalendars();
+ }
+ },
+
+ clickApply: function(e) {
+ this.hide();
+ this.element.trigger('apply.daterangepicker', this);
+ },
+
+ clickCancel: function(e) {
+ this.startDate = this.oldStartDate;
+ this.endDate = this.oldEndDate;
+ this.hide();
+ this.element.trigger('cancel.daterangepicker', this);
+ },
+
+ monthOrYearChanged: function(e) {
+ var isLeft = $(e.target).closest('.calendar').hasClass('left'),
+ leftOrRight = isLeft ? 'left' : 'right',
+ cal = this.container.find('.calendar.'+leftOrRight);
+
+ // Month must be Number for new moment versions
+ var month = parseInt(cal.find('.monthselect').val(), 10);
+ var year = cal.find('.yearselect').val();
+
+ if (!isLeft) {
+ if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) {
+ month = this.startDate.month();
+ year = this.startDate.year();
+ }
+ }
+
+ if (this.minDate) {
+ if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) {
+ month = this.minDate.month();
+ year = this.minDate.year();
+ }
+ }
+
+ if (this.maxDate) {
+ if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) {
+ month = this.maxDate.month();
+ year = this.maxDate.year();
+ }
+ }
+
+ if (isLeft) {
+ this.leftCalendar.month.month(month).year(year);
+ if (this.linkedCalendars)
+ this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month');
+ } else {
+ this.rightCalendar.month.month(month).year(year);
+ if (this.linkedCalendars)
+ this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month');
+ }
+ this.updateCalendars();
+ },
+
+ timeChanged: function(e) {
+
+ var cal = $(e.target).closest('.calendar'),
+ isLeft = cal.hasClass('left');
+
+ var hour = parseInt(cal.find('.hourselect').val(), 10);
+ var minute = parseInt(cal.find('.minuteselect').val(), 10);
+ var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0;
+
+ if (!this.timePicker24Hour) {
+ var ampm = cal.find('.ampmselect').val();
+ if (ampm === 'PM' && hour < 12)
+ hour += 12;
+ if (ampm === 'AM' && hour === 12)
+ hour = 0;
+ }
+
+ if (isLeft) {
+ var start = this.startDate.clone();
+ start.hour(hour);
+ start.minute(minute);
+ start.second(second);
+ this.setStartDate(start);
+ if (this.singleDatePicker) {
+ this.endDate = this.startDate.clone();
+ } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) {
+ this.setEndDate(start.clone());
+ }
+ } else if (this.endDate) {
+ var end = this.endDate.clone();
+ end.hour(hour);
+ end.minute(minute);
+ end.second(second);
+ this.setEndDate(end);
+ }
+
+ //update the calendars so all clickable dates reflect the new time component
+ this.updateCalendars();
+
+ //update the form inputs above the calendars with the new time
+ this.updateFormInputs();
+
+ //re-render the time pickers because changing one selection can affect what's enabled in another
+ this.renderTimePicker('left');
+ this.renderTimePicker('right');
+
+ },
+
+ formInputsChanged: function(e) {
+ var isRight = $(e.target).closest('.calendar').hasClass('right');
+ var start = moment(this.container.find('input[name="daterangepicker_start"]').val(), this.locale.format);
+ var end = moment(this.container.find('input[name="daterangepicker_end"]').val(), this.locale.format);
+
+ if (start.isValid() && end.isValid()) {
+
+ if (isRight && end.isBefore(start))
+ start = end.clone();
+
+ this.setStartDate(start);
+ this.setEndDate(end);
+
+ if (isRight) {
+ this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format));
+ } else {
+ this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format));
+ }
+
+ }
+
+ this.updateView();
+ },
+
+ formInputsFocused: function(e) {
+
+ // Highlight the focused input
+ this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass('active');
+ $(e.target).addClass('active');
+
+ // Set the state such that if the user goes back to using a mouse,
+ // the calendars are aware we're selecting the end of the range, not
+ // the start. This allows someone to edit the end of a date range without
+ // re-selecting the beginning, by clicking on the end date input then
+ // using the calendar.
+ var isRight = $(e.target).closest('.calendar').hasClass('right');
+ if (isRight) {
+ this.endDate = null;
+ this.setStartDate(this.startDate.clone());
+ this.updateView();
+ }
+
+ },
+
+ formInputsBlurred: function(e) {
+
+ // this function has one purpose right now: if you tab from the first
+ // text input to the second in the UI, the endDate is nulled so that
+ // you can click another, but if you tab out without clicking anything
+ // or changing the input value, the old endDate should be retained
+
+ if (!this.endDate) {
+ var val = this.container.find('input[name="daterangepicker_end"]').val();
+ var end = moment(val, this.locale.format);
+ if (end.isValid()) {
+ this.setEndDate(end);
+ this.updateView();
+ }
+ }
+
+ },
+
+ formInputsKeydown: function(e) {
+ // This function ensures that if the 'enter' key was pressed in the input, then the calendars
+ // are updated with the startDate and endDate.
+ // This behaviour is automatic in Chrome/Firefox/Edge but not in IE 11 hence why this exists.
+ // Other browsers and versions of IE are untested and the behaviour is unknown.
+ if (e.keyCode === 13) {
+ // Prevent the calendar from being updated twice on Chrome/Firefox/Edge
+ e.preventDefault();
+ this.formInputsChanged(e);
+ }
+ },
+
+
+ elementChanged: function() {
+ if (!this.element.is('input')) return;
+ if (!this.element.val().length) return;
+
+ var dateString = this.element.val().split(this.locale.separator),
+ start = null,
+ end = null;
+
+ if (dateString.length === 2) {
+ start = moment(dateString[0], this.locale.format);
+ end = moment(dateString[1], this.locale.format);
+ }
+
+ if (this.singleDatePicker || start === null || end === null) {
+ start = moment(this.element.val(), this.locale.format);
+ end = start;
+ }
+
+ if (!start.isValid() || !end.isValid()) return;
+
+ this.setStartDate(start);
+ this.setEndDate(end);
+ this.updateView();
+ },
+
+ keydown: function(e) {
+ //hide on tab or enter
+ if ((e.keyCode === 9) || (e.keyCode === 13)) {
+ this.hide();
+ }
+
+ //hide on esc and prevent propagation
+ if (e.keyCode === 27) {
+ e.preventDefault();
+ e.stopPropagation();
+
+ this.hide();
+ }
+ },
+
+ updateElement: function() {
+ if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {
+ this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
+ this.element.trigger('change');
+ } else if (this.element.is('input') && this.autoUpdateInput) {
+ this.element.val(this.startDate.format(this.locale.format));
+ this.element.trigger('change');
+ }
+ },
+
+ remove: function() {
+ this.container.remove();
+ this.element.off('.daterangepicker');
+ this.element.removeData();
+ }
+
+ };
+
+ $.fn.daterangepicker = function(options, callback) {
+ var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options);
+ this.each(function() {
+ var el = $(this);
+ if (el.data('daterangepicker'))
+ el.data('daterangepicker').remove();
+ el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback));
+ });
+ return this;
+ };
+
+ return DateRangePicker;
+
+}));
diff --git a/public/bower_components/bootstrap-daterangepicker/daterangepicker.scss b/public/bower_components/bootstrap-daterangepicker/daterangepicker.scss
new file mode 100644
index 0000000..f61da96
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/daterangepicker.scss
@@ -0,0 +1,611 @@
+//
+// A stylesheet for use with Bootstrap 3.x
+// @author: Dan Grossman http://www.dangrossman.info/
+// @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved.
+// @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
+// @website: https://www.improvely.com/
+//
+
+//
+// VARIABLES
+//
+
+//
+// Settings
+
+// The class name to contain everything within.
+$prefix-class: daterangepicker;
+$arrow-size: 7px !default;
+
+//
+// Colors
+$daterangepicker-color: inherit !default;
+$daterangepicker-bg-color: #fff !default;
+
+$daterangepicker-cell-color: $daterangepicker-color !default;
+$daterangepicker-cell-border-color: transparent !default;
+$daterangepicker-cell-bg-color: $daterangepicker-bg-color !default;
+
+$daterangepicker-cell-hover-color: $daterangepicker-color !default;
+$daterangepicker-cell-hover-border-color: $daterangepicker-cell-border-color !default;
+$daterangepicker-cell-hover-bg-color: #eee !default;
+
+$daterangepicker-in-range-color: #000 !default;
+$daterangepicker-in-range-border-color: transparent !default;
+$daterangepicker-in-range-bg-color: #ebf4f8 !default;
+
+$daterangepicker-active-color: #fff !default;
+$daterangepicker-active-bg-color: #357ebd !default;
+$daterangepicker-active-border-color: transparent !default;
+
+$daterangepicker-unselected-color: #999 !default;
+$daterangepicker-unselected-border-color: transparent !default;
+$daterangepicker-unselected-bg-color: #fff !default;
+
+//
+// daterangepicker
+$daterangepicker-width: 278px !default;
+$daterangepicker-padding: 4px !default;
+$daterangepicker-z-index: 3000 !default;
+
+$daterangepicker-border-size: 1px !default;
+$daterangepicker-border-color: #ccc !default;
+$daterangepicker-border-radius: 4px !default;
+
+
+//
+// Calendar
+$daterangepicker-calendar-margin: $daterangepicker-padding !default;
+$daterangepicker-calendar-bg-color: $daterangepicker-bg-color !default;
+
+$daterangepicker-calendar-border-size: 1px !default;
+$daterangepicker-calendar-border-color: $daterangepicker-bg-color !default;
+$daterangepicker-calendar-border-radius: $daterangepicker-border-radius !default;
+
+//
+// Calendar Cells
+$daterangepicker-cell-size: 20px !default;
+$daterangepicker-cell-width: $daterangepicker-cell-size !default;
+$daterangepicker-cell-height: $daterangepicker-cell-size !default;
+
+$daterangepicker-cell-border-radius: $daterangepicker-calendar-border-radius !default;
+$daterangepicker-cell-border-size: 1px !default;
+
+//
+// Dropdowns
+$daterangepicker-dropdown-z-index: $daterangepicker-z-index + 1 !default;
+
+//
+// Controls
+$daterangepicker-control-height: 30px !default;
+$daterangepicker-control-line-height: $daterangepicker-control-height !default;
+$daterangepicker-control-color: #555 !default;
+
+$daterangepicker-control-border-size: 1px !default;
+$daterangepicker-control-border-color: #ccc !default;
+$daterangepicker-control-border-radius: 4px !default;
+
+$daterangepicker-control-active-border-size: 1px !default;
+$daterangepicker-control-active-border-color: #08c !default;
+$daterangepicker-control-active-border-radius: $daterangepicker-control-border-radius !default;
+
+$daterangepicker-control-disabled-color: #ccc !default;
+
+//
+// Ranges
+$daterangepicker-ranges-color: #08c !default;
+$daterangepicker-ranges-bg-color: #f5f5f5 !default;
+
+$daterangepicker-ranges-border-size: 1px !default;
+$daterangepicker-ranges-border-color: $daterangepicker-ranges-bg-color !default;
+$daterangepicker-ranges-border-radius: $daterangepicker-border-radius !default;
+
+$daterangepicker-ranges-hover-color: #fff !default;
+$daterangepicker-ranges-hover-bg-color: $daterangepicker-ranges-color !default;
+$daterangepicker-ranges-hover-border-size: $daterangepicker-ranges-border-size !default;
+$daterangepicker-ranges-hover-border-color: $daterangepicker-ranges-hover-bg-color !default;
+$daterangepicker-ranges-hover-border-radius: $daterangepicker-border-radius !default;
+
+$daterangepicker-ranges-active-border-size: $daterangepicker-ranges-border-size !default;
+$daterangepicker-ranges-active-border-color: $daterangepicker-ranges-bg-color !default;
+$daterangepicker-ranges-active-border-radius: $daterangepicker-border-radius !default;
+
+//
+// STYLESHEETS
+//
+.#{$prefix-class} {
+ position: absolute;
+ color: $daterangepicker-color;
+ background-color: $daterangepicker-bg-color;
+ border-radius: $daterangepicker-border-radius;
+ width: $daterangepicker-width;
+ padding: $daterangepicker-padding;
+ margin-top: $daterangepicker-border-size;
+
+ // TODO: Should these be parameterized??
+ top: 100px;
+ left: 20px;
+
+ $arrow-prefix-size: $arrow-size;
+ $arrow-suffix-size: ($arrow-size - $daterangepicker-border-size);
+
+ &:before, &:after {
+ position: absolute;
+ display: inline-block;
+
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+ }
+
+ &:before {
+ top: -$arrow-prefix-size;
+
+ border-right: $arrow-prefix-size solid transparent;
+ border-left: $arrow-prefix-size solid transparent;
+ border-bottom: $arrow-prefix-size solid $daterangepicker-border-color;
+ }
+
+ &:after {
+ top: -$arrow-suffix-size;
+
+ border-right: $arrow-suffix-size solid transparent;
+ border-bottom: $arrow-suffix-size solid $daterangepicker-bg-color;
+ border-left: $arrow-suffix-size solid transparent;
+ }
+
+ &.opensleft {
+ &:before {
+ // TODO: Make this relative to prefix size.
+ right: $arrow-prefix-size + 2px;
+ }
+
+ &:after {
+ // TODO: Make this relative to suffix size.
+ right: $arrow-suffix-size + 4px;
+ }
+ }
+
+ &.openscenter {
+ &:before {
+ left: 0;
+ right: 0;
+ width: 0;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ &:after {
+ left: 0;
+ right: 0;
+ width: 0;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ }
+
+ &.opensright {
+ &:before {
+ // TODO: Make this relative to prefix size.
+ left: $arrow-prefix-size + 2px;
+ }
+
+ &:after {
+ // TODO: Make this relative to suffix size.
+ left: $arrow-suffix-size + 4px;
+ }
+ }
+
+ &.dropup {
+ margin-top: -5px;
+
+ // NOTE: Note sure why these are special-cased.
+ &:before {
+ top: initial;
+ bottom: -$arrow-prefix-size;
+ border-bottom: initial;
+ border-top: $arrow-prefix-size solid $daterangepicker-border-color;
+ }
+
+ &:after {
+ top: initial;
+ bottom:-$arrow-suffix-size;
+ border-bottom: initial;
+ border-top: $arrow-suffix-size solid $daterangepicker-bg-color;
+ }
+ }
+
+ &.dropdown-menu {
+ max-width: none;
+ z-index: $daterangepicker-dropdown-z-index;
+ }
+
+ &.single {
+ .ranges, .calendar {
+ float: none;
+ }
+ }
+
+ /* Calendars */
+ &.show-calendar {
+ .calendar {
+ display: block;
+ }
+ }
+
+ .calendar {
+ display: none;
+ max-width: $daterangepicker-width - ($daterangepicker-calendar-margin * 2);
+ margin: $daterangepicker-calendar-margin;
+
+ &.single {
+ .calendar-table {
+ border: none;
+ }
+ }
+
+ th, td {
+ white-space: nowrap;
+ text-align: center;
+
+ // TODO: Should this actually be hard-coded?
+ min-width: 32px;
+ }
+ }
+
+ .calendar-table {
+ border: $daterangepicker-calendar-border-size solid $daterangepicker-calendar-border-color;
+ padding: $daterangepicker-calendar-margin;
+ border-radius: $daterangepicker-calendar-border-radius;
+ background-color: $daterangepicker-calendar-bg-color;
+ }
+
+ table {
+ width: 100%;
+ margin: 0;
+ }
+
+ td, th {
+ text-align: center;
+ width: $daterangepicker-cell-width;
+ height: $daterangepicker-cell-height;
+ border-radius: $daterangepicker-cell-border-radius;
+ border: $daterangepicker-cell-border-size solid $daterangepicker-cell-border-color;
+ white-space: nowrap;
+ cursor: pointer;
+
+ &.available {
+ &:hover {
+ background-color: $daterangepicker-cell-hover-bg-color;
+ border-color: $daterangepicker-cell-hover-border-color;
+ color: $daterangepicker-cell-hover-color;
+ }
+ }
+
+ &.week {
+ font-size: 80%;
+ color: #ccc;
+ }
+ }
+
+ td {
+ &.off {
+ &, &.in-range, &.start-date, &.end-date {
+ background-color: $daterangepicker-unselected-bg-color;
+ border-color: $daterangepicker-unselected-border-color;
+ color: $daterangepicker-unselected-color;
+ }
+ }
+
+ //
+ // Date Range
+ &.in-range {
+ background-color: $daterangepicker-in-range-bg-color;
+ border-color: $daterangepicker-in-range-border-color;
+ color: $daterangepicker-in-range-color;
+
+ // TODO: Should this be static or should it be parameterized?
+ border-radius: 0;
+ }
+
+ &.start-date {
+ border-radius: $daterangepicker-cell-border-radius 0 0 $daterangepicker-cell-border-radius;
+ }
+
+ &.end-date {
+ border-radius: 0 $daterangepicker-cell-border-radius $daterangepicker-cell-border-radius 0;
+ }
+
+ &.start-date.end-date {
+ border-radius: $daterangepicker-cell-border-radius;
+ }
+
+ &.active {
+ &, &:hover {
+ background-color: $daterangepicker-active-bg-color;
+ border-color: $daterangepicker-active-border-color;
+ color: $daterangepicker-active-color;
+ }
+ }
+ }
+
+ th {
+ &.month {
+ width: auto;
+ }
+ }
+
+ //
+ // Disabled Controls
+ //
+ td, option {
+ &.disabled {
+ color: #999;
+ cursor: not-allowed;
+ text-decoration: line-through;
+ }
+ }
+
+ select {
+ &.monthselect, &.yearselect {
+ font-size: 12px;
+ padding: 1px;
+ height: auto;
+ margin: 0;
+ cursor: default;
+ }
+
+ &.monthselect {
+ margin-right: 2%;
+ width: 56%;
+ }
+
+ &.yearselect {
+ width: 40%;
+ }
+
+ &.hourselect, &.minuteselect, &.secondselect, &.ampmselect {
+ width: 50px;
+ margin-bottom: 0;
+ }
+ }
+
+ //
+ // Text Input Controls (above calendar)
+ //
+ .input-mini {
+ border: $daterangepicker-control-border-size solid $daterangepicker-control-border-color;
+ border-radius: $daterangepicker-control-border-radius;
+ color: $daterangepicker-control-color;
+ height: $daterangepicker-control-line-height;
+ line-height: $daterangepicker-control-height;
+ display: block;
+ vertical-align: middle;
+
+ // TODO: Should these all be static, too??
+ margin: 0 0 5px 0;
+ padding: 0 6px 0 28px;
+ width: 100%;
+
+ &.active {
+ border: $daterangepicker-control-active-border-size solid $daterangepicker-control-active-border-color;
+ border-radius: $daterangepicker-control-active-border-radius;
+ }
+ }
+
+ .daterangepicker_input {
+ position: relative;
+
+ i {
+ position: absolute;
+
+ // NOTE: These appear to be eyeballed to me...
+ left: 8px;
+ top: 8px;
+ }
+ }
+ &.rtl {
+ .input-mini {
+ padding-right: 28px;
+ padding-left: 6px;
+ }
+ .daterangepicker_input i {
+ left: auto;
+ right: 8px;
+ }
+ }
+
+ //
+ // Time Picker
+ //
+ .calendar-time {
+ text-align: center;
+ margin: 5px auto;
+ line-height: $daterangepicker-control-line-height;
+ position: relative;
+ padding-left: 28px;
+
+ select {
+ &.disabled {
+ color: $daterangepicker-control-disabled-color;
+ cursor: not-allowed;
+ }
+ }
+ }
+}
+
+//
+// Predefined Ranges
+//
+
+.ranges {
+ font-size: 11px;
+ float: none;
+ margin: 4px;
+ text-align: left;
+
+ ul {
+ list-style: none;
+ margin: 0 auto;
+ padding: 0;
+ width: 100%;
+ }
+
+ li {
+ font-size: 13px;
+ background-color: $daterangepicker-ranges-bg-color;
+ border: $daterangepicker-ranges-border-size solid $daterangepicker-ranges-border-color;
+ border-radius: $daterangepicker-ranges-border-radius;
+ color: $daterangepicker-ranges-color;
+ padding: 3px 12px;
+ margin-bottom: 8px;
+ cursor: pointer;
+
+ &:hover {
+ background-color: $daterangepicker-ranges-hover-bg-color;
+ border: $daterangepicker-ranges-hover-border-size solid $daterangepicker-ranges-hover-border-color;
+ color: $daterangepicker-ranges-hover-color;
+ }
+
+ &.active {
+ background-color: $daterangepicker-ranges-hover-bg-color;
+ border: $daterangepicker-ranges-hover-border-size solid $daterangepicker-ranges-hover-border-color;
+ color: $daterangepicker-ranges-hover-color;
+ }
+ }
+}
+
+/* Larger Screen Styling */
+@media (min-width: 564px) {
+ .#{$prefix-class} {
+ width: auto;
+
+ .ranges {
+ ul {
+ width: 160px;
+ }
+ }
+
+ &.single {
+ .ranges {
+ ul {
+ width: 100%;
+ }
+ }
+
+ .calendar.left {
+ clear: none;
+ }
+
+ &.ltr {
+ .ranges, .calendar {
+ float:left;
+ }
+ }
+ &.rtl {
+ .ranges, .calendar {
+ float:right;
+ }
+ }
+ }
+
+ &.ltr {
+ direction: ltr;
+ text-align: left;
+ .calendar{
+ &.left {
+ clear: left;
+ margin-right: 0;
+
+ .calendar-table {
+ border-right: none;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+ }
+
+ &.right {
+ margin-left: 0;
+
+ .calendar-table {
+ border-left: none;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+ }
+ }
+
+ .left .daterangepicker_input {
+ padding-right: 12px;
+ }
+
+ .calendar.left .calendar-table {
+ padding-right: 12px;
+ }
+
+ .ranges, .calendar {
+ float: left;
+ }
+ }
+ &.rtl {
+ direction: rtl;
+ text-align: right;
+ .calendar{
+ &.left {
+ clear: right;
+ margin-left: 0;
+
+ .calendar-table {
+ border-left: none;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+ }
+
+ &.right {
+ margin-right: 0;
+
+ .calendar-table {
+ border-right: none;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+ }
+ }
+
+ .left .daterangepicker_input {
+ padding-left: 12px;
+ }
+
+ .calendar.left .calendar-table {
+ padding-left: 12px;
+ }
+
+ .ranges, .calendar {
+ text-align: right;
+ float: right;
+ }
+ }
+ }
+}
+
+@media (min-width: 730px) {
+ .#{$prefix-class} {
+ .ranges {
+ width: auto;
+ }
+ &.ltr {
+ .ranges {
+ float: left;
+ }
+ }
+ &.rtl {
+ .ranges {
+ float: right;
+ }
+ }
+
+ .calendar.left {
+ clear: none !important;
+ }
+ }
+}
diff --git a/public/bower_components/bootstrap-daterangepicker/demo.html b/public/bower_components/bootstrap-daterangepicker/demo.html
new file mode 100644
index 0000000..7633ee4
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/demo.html
@@ -0,0 +1,369 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
+ <head>
+ <meta charset="UTF-8" />
+ <title>A date range picker for Bootstrap</title>
+ <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" media="all" href="daterangepicker.css" />
+ <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
+ <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="moment.js"></script>
+ <script type="text/javascript" src="daterangepicker.js"></script>
+
+ <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+ <![endif]-->
+ </head>
+ <body style="margin: 60px 0">
+
+ <div class="container">
+
+ <h1 style="margin: 0 0 20px 0">Configuration Builder</h1>
+
+ <div class="well configurator">
+
+ <form>
+ <div class="row">
+
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="parentEl">parentEl</label>
+ <input type="text" class="form-control" id="parentEl" value="" placeholder="body">
+ </div>
+
+ <div class="form-group">
+ <label for="startDate">startDate</label>
+ <input type="text" class="form-control" id="startDate" value="07/01/2015">
+ </div>
+
+ <div class="form-group">
+ <label for="endDate">endDate</label>
+ <input type="text" class="form-control" id="endDate" value="07/15/2015">
+ </div>
+
+ <div class="form-group">
+ <label for="minDate">minDate</label>
+ <input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ <div class="form-group">
+ <label for="maxDate">maxDate</label>
+ <input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoApply"> autoApply
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="singleDatePicker"> singleDatePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showDropdowns"> showDropdowns
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showWeekNumbers"> showWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker"> timePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker24Hour"> timePicker24Hour
+ </label>
+ </div>
+
+ <div class="form-group">
+ <label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
+ <input type="text" class="form-control" id="timePickerIncrement" value="1">
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePickerSeconds"> timePickerSeconds
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="dateLimit"> dateLimit (with example date range span)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="ranges"> ranges (with example predefined ranges)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="locale"> locale (with example settings)
+ </label>
+ <label id="rtl-wrap">
+ <input type="checkbox" id="rtl"> RTL (right-to-left)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
+ </label>
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showCustomRangeLabel" checked="checked"> showCustomRangeLabel
+ </label>
+ </div>
+
+ <div class="form-group">
+ <label for="opens">opens</label>
+ <select id="opens" class="form-control">
+ <option value="right" selected>right</option>
+ <option value="left">left</option>
+ <option value="center">center</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="drops">drops</label>
+ <select id="drops" class="form-control">
+ <option value="down" selected>down</option>
+ <option value="up">up</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="buttonClasses">buttonClasses</label>
+ <input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
+ </div>
+
+ <div class="form-group">
+ <label for="applyClass">applyClass</label>
+ <input type="text" class="form-control" id="applyClass" value="btn-success">
+ </div>
+
+ <div class="form-group">
+ <label for="cancelClass">cancelClass</label>
+ <input type="text" class="form-control" id="cancelClass" value="btn-default">
+ </div>
+
+ </div>
+
+ </div>
+ </form>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col-md-4 col-md-offset-2 demo">
+ <h4>Your Date Range Picker</h4>
+ <input type="text" id="config-demo" class="form-control">
+ <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
+ </div>
+
+ <div class="col-md-6">
+ <h4>Configuration</h4>
+
+ <div class="well">
+ <textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+ <style type="text/css">
+ .demo { position: relative; }
+ .demo i {
+ position: absolute; bottom: 10px; right: 24px; top: auto; cursor: pointer;
+ }
+ </style>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+
+ $('#config-text').keyup(function() {
+ eval($(this).val());
+ });
+
+ $('.configurator input, .configurator select').change(function() {
+ updateConfig();
+ });
+
+ $('.demo i').click(function() {
+ $(this).parent().find('input').click();
+ });
+
+ $('#startDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment().subtract(6, 'days')
+ });
+
+ $('#endDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment()
+ });
+
+ updateConfig();
+
+ function updateConfig() {
+ var options = {};
+
+ if ($('#singleDatePicker').is(':checked'))
+ options.singleDatePicker = true;
+
+ if ($('#showDropdowns').is(':checked'))
+ options.showDropdowns = true;
+
+ if ($('#showWeekNumbers').is(':checked'))
+ options.showWeekNumbers = true;
+
+ if ($('#showISOWeekNumbers').is(':checked'))
+ options.showISOWeekNumbers = true;
+
+ if ($('#timePicker').is(':checked'))
+ options.timePicker = true;
+
+ if ($('#timePicker24Hour').is(':checked'))
+ options.timePicker24Hour = true;
+
+ if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
+ options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
+
+ if ($('#timePickerSeconds').is(':checked'))
+ options.timePickerSeconds = true;
+
+ if ($('#autoApply').is(':checked'))
+ options.autoApply = true;
+
+ if ($('#dateLimit').is(':checked'))
+ options.dateLimit = { days: 7 };
+
+ if ($('#ranges').is(':checked')) {
+ options.ranges = {
+ 'Today': [moment(), moment()],
+ 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+ };
+ }
+
+ if ($('#locale').is(':checked')) {
+ $('#rtl-wrap').show();
+ options.locale = {
+ direction: $('#rtl').is(':checked') ? 'rtl' : 'ltr',
+ format: 'MM/DD/YYYY HH:mm',
+ separator: ' - ',
+ applyLabel: 'Apply',
+ cancelLabel: 'Cancel',
+ fromLabel: 'From',
+ toLabel: 'To',
+ customRangeLabel: 'Custom',
+ daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
+ monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ firstDay: 1
+ };
+ } else {
+ $('#rtl-wrap').hide();
+ }
+
+ if (!$('#linkedCalendars').is(':checked'))
+ options.linkedCalendars = false;
+
+ if (!$('#autoUpdateInput').is(':checked'))
+ options.autoUpdateInput = false;
+
+ if (!$('#showCustomRangeLabel').is(':checked'))
+ options.showCustomRangeLabel = false;
+
+ if ($('#alwaysShowCalendars').is(':checked'))
+ options.alwaysShowCalendars = true;
+
+ if ($('#parentEl').val().length)
+ options.parentEl = $('#parentEl').val();
+
+ if ($('#startDate').val().length)
+ options.startDate = $('#startDate').val();
+
+ if ($('#endDate').val().length)
+ options.endDate = $('#endDate').val();
+
+ if ($('#minDate').val().length)
+ options.minDate = $('#minDate').val();
+
+ if ($('#maxDate').val().length)
+ options.maxDate = $('#maxDate').val();
+
+ if ($('#opens').val().length && $('#opens').val() != 'right')
+ options.opens = $('#opens').val();
+
+ if ($('#drops').val().length && $('#drops').val() != 'down')
+ options.drops = $('#drops').val();
+
+ if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
+ options.buttonClasses = $('#buttonClasses').val();
+
+ if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success')
+ options.applyClass = $('#applyClass').val();
+
+ if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default')
+ options.cancelClass = $('#cancelClass').val();
+
+ $('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});");
+
+ $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
+
+ }
+
+ });
+ </script>
+
+ </body>
+</html>
diff --git a/public/bower_components/bootstrap-daterangepicker/drp.png b/public/bower_components/bootstrap-daterangepicker/drp.png
new file mode 100644
index 0000000..9eee1fa
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/drp.png
Binary files differ
diff --git a/public/bower_components/bootstrap-daterangepicker/example/amd/index.html b/public/bower_components/bootstrap-daterangepicker/example/amd/index.html
new file mode 100644
index 0000000..533c94e
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/amd/index.html
@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
+ <head>
+ <meta charset="UTF-8" />
+ <title>A date range picker for Bootstrap</title>
+ <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" media="all" href="../../daterangepicker.css" />
+ <style type="text/css">
+ .demo { position: relative; }
+ .demo i {
+ position: absolute; bottom: 10px; right: 24px; top: auto; cursor: pointer;
+ }
+ </style>
+ </head>
+ <body style="margin: 60px 0">
+
+ <div class="container">
+
+ <h1 style="margin: 0 0 20px 0">Configuration Builder</h1>
+
+ <div class="well configurator">
+
+ <form>
+ <div class="row">
+
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="parentEl">parentEl</label>
+ <input type="text" class="form-control" id="parentEl" value="" placeholder="body">
+ </div>
+
+ <div class="form-group">
+ <label for="startDate">startDate</label>
+ <input type="text" class="form-control" id="startDate" value="07/01/2015">
+ </div>
+
+ <div class="form-group">
+ <label for="endDate">endDate</label>
+ <input type="text" class="form-control" id="endDate" value="07/15/2015">
+ </div>
+
+ <div class="form-group">
+ <label for="minDate">minDate</label>
+ <input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ <div class="form-group">
+ <label for="maxDate">maxDate</label>
+ <input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoApply"> autoApply
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="singleDatePicker"> singleDatePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showDropdowns"> showDropdowns
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showWeekNumbers"> showWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker"> timePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker24Hour"> timePicker24Hour
+ </label>
+ </div>
+
+ <div class="form-group">
+ <label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
+ <input type="text" class="form-control" id="timePickerIncrement" value="1">
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePickerSeconds"> timePickerSeconds
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="dateLimit"> dateLimit (with example date range span)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="ranges"> ranges (with example predefined ranges)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="locale"> locale (with example settings)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
+ </label>
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="opens">opens</label>
+ <select id="opens" class="form-control">
+ <option value="right" selected>right</option>
+ <option value="left">left</option>
+ <option value="center">center</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="drops">drops</label>
+ <select id="drops" class="form-control">
+ <option value="down" selected>down</option>
+ <option value="up">up</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="buttonClasses">buttonClasses</label>
+ <input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
+ </div>
+
+ <div class="form-group">
+ <label for="applyClass">applyClass</label>
+ <input type="text" class="form-control" id="applyClass" value="btn-success">
+ </div>
+
+ <div class="form-group">
+ <label for="cancelClass">cancelClass</label>
+ <input type="text" class="form-control" id="cancelClass" value="btn-default">
+ </div>
+
+ </div>
+
+ </div>
+ </form>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col-md-4 col-md-offset-2 demo">
+ <h4>Your Date Range Picker</h4>
+ <input type="text" id="config-demo" class="form-control">
+ <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
+ </div>
+
+ <div class="col-md-6">
+ <h4>Configuration</h4>
+
+ <div class="well">
+ <textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+
+ <script type="text/javascript" src="require.js" data-main="main.js"></script>
+ </body>
+</html>
diff --git a/public/bower_components/bootstrap-daterangepicker/example/amd/main.js b/public/bower_components/bootstrap-daterangepicker/example/amd/main.js
new file mode 100644
index 0000000..5c0f99a
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/amd/main.js
@@ -0,0 +1,141 @@
+requirejs.config({
+ "paths": {
+ "jquery": "https://code.jquery.com/jquery-1.11.3.min",
+ "moment": "../../moment",
+ "daterangepicker": "../../daterangepicker"
+ }
+});
+
+requirejs(['jquery', 'moment', 'daterangepicker'] , function ($, moment) {
+$(document).ready(function() {
+
+ $('#config-text').keyup(function() {
+ eval($(this).val());
+ });
+
+ $('.configurator input, .configurator select').change(function() {
+ updateConfig();
+ });
+
+ $('.demo i').click(function() {
+ $(this).parent().find('input').click();
+ });
+
+ $('#startDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment().subtract(6, 'days')
+ });
+
+ $('#endDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment()
+ });
+
+ updateConfig();
+
+ function updateConfig() {
+ var options = {};
+
+ if ($('#singleDatePicker').is(':checked'))
+ options.singleDatePicker = true;
+
+ if ($('#showDropdowns').is(':checked'))
+ options.showDropdowns = true;
+
+ if ($('#showWeekNumbers').is(':checked'))
+ options.showWeekNumbers = true;
+
+ if ($('#showISOWeekNumbers').is(':checked'))
+ options.showISOWeekNumbers = true;
+
+ if ($('#timePicker').is(':checked'))
+ options.timePicker = true;
+
+ if ($('#timePicker24Hour').is(':checked'))
+ options.timePicker24Hour = true;
+
+ if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
+ options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
+
+ if ($('#timePickerSeconds').is(':checked'))
+ options.timePickerSeconds = true;
+
+ if ($('#autoApply').is(':checked'))
+ options.autoApply = true;
+
+ if ($('#dateLimit').is(':checked'))
+ options.dateLimit = { days: 7 };
+
+ if ($('#ranges').is(':checked')) {
+ options.ranges = {
+ 'Today': [moment(), moment()],
+ 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+ };
+ }
+
+ if ($('#locale').is(':checked')) {
+ options.locale = {
+ format: 'MM/DD/YYYY HH:mm',
+ separator: ' - ',
+ applyLabel: 'Apply',
+ cancelLabel: 'Cancel',
+ fromLabel: 'From',
+ toLabel: 'To',
+ customRangeLabel: 'Custom',
+ daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
+ monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ firstDay: 1
+ };
+ }
+
+ if (!$('#linkedCalendars').is(':checked'))
+ options.linkedCalendars = false;
+
+ if (!$('#autoUpdateInput').is(':checked'))
+ options.autoUpdateInput = false;
+
+ if ($('#alwaysShowCalendars').is(':checked'))
+ options.alwaysShowCalendars = true;
+
+ if ($('#parentEl').val().length)
+ options.parentEl = $('#parentEl').val();
+
+ if ($('#startDate').val().length)
+ options.startDate = $('#startDate').val();
+
+ if ($('#endDate').val().length)
+ options.endDate = $('#endDate').val();
+
+ if ($('#minDate').val().length)
+ options.minDate = $('#minDate').val();
+
+ if ($('#maxDate').val().length)
+ options.maxDate = $('#maxDate').val();
+
+ if ($('#opens').val().length && $('#opens').val() != 'right')
+ options.opens = $('#opens').val();
+
+ if ($('#drops').val().length && $('#drops').val() != 'down')
+ options.drops = $('#drops').val();
+
+ if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
+ options.buttonClasses = $('#buttonClasses').val();
+
+ if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success')
+ options.applyClass = $('#applyClass').val();
+
+ if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default')
+ options.cancelClass = $('#cancelClass').val();
+
+ $('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});");
+
+ $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
+
+ }
+
+});
+});
diff --git a/public/bower_components/bootstrap-daterangepicker/example/amd/require.js b/public/bower_components/bootstrap-daterangepicker/example/amd/require.js
new file mode 100644
index 0000000..857eb5b
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/amd/require.js
@@ -0,0 +1,36 @@
+/*
+ RequireJS 2.2.0 Copyright jQuery Foundation and other contributors.
+ Released under MIT license, http://github.com/requirejs/requirejs/LICENSE
+*/
+var requirejs,require,define;
+(function(ga){function ka(b,c,d,g){return g||""}function K(b){return"[object Function]"===Q.call(b)}function L(b){return"[object Array]"===Q.call(b)}function y(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function X(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));--d);}}function x(b,c){return la.call(b,c)}function e(b,c){return x(b,c)&&b[c]}function D(b,c){for(var d in b)if(x(b,d)&&c(b[d],d))break}function Y(b,c,d,g){c&&D(c,function(c,e){if(d||!x(b,e))!g||"object"!==
+typeof c||!c||L(c)||K(c)||c instanceof RegExp?b[e]=c:(b[e]||(b[e]={}),Y(b[e],c,d,g))});return b}function z(b,c){return function(){return c.apply(b,arguments)}}function ha(b){throw b;}function ia(b){if(!b)return b;var c=ga;y(b.split("."),function(b){c=c[b]});return c}function F(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ma(b){function c(a,n,b){var h,k,f,c,d,l,g,r;n=n&&n.split("/");var q=p.map,m=q&&q["*"];
+if(a){a=a.split("/");k=a.length-1;p.nodeIdCompat&&U.test(a[k])&&(a[k]=a[k].replace(U,""));"."===a[0].charAt(0)&&n&&(k=n.slice(0,n.length-1),a=k.concat(a));k=a;for(f=0;f<k.length;f++)c=k[f],"."===c?(k.splice(f,1),--f):".."===c&&0!==f&&(1!==f||".."!==k[2])&&".."!==k[f-1]&&0<f&&(k.splice(f-1,2),f-=2);a=a.join("/")}if(b&&q&&(n||m)){k=a.split("/");f=k.length;a:for(;0<f;--f){d=k.slice(0,f).join("/");if(n)for(c=n.length;0<c;--c)if(b=e(q,n.slice(0,c).join("/")))if(b=e(b,d)){h=b;l=f;break a}!g&&m&&e(m,d)&&
+(g=e(m,d),r=f)}!h&&g&&(h=g,l=r);h&&(k.splice(0,l,h),a=k.join("/"))}return(h=e(p.pkgs,a))?h:a}function d(a){E&&y(document.getElementsByTagName("script"),function(n){if(n.getAttribute("data-requiremodule")===a&&n.getAttribute("data-requirecontext")===l.contextName)return n.parentNode.removeChild(n),!0})}function m(a){var n=e(p.paths,a);if(n&&L(n)&&1<n.length)return n.shift(),l.require.undef(a),l.makeRequire(null,{skipMap:!0})([a]),!0}function r(a){var n,b=a?a.indexOf("!"):-1;-1<b&&(n=a.substring(0,
+b),a=a.substring(b+1,a.length));return[n,a]}function q(a,n,b,h){var k,f,d=null,g=n?n.name:null,p=a,q=!0,m="";a||(q=!1,a="_@r"+(Q+=1));a=r(a);d=a[0];a=a[1];d&&(d=c(d,g,h),f=e(v,d));a&&(d?m=f&&f.normalize?f.normalize(a,function(a){return c(a,g,h)}):-1===a.indexOf("!")?c(a,g,h):a:(m=c(a,g,h),a=r(m),d=a[0],m=a[1],b=!0,k=l.nameToUrl(m)));b=!d||f||b?"":"_unnormalized"+(T+=1);return{prefix:d,name:m,parentMap:n,unnormalized:!!b,url:k,originalName:p,isDefine:q,id:(d?d+"!"+m:m)+b}}function u(a){var b=a.id,
+c=e(t,b);c||(c=t[b]=new l.Module(a));return c}function w(a,b,c){var h=a.id,k=e(t,h);if(!x(v,h)||k&&!k.defineEmitComplete)if(k=u(a),k.error&&"error"===b)c(k.error);else k.on(b,c);else"defined"===b&&c(v[h])}function A(a,b){var c=a.requireModules,h=!1;if(b)b(a);else if(y(c,function(b){if(b=e(t,b))b.error=a,b.events.error&&(h=!0,b.emit("error",a))}),!h)g.onError(a)}function B(){V.length&&(y(V,function(a){var b=a[0];"string"===typeof b&&(l.defQueueMap[b]=!0);G.push(a)}),V=[])}function C(a){delete t[a];
+delete Z[a]}function J(a,b,c){var h=a.map.id;a.error?a.emit("error",a.error):(b[h]=!0,y(a.depMaps,function(h,f){var d=h.id,g=e(t,d);!g||a.depMatched[f]||c[d]||(e(b,d)?(a.defineDep(f,v[d]),a.check()):J(g,b,c))}),c[h]=!0)}function H(){var a,b,c=(a=1E3*p.waitSeconds)&&l.startTime+a<(new Date).getTime(),h=[],k=[],f=!1,g=!0;if(!aa){aa=!0;D(Z,function(a){var l=a.map,e=l.id;if(a.enabled&&(l.isDefine||k.push(a),!a.error))if(!a.inited&&c)m(e)?f=b=!0:(h.push(e),d(e));else if(!a.inited&&a.fetched&&l.isDefine&&
+(f=!0,!l.prefix))return g=!1});if(c&&h.length)return a=F("timeout","Load timeout for modules: "+h,null,h),a.contextName=l.contextName,A(a);g&&y(k,function(a){J(a,{},{})});c&&!b||!f||!E&&!ja||ba||(ba=setTimeout(function(){ba=0;H()},50));aa=!1}}function I(a){x(v,a[0])||u(q(a[0],null,!0)).init(a[1],a[2])}function O(a){a=a.currentTarget||a.srcElement;var b=l.onScriptLoad;a.detachEvent&&!ca?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=l.onScriptError;a.detachEvent&&!ca||a.removeEventListener("error",
+b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function P(){var a;for(B();G.length;){a=G.shift();if(null===a[0])return A(F("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));I(a)}l.defQueueMap={}}var aa,da,l,R,ba,p={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},t={},Z={},ea={},G=[],v={},W={},fa={},Q=1,T=1;R={require:function(a){return a.require?a.require:a.require=l.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?
+v[a.map.id]=a.exports:a.exports=v[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return e(p.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};da=function(a){this.events=e(ea,a.id)||{};this.map=a;this.shim=e(p.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};da.prototype={init:function(a,b,c,h){h=h||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&
+(c=z(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=h.ignore;h.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,--this.depCount,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;l.startTime=(new Date).getTime();var a=this.map;if(this.shim)l.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],z(this,function(){return a.prefix?this.callPlugin():
+this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;W[a]||(W[a]=!0,l.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var h=this.exports,k=this.factory;if(!this.inited)x(l.defQueueMap,c)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(K(k)){if(this.events.error&&this.map.isDefine||g.onError!==
+ha)try{h=l.execCb(c,k,b,h)}catch(d){a=d}else h=l.execCb(c,k,b,h);this.map.isDefine&&void 0===h&&((b=this.module)?h=b.exports:this.usingExports&&(h=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",A(this.error=a)}else h=k;this.exports=h;if(this.map.isDefine&&!this.ignore&&(v[c]=h,g.onResourceLoad)){var f=[];y(this.depMaps,function(a){f.push(a.normalizedMap||a)});g.onResourceLoad(l,this.map,f)}C(c);
+this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var a=this.map,b=a.id,d=q(a.prefix);this.depMaps.push(d);w(d,"defined",z(this,function(h){var k,f,d=e(fa,this.map.id),M=this.map.name,r=this.map.parentMap?this.map.parentMap.name:null,m=l.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(h.normalize&&(M=h.normalize(M,function(a){return c(a,r,!0)})||
+""),f=q(a.prefix+"!"+M,this.map.parentMap),w(f,"defined",z(this,function(a){this.map.normalizedMap=f;this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),h=e(t,f.id)){this.depMaps.push(f);if(this.events.error)h.on("error",z(this,function(a){this.emit("error",a)}));h.enable()}}else d?(this.map.url=l.nameToUrl(d),this.load()):(k=z(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),k.error=z(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];D(t,function(a){0===
+a.map.id.indexOf(b+"_unnormalized")&&C(a.map.id)});A(a)}),k.fromText=z(this,function(h,c){var d=a.name,f=q(d),M=S;c&&(h=c);M&&(S=!1);u(f);x(p.config,b)&&(p.config[d]=p.config[b]);try{g.exec(h)}catch(e){return A(F("fromtexteval","fromText eval for "+b+" failed: "+e,e,[b]))}M&&(S=!0);this.depMaps.push(f);l.completeLoad(d);m([d],k)}),h.load(a.name,m,k,p))}));l.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){Z[this.map.id]=this;this.enabling=this.enabled=!0;y(this.depMaps,z(this,function(a,
+b){var c,h;if("string"===typeof a){a=q(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=e(R,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;w(a,"defined",z(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?w(a,"error",z(this,this.errback)):this.events.error&&w(a,"error",z(this,function(a){this.emit("error",a)}))}c=a.id;h=t[c];x(R,c)||!h||h.enabled||l.enable(a,this)}));D(this.pluginMaps,z(this,function(a){var b=e(t,a.id);
+b&&!b.enabled&&l.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};l={config:p,contextName:b,registry:t,defined:v,urlFetched:W,defQueue:G,defQueueMap:{},Module:da,makeModuleMap:q,nextTick:g.nextTick,onError:A,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");if("string"===typeof a.urlArgs){var b=
+a.urlArgs;a.urlArgs=function(a,c){return(-1===c.indexOf("?")?"?":"&")+b}}var c=p.shim,h={paths:!0,bundles:!0,config:!0,map:!0};D(a,function(a,b){h[b]?(p[b]||(p[b]={}),Y(p[b],a,!0,!0)):p[b]=a});a.bundles&&D(a.bundles,function(a,b){y(a,function(a){a!==b&&(fa[a]=b)})});a.shim&&(D(a.shim,function(a,b){L(a)&&(a={deps:a});!a.exports&&!a.init||a.exportsFn||(a.exportsFn=l.makeShimExports(a));c[b]=a}),p.shim=c);a.packages&&y(a.packages,function(a){var b;a="string"===typeof a?{name:a}:a;b=a.name;a.location&&
+(p.paths[b]=a.location);p.pkgs[b]=a.name+"/"+(a.main||"main").replace(na,"").replace(U,"")});D(t,function(a,b){a.inited||a.map.unnormalized||(a.map=q(b,null,!0))});(a.deps||a.callback)&&l.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ga,arguments));return b||a.exports&&ia(a.exports)}},makeRequire:function(a,n){function m(c,d,f){var e,r;n.enableBuildCallback&&d&&K(d)&&(d.__requireJsBuild=!0);if("string"===typeof c){if(K(d))return A(F("requireargs",
+"Invalid require call"),f);if(a&&x(R,c))return R[c](t[a.id]);if(g.get)return g.get(l,c,a,m);e=q(c,a,!1,!0);e=e.id;return x(v,e)?v[e]:A(F("notloaded",'Module name "'+e+'" has not been loaded yet for context: '+b+(a?"":". Use require([])")))}P();l.nextTick(function(){P();r=u(q(null,a));r.skipMap=n.skipMap;r.init(c,d,f,{enabled:!0});H()});return m}n=n||{};Y(m,{isBrowser:E,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];-1!==f&&("."!==g&&".."!==g||1<f)&&(d=b.substring(f,b.length),b=b.substring(0,
+f));return l.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return x(v,q(b,a,!1,!0).id)},specified:function(b){b=q(b,a,!1,!0).id;return x(v,b)||x(t,b)}});a||(m.undef=function(b){B();var c=q(b,a,!0),f=e(t,b);f.undefed=!0;d(b);delete v[b];delete W[c.url];delete ea[b];X(G,function(a,c){a[0]===b&&G.splice(c,1)});delete l.defQueueMap[b];f&&(f.events.defined&&(ea[b]=f.events),C(b))});return m},enable:function(a){e(t,a.id)&&u(a).enable()},completeLoad:function(a){var b,c,d=e(p.shim,a)||{},g=d.exports;
+for(B();G.length;){c=G.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);I(c)}l.defQueueMap={};c=e(t,a);if(!b&&!x(v,a)&&c&&!c.inited)if(!p.enforceDefine||g&&ia(g))I([a,d.deps||[],d.exportsFn]);else return m(a)?void 0:A(F("nodefine","No define call for "+a,null,[a]));H()},nameToUrl:function(a,b,c){var d,k,f,m;(d=e(p.pkgs,a))&&(a=d);if(d=e(fa,a))return l.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=p.paths;k=a.split("/");for(f=k.length;0<f;--f)if(m=k.slice(0,f).join("/"),
+m=e(d,m)){L(m)&&(m=m[0]);k.splice(0,f,m);break}d=k.join("/");d+=b||(/^data\:|^blob\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":p.baseUrl)+d}return p.urlArgs&&!/^blob\:/.test(d)?d+p.urlArgs(a,d):d},load:function(a,b){g.load(l,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||oa.test((a.currentTarget||a.srcElement).readyState))N=null,a=O(a),l.completeLoad(a.id)},onScriptError:function(a){var b=O(a);if(!m(b.id)){var c=[];
+D(t,function(a,d){0!==d.indexOf("_@r")&&y(a.depMaps,function(a){if(a.id===b.id)return c.push(d),!0})});return A(F("scripterror",'Script error for "'+b.id+(c.length?'", needed by: '+c.join(", "):'"'),a,[b.id]))}}};l.require=l.makeRequire();return l}function pa(){if(N&&"interactive"===N.readyState)return N;X(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b});return N}var g,B,C,H,O,I,N,P,u,T,qa=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ra=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
+U=/\.js$/,na=/^\.\//;B=Object.prototype;var Q=B.toString,la=B.hasOwnProperty,E=!("undefined"===typeof window||"undefined"===typeof navigator||!window.document),ja=!E&&"undefined"!==typeof importScripts,oa=E&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,ca="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),J={},w={},V=[],S=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(K(requirejs))return;w=requirejs;requirejs=void 0}"undefined"===typeof require||
+K(require)||(w=require,require=void 0);g=requirejs=function(b,c,d,m){var r,q="_";L(b)||"string"===typeof b||(r=b,L(c)?(b=c,c=d,d=m):b=[]);r&&r.context&&(q=r.context);(m=e(J,q))||(m=J[q]=g.s.newContext(q));r&&m.configure(r);return m.require(b,c,d)};g.config=function(b){return g(b)};g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.2.0";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=E;B=g.s={contexts:J,newContext:ma};g({});y(["toUrl",
+"undef","defined","specified"],function(b){g[b]=function(){var c=J._;return c.require[b].apply(c,arguments)}});E&&(C=B.head=document.getElementsByTagName("head")[0],H=document.getElementsByTagName("base")[0])&&(C=B.head=H.parentNode);g.onError=ha;g.createNode=function(b,c,d){c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var m=b&&b.config||
+{},e;if(E){e=g.createNode(m,c,d);e.setAttribute("data-requirecontext",b.contextName);e.setAttribute("data-requiremodule",c);!e.attachEvent||e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code")||ca?(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)):(S=!0,e.attachEvent("onreadystatechange",b.onScriptLoad));e.src=d;if(m.onNodeCreated)m.onNodeCreated(e,m,c,d);P=e;H?C.insertBefore(e,H):C.appendChild(e);P=null;return e}if(ja)try{setTimeout(function(){},
+0),importScripts(d),b.completeLoad(c)}catch(q){b.onError(F("importscripts","importScripts failed for "+c+" at "+d,q,[c]))}};E&&!w.skipDataMain&&X(document.getElementsByTagName("script"),function(b){C||(C=b.parentNode);if(O=b.getAttribute("data-main"))return u=O,w.baseUrl||-1!==u.indexOf("!")||(I=u.split("/"),u=I.pop(),T=I.length?I.join("/")+"/":"./",w.baseUrl=T),u=u.replace(U,""),g.jsExtRegExp.test(u)&&(u=O),w.deps=w.deps?w.deps.concat(u):[u],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&
+(d=c,c=b,b=null);L(c)||(d=c,c=null);!c&&K(d)&&(c=[],d.length&&(d.toString().replace(qa,ka).replace(ra,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));S&&(e=P||pa())&&(b||(b=e.getAttribute("data-requiremodule")),g=J[e.getAttribute("data-requirecontext")]);g?(g.defQueue.push([b,c,d]),g.defQueueMap[b]=!0):V.push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(w)}})(this);
diff --git a/public/bower_components/bootstrap-daterangepicker/example/browserify/README.md b/public/bower_components/bootstrap-daterangepicker/example/browserify/README.md
new file mode 100644
index 0000000..123b093
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/browserify/README.md
@@ -0,0 +1,11 @@
+# Browserify example
+
+Two steps need to be done for this to work
+
+In the project root
+
+ npm install
+
+In this folder
+
+ ../../node_modules/.bin/browserify main.js -o bundle.js
diff --git a/public/bower_components/bootstrap-daterangepicker/example/browserify/bundle.js b/public/bower_components/bootstrap-daterangepicker/example/browserify/bundle.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/browserify/bundle.js
diff --git a/public/bower_components/bootstrap-daterangepicker/example/browserify/index.html b/public/bower_components/bootstrap-daterangepicker/example/browserify/index.html
new file mode 100644
index 0000000..bdce82e
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/browserify/index.html
@@ -0,0 +1,209 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
+ <head>
+ <meta charset="UTF-8" />
+ <title>A date range picker for Bootstrap</title>
+ <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" media="all" href="../../daterangepicker.css" />
+ <style type="text/css">
+ .demo { position: relative; }
+ .demo i {
+ position: absolute; bottom: 10px; right: 24px; top: auto; cursor: pointer;
+ }
+ </style>
+ </head>
+ <body style="margin: 60px 0">
+
+ <div class="container">
+
+ <h1 style="margin: 0 0 20px 0">Configuration Builder</h1>
+
+ <div class="well configurator">
+
+ <form>
+ <div class="row">
+
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="parentEl">parentEl</label>
+ <input type="text" class="form-control" id="parentEl" value="" placeholder="body">
+ </div>
+
+ <div class="form-group">
+ <label for="startDate">startDate</label>
+ <input type="text" class="form-control" id="startDate" value="07/01/2015">
+ </div>
+
+ <div class="form-group">
+ <label for="endDate">endDate</label>
+ <input type="text" class="form-control" id="endDate" value="07/15/2015">
+ </div>
+
+ <div class="form-group">
+ <label for="minDate">minDate</label>
+ <input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ <div class="form-group">
+ <label for="maxDate">maxDate</label>
+ <input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoApply"> autoApply
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="singleDatePicker"> singleDatePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showDropdowns"> showDropdowns
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showWeekNumbers"> showWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker"> timePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker24Hour"> timePicker24Hour
+ </label>
+ </div>
+
+ <div class="form-group">
+ <label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
+ <input type="text" class="form-control" id="timePickerIncrement" value="1">
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePickerSeconds"> timePickerSeconds
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="dateLimit"> dateLimit (with example date range span)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="ranges"> ranges (with example predefined ranges)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="locale"> locale (with example settings)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
+ </label>
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="opens">opens</label>
+ <select id="opens" class="form-control">
+ <option value="right" selected>right</option>
+ <option value="left">left</option>
+ <option value="center">center</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="drops">drops</label>
+ <select id="drops" class="form-control">
+ <option value="down" selected>down</option>
+ <option value="up">up</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="buttonClasses">buttonClasses</label>
+ <input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
+ </div>
+
+ <div class="form-group">
+ <label for="applyClass">applyClass</label>
+ <input type="text" class="form-control" id="applyClass" value="btn-success">
+ </div>
+
+ <div class="form-group">
+ <label for="cancelClass">cancelClass</label>
+ <input type="text" class="form-control" id="cancelClass" value="btn-default">
+ </div>
+
+ </div>
+
+ </div>
+ </form>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col-md-4 col-md-offset-2 demo">
+ <h4>Your Date Range Picker</h4>
+ <input type="text" id="config-demo" class="form-control">
+ <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
+ </div>
+
+ <div class="col-md-6">
+ <h4>Configuration</h4>
+
+ <div class="well">
+ <textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+ <script type="text/javascript" src="bundle.js"></script>
+ </body>
+</html>
diff --git a/public/bower_components/bootstrap-daterangepicker/example/browserify/main.js b/public/bower_components/bootstrap-daterangepicker/example/browserify/main.js
new file mode 100644
index 0000000..30e92d4
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/example/browserify/main.js
@@ -0,0 +1,135 @@
+require('../../daterangepicker.js');
+var $ = require('jquery'),
+ moment = require('moment');
+
+$(document).ready(function() {
+
+ $('#config-text').keyup(function() {
+ eval($(this).val());
+ });
+
+ $('.configurator input, .configurator select').change(function() {
+ updateConfig();
+ });
+
+ $('.demo i').click(function() {
+ $(this).parent().find('input').click();
+ });
+
+ $('#startDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment().subtract(6, 'days')
+ });
+
+ $('#endDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment()
+ });
+
+ updateConfig();
+
+ function updateConfig() {
+ var options = {};
+
+ if ($('#singleDatePicker').is(':checked'))
+ options.singleDatePicker = true;
+
+ if ($('#showDropdowns').is(':checked'))
+ options.showDropdowns = true;
+
+ if ($('#showWeekNumbers').is(':checked'))
+ options.showWeekNumbers = true;
+
+ if ($('#showISOWeekNumbers').is(':checked'))
+ options.showISOWeekNumbers = true;
+
+ if ($('#timePicker').is(':checked'))
+ options.timePicker = true;
+
+ if ($('#timePicker24Hour').is(':checked'))
+ options.timePicker24Hour = true;
+
+ if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
+ options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
+
+ if ($('#timePickerSeconds').is(':checked'))
+ options.timePickerSeconds = true;
+
+ if ($('#autoApply').is(':checked'))
+ options.autoApply = true;
+
+ if ($('#dateLimit').is(':checked'))
+ options.dateLimit = { days: 7 };
+
+ if ($('#ranges').is(':checked')) {
+ options.ranges = {
+ 'Today': [moment(), moment()],
+ 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+ };
+ }
+
+ if ($('#locale').is(':checked')) {
+ options.locale = {
+ format: 'MM/DD/YYYY HH:mm',
+ separator: ' - ',
+ applyLabel: 'Apply',
+ cancelLabel: 'Cancel',
+ fromLabel: 'From',
+ toLabel: 'To',
+ customRangeLabel: 'Custom',
+ daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
+ monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ firstDay: 1
+ };
+ }
+
+ if (!$('#linkedCalendars').is(':checked'))
+ options.linkedCalendars = false;
+
+ if (!$('#autoUpdateInput').is(':checked'))
+ options.autoUpdateInput = false;
+
+ if ($('#alwaysShowCalendars').is(':checked'))
+ options.alwaysShowCalendars = true;
+
+ if ($('#parentEl').val().length)
+ options.parentEl = $('#parentEl').val();
+
+ if ($('#startDate').val().length)
+ options.startDate = $('#startDate').val();
+
+ if ($('#endDate').val().length)
+ options.endDate = $('#endDate').val();
+
+ if ($('#minDate').val().length)
+ options.minDate = $('#minDate').val();
+
+ if ($('#maxDate').val().length)
+ options.maxDate = $('#maxDate').val();
+
+ if ($('#opens').val().length && $('#opens').val() != 'right')
+ options.opens = $('#opens').val();
+
+ if ($('#drops').val().length && $('#drops').val() != 'down')
+ options.drops = $('#drops').val();
+
+ if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
+ options.buttonClasses = $('#buttonClasses').val();
+
+ if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success')
+ options.applyClass = $('#applyClass').val();
+
+ if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default')
+ options.cancelClass = $('#cancelClass').val();
+
+ $('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});");
+
+ $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
+
+ }
+
+});
diff --git a/public/bower_components/bootstrap-daterangepicker/package.js b/public/bower_components/bootstrap-daterangepicker/package.js
new file mode 100644
index 0000000..3dbe8b4
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/package.js
@@ -0,0 +1,18 @@
+Package.describe({
+ name: 'dangrossman:bootstrap-daterangepicker',
+ version: '2.1.27',
+ summary: 'Date range picker component for Bootstrap',
+ git: 'https://github.com/dangrossman/bootstrap-daterangepicker',
+ documentation: 'README.md'
+});
+
+Package.onUse(function(api) {
+ api.versionsFrom('METEOR@0.9.0.1');
+
+ api.use('twbs:bootstrap@3.3.4', ["client"], {weak: true});
+ api.use('momentjs:moment@2.10.3', ["client"]);
+ api.use('jquery@1.11.3_2', ["client"]);
+
+ api.addFiles('daterangepicker.js', ["client"]);
+ api.addFiles('daterangepicker.css', ["client"]);
+});
diff --git a/public/bower_components/bootstrap-daterangepicker/package.json b/public/bower_components/bootstrap-daterangepicker/package.json
new file mode 100644
index 0000000..552bac6
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "bootstrap-daterangepicker",
+ "version": "2.1.27",
+ "description": "Date range picker component for Bootstrap",
+ "main": "daterangepicker.js",
+ "style": "daterangepicker.css",
+ "scripts": {
+ "scss": "node-sass daterangepicker.scss > daterangepicker.css",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dangrossman/bootstrap-daterangepicker.git"
+ },
+ "author": {
+ "name": "Dan Grossman",
+ "email": "dan@dangrossman.info",
+ "url": "http://www.dangrossman.info"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/dangrossman/bootstrap-daterangepicker/issues"
+ },
+ "homepage": "https://github.com/dangrossman/bootstrap-daterangepicker",
+ "dependencies": {
+ "jquery": ">=1.10",
+ "moment": "^2.9.0"
+ },
+ "devDependencies": {
+ "node-sass": "^3.4.2"
+ }
+}
diff --git a/public/bower_components/bootstrap-daterangepicker/website/index.html b/public/bower_components/bootstrap-daterangepicker/website/index.html
new file mode 100644
index 0000000..fb9c66c
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/website/index.html
@@ -0,0 +1,836 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Date Range Picker for Bootstrap</title>
+ <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
+ <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
+ <script src="moment.min.js"></script>
+
+ <script src="daterangepicker.js"></script>
+ <link rel="stylesheet" type="text/css" href="daterangepicker.css" />
+
+ <script src="website.js"></script>
+ <link rel="stylesheet" type="text/css" href="website.css" />
+
+ <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+ <![endif]-->
+
+ <meta name="google-site-verification" content="1fP-Eo9i1ozV4MUlqZv2vsLv1r7tvYutUb6i38v0_vg" />
+ </head>
+ <body>
+
+ <nav class="navbar navbar-inverse navbar-static-top">
+ <div class="container">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="http://www.daterangepicker.com" rel="nofollow" style="background: #eee; color: #000">
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-calendar fa-stack-1x fa-inverse" style="color: #eee"></i>
+ </span>
+ Date Range Picker
+ </a>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="https://www.improvely.com" rel="nofollow" style="background: #00caff">
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-signal fa-stack-1x fa-inverse" style="color: #00caff"></i>
+ </span>
+ Improvely
+ </a>
+ </li>
+ <li>
+ <a href="https://www.w3counter.com" rel="nofollow" style="background: #009fe8">
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-pie-chart fa-stack-1x fa-inverse" style="color: #009fe8"></i>
+ </span>
+ W3Counter
+ </a>
+ </li>
+ <li>
+ <a href="http://www.websitegoodies.com" rel="nofollow" style="background: #06c">
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-wrench fa-stack-1x fa-inverse" style="color: #06c"></i>
+ </span>
+ Website Goodies
+ </a>
+ </li>
+ </ul>
+ </div>
+ </nav>
+
+ <div id="jumbo">
+ <div class="container">
+ <div class="row">
+ <div class="col-md-6">
+
+ <h1 style="margin: 0 0 20px 0">Date Range Picker</h1>
+ <p style="font-size: 18px; margin-bottom: 0">
+ A JavaScript component for choosing date ranges.
+ <br />
+ Designed to work with the Bootstrap CSS framework.
+ </p>
+
+ </div>
+ <div class="col-md-6" style="text-align: right; padding-right: 0">
+
+ <a href="https://github.com/dangrossman/bootstrap-daterangepicker" class="btn btn-lg btn-default">View on GitHub</a>
+
+ &nbsp;
+
+ <a href="https://github.com/dangrossman/bootstrap-daterangepicker/archive/master.zip" class="btn btn-lg btn-success">Download ZIP</a>
+
+ <br /><br />
+
+ <iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
+
+ <iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=watch&count=true&size=large&v=2" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
+
+ <iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="container main">
+ <div class="row">
+
+ <div id="nav-spy">
+
+ <div id="sidebar">
+ <ul class="nav nav-pills nav-stacked">
+ <li><a href="#usage">Usage</a></li>
+ <li>
+ <a href="#examples">Examples</a>
+ <ul class="nav nav-pills nav-stacked" style="margin: 0 0 0 15px; padding: 0; font-size: 13px">
+ <li><a href="#ex1">Date Range Picker</a></li>
+ <li><a href="#ex2">Date and Time</a></li>
+ <li><a href="#ex3">Single Date Picker</a></li>
+ <li><a href="#ex4">Predefined Ranges</a></li>
+ <li><a href="#ex5">Input Initially Empty</a></li>
+ </ul>
+ </li>
+ <li><a href="#config">Configuration Generator</a></li>
+ <li><a href="#options">Options, Methods &amp; Events</a></li>
+ <li><a href="#license">License</a></li>
+ </ul>
+
+ <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+ <!-- DRP Responsive -->
+ <ins class="adsbygoogle"
+ style="display:block"
+ data-ad-client="ca-pub-9095657276960731"
+ data-ad-slot="8963174596"
+ data-ad-format="auto"></ins>
+ <script>
+ (adsbygoogle = window.adsbygoogle || []).push({});
+ </script>
+ </div>
+
+ </div>
+
+ <div id="rightcol">
+
+ <div id="overview" name="overview">
+
+ <p>
+ Originally built for reporting at <a href="https://www.improvely.com">Improvely</a>,
+ the Date Range Picker can be attached to any webpage element to pop up two calendars
+ for selecting dates, times, or from predefined ranges like "Last 30 Days".
+ </p>
+
+ <a style="display: block; height: 300px; background: url('drp.png') top right no-repeat; background-size: cover; border: 1px solid #ccc; margin-bottom: 20px" href="https://awio.iljmp.com/5/drpdemo" title="Click for a Live Demo"></a>
+
+ </div>
+
+ <div id="usage" name="usage">
+
+ <h2>Usage</h2>
+
+ <p>
+ Date Range Picker relies on <a href="http://getbootstrap.com/">Bootstrap</a>, <a href="http://www.jquery.com/">jQuery</a> and <a href="http://momentjs.com/">Moment.js</a>.
+
+ Include the required scripts and stylesheet in your page:
+ </p>
+
+ <script src="https://gist.github.com/dangrossman/fc0ec04cf073f0834c97.js"></script>
+
+ <p>Then attach the picker to the element you want to trigger it:</p>
+
+ <script src="https://gist.github.com/dangrossman/c4cc05fff6fe86cdca05.js"></script>
+
+ <hr />
+
+ <p>
+ You can customize Date Range Picker with <a href="#options">options</a>, and
+ get notified when the user chooses new dates by providing a callback function.
+ </p>
+
+ <script src="https://gist.github.com/dangrossman/90b0b82275c81ac5904a.js"></script>
+
+ </div>
+
+ <div id="examples" name="examples">
+
+ <h2>Examples</h2>
+
+ <div id="ex1" name="ex1">
+
+ <h3>Date Range Picker</h3>
+
+ <p>
+ The Date Range Picker is attached to a text input. It will use the current
+ value of the input to initialize, and update the input if new dates are chosen.
+ </p>
+
+ <div class="row">
+ <div class="col-md-8 col-xs-12">
+ <script src="https://gist.github.com/dangrossman/8e97e05e68cb683c4d71.js"></script>
+ </div>
+ <div class="col-md-4 col-xs-12">
+ <h4>Demo:</h4>
+ <input class="pull-right" type="text" name="daterange" value="01/15/2017 - 02/15/2017" />
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+ $('input[name="daterange"]').daterangepicker();
+ });
+ </script>
+
+ </div>
+
+ <div id="ex2" name="ex2">
+
+ <h3>Date and Time</h3>
+
+ <p>
+ The Date Range Picker can also be used to select times. Hour, minute and (optional)
+ second dropdowns are added below the calendars. An option exists to set the increment
+ count of the minutes dropdown to e.g. offer only 15-minute or 30-minute increments.
+ </p>
+
+ <div class="row">
+ <div class="col-md-7 col-xs-12">
+ <script src="https://gist.github.com/dangrossman/89a40223f5a8a892fbf1.js"></script>
+ </div>
+ <div class="col-md-5 col-xs-12">
+ <h4>Demo:</h4>
+ <input class="pull-right" type="text" name="daterange2" value="01/01/2017 1:30 PM - 01/01/2017 2:00 PM" />
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+ $('input[name="daterange2"]').daterangepicker({
+ timePicker: true,
+ timePickerIncrement: 30,
+ locale: {
+ format: 'MM/DD/YYYY h:mm A'
+ }
+ });
+ });
+ </script>
+
+ </div>
+
+ <div id="ex3" name="ex3">
+
+ <h3>Single Date Picker</h3>
+
+ <p>
+ The Date Range Picker can be turned into a single date picker widget with only
+ one calendar. In this example, dropdowns to select a month and year have also
+ been enabled at the top of the calendar to quickly jump to different months.
+ </p>
+
+ <div class="row">
+ <div class="col-md-9 col-xs-12">
+ <script src="https://gist.github.com/dangrossman/df41977acae070b3feb2.js"></script>
+ </div>
+ <div class="col-md-3 col-xs-12">
+ <h4>Demo:</h4>
+ <input class="pull-right" type="text" name="birthdate" value="10/24/1984" />
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+ $('input[name="birthdate"]').daterangepicker({
+ singleDatePicker: true,
+ showDropdowns: true
+ },
+ function(start, end, label) {
+ var years = moment().diff(start, 'years');
+ alert("You are " + years + " years old.");
+ });
+ });
+ </script>
+
+ </div>
+
+ <div id="ex4" name="ex4">
+
+ <h3>Predefined Ranges</h3>
+
+ <p>
+ This example shows the option to predefine date ranges that
+ the user can choose from a list.
+ </p>
+
+ <div class="row">
+ <div class="col-md-8 col-xs-12">
+ <script src="https://gist.github.com/dangrossman/bd8cf6efbba1c2123adc.js"></script>
+ </div>
+ <div class="col-md-4 col-xs-12">
+ <h4>Demo:</h4>
+ <div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
+ <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>&nbsp;
+ <span></span> <b class="caret"></b>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+
+ var start = moment().subtract(29, 'days');
+ var end = moment();
+
+ function cb(start, end) {
+ $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
+ }
+
+ $('#reportrange').daterangepicker({
+ startDate: start,
+ endDate: end,
+ ranges: {
+ 'Today': [moment(), moment()],
+ 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+ }
+ }, cb);
+
+ cb(start, end);
+
+ });
+ </script>
+
+ </div>
+
+ <div id="ex5" name="ex5">
+
+ <h3>Input Initially Empty</h3>
+
+ <p>
+ If you're using a date range as a filter, you may want to attach a picker to an
+ input but leave it empty by default. This example shows how to accomplish that
+ using the <code>autoUpdateInput</code> setting, and the <code>apply</code> and
+ <code>cancel</code> events.
+ </p>
+
+ <div class="row">
+ <div class="col-md-9 col-xs-12">
+ <script src="https://gist.github.com/dangrossman/de22909c4d24f3f3508c.js"></script>
+ </div>
+ <div class="col-md-3 col-xs-12">
+ <h4>Demo:</h4>
+ <input class="pull-right" type="text" name="datefilter" value="" />
+ </div>
+ </div>
+
+
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+
+ $('input[name="datefilter"]').daterangepicker({
+ autoUpdateInput: false,
+ locale: {
+ cancelLabel: 'Clear'
+ }
+ });
+
+ $('input[name="datefilter"]').on('apply.daterangepicker', function(ev, picker) {
+ $(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
+ });
+
+ $('input[name="datefilter"]').on('cancel.daterangepicker', function(ev, picker) {
+ $(this).val('');
+ });
+
+ });
+ </script>
+
+ </div>
+
+
+
+ <div id="config" name="config">
+
+ <h2>Configuration Generator</h2>
+
+ <div class="well configurator">
+
+ <form>
+ <div class="row">
+
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="parentEl">parentEl</label>
+ <input type="text" class="form-control" id="parentEl" value="" placeholder="body">
+ </div>
+
+ <div class="form-group">
+ <label for="startDate">startDate</label>
+ <input type="text" class="form-control" id="startDate" value="07/01/2017">
+ </div>
+
+ <div class="form-group">
+ <label for="endDate">endDate</label>
+ <input type="text" class="form-control" id="endDate" value="07/15/2017">
+ </div>
+
+ <div class="form-group">
+ <label for="minDate">minDate</label>
+ <input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ <div class="form-group">
+ <label for="maxDate">maxDate</label>
+ <input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
+ </div>
+
+ <div class="form-group">
+ <label for="opens">opens</label>
+ <select id="opens" class="form-control">
+ <option value="right" selected>right</option>
+ <option value="left">left</option>
+ <option value="center">center</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="drops">drops</label>
+ <select id="drops" class="form-control">
+ <option value="down" selected>down</option>
+ <option value="up">up</option>
+ </select>
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showDropdowns"> showDropdowns
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showWeekNumbers"> showWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="singleDatePicker"> singleDatePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker"> timePicker
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePicker24Hour"> timePicker24Hour
+ </label>
+ </div>
+
+ <div class="form-group">
+ <label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
+ <input type="text" class="form-control" id="timePickerIncrement" value="1">
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="timePickerSeconds"> timePickerSeconds
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="dateLimit"> dateLimit (with example date range span)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="locale"> locale (with example settings)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoApply"> autoApply
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
+ </label>
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <div class="form-group">
+ <label for="buttonClasses">buttonClasses</label>
+ <input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
+ </div>
+
+ <div class="form-group">
+ <label for="applyClass">applyClass</label>
+ <input type="text" class="form-control" id="applyClass" value="btn-success">
+ </div>
+
+ <div class="form-group">
+ <label for="cancelClass">cancelClass</label>
+ <input type="text" class="form-control" id="cancelClass" value="btn-default">
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="ranges"> ranges (with example predefined ranges)
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="showCustomRangeLabel" checked="checked"> showCustomRangeLabel
+ </label>
+ </div>
+
+ </div>
+
+ </div>
+ </form>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col-md-4 col-md-offset-2 demo">
+ <h4>Your Date Range Picker</h4>
+ <input type="text" id="config-demo" class="form-control">
+ <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
+ </div>
+
+ <div class="col-md-6">
+ <h4>Configuration</h4>
+
+ <div class="well">
+ <textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="options" name="options">
+
+ <h2>Options</h2>
+
+ <ul class="nobullets">
+ <li>
+ <code>startDate</code> (Date object, moment object or string) The start of the initially selected date range
+ </li>
+ <li>
+ <code>endDate</code>: (Date object, moment object or string) The end of the initially selected date range
+ </li>
+ <li>
+ <code>minDate</code>: (Date object, moment object or string) The earliest date a user may select
+ </li>
+ <li>
+ <code>maxDate</code>: (Date object, moment object or string) The latest date a user may select
+ </li>
+ <li>
+ <code>dateLimit</code>: (object) The maximum span between the selected start and end dates. Can have any property you can add to a moment object (i.e. days, months)
+ </li>
+ <li>
+ <code>showDropdowns</code>: (boolean) Show year and month select boxes above calendars to jump to a specific month and year
+ </li>
+ <li>
+ <code>showWeekNumbers</code>: (boolean) Show localized week numbers at the start of each week on the calendars
+ </li>
+ <li>
+ <code>showISOWeekNumbers</code>: (boolean) Show ISO week numbers at the start of each week on the calendars
+ </li>
+ <li>
+ <code>timePicker</code>: (boolean) Allow selection of dates with times, not just dates
+ </li>
+ <li>
+ <code>timePickerIncrement</code>: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30)
+ </li>
+ <li>
+ <code>timePicker24Hour</code>: (boolean) Use 24-hour instead of 12-hour times, removing the AM/PM selection
+ </li>
+ <li>
+ <code>timePickerSeconds</code>: (boolean) Show seconds in the timePicker
+ </li>
+ <li>
+ <code>ranges</code>: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range
+ </li>
+ <li>
+ <code>showCustomRangeLabel</code>: (boolean) Displays an item labeled "Custom Range" at
+ the end of the list of predefined ranges, when the <code>ranges</code> option is used.
+ This option will be highlighted whenever the current date range selection does not match
+ one of the predefined ranges. Clicking it will display the calendars to select a new range.
+ </li>
+ <li>
+ <code>alwaysShowCalendars</code>: (boolean) Normally, if you use the <code>ranges</code>
+ option to specify pre-defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range". When this option is set to true, the calendars for choosing a custom date range are always shown instead.
+ </li>
+ <li>
+ <code>opens</code>: (string</code>: 'left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to
+ </li>
+ <li>
+ <code>drops</code>: (string</code>: 'down' or 'up') Whether the picker appears below (default) or above the HTML element it's attached to
+ </li>
+ <li>
+ <code>buttonClasses</code>: (array) CSS class names that will be added to all buttons in the picker
+ </li>
+ <li>
+ <code>applyClass</code>: (string) CSS class string that will be added to the apply button
+ </li>
+ <li>
+ <code>cancelClass</code>: (string) CSS class string that will be added to the cancel button
+ </li>
+ <li>
+ <code>locale</code>: (object) Allows you to provide localized strings for buttons and labels, customize the date format, and change the first day of week for the calendars.
+ Check off "locale (with example settings)" in the configuration generator to see how
+ to customize these options.
+ </li>
+ <li>
+ <code>singleDatePicker</code>: (boolean) Show only a single calendar to choose one date, instead of a range picker with two calendars; the start and end dates provided to your callback will be the same single date chosen
+ </li>
+ <li>
+ <code>autoApply</code>: (boolean) Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates or a predefined range is selected
+ </li>
+ <li>
+ <code>linkedCalendars</code>: (boolean) When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars. When disabled, the two calendars can be individually advanced and display any month/year.
+ </li>
+ <li>
+ <code>isInvalidDate</code>: (function) A function that is passed each date in the two
+ calendars before they are displayed, and may return true or false to indicate whether
+ that date should be available for selection or not.
+ </li>
+ <li>
+ <code>isCustomDate</code>: (function) A function that is passed each date in the two
+ calendars before they are displayed, and may return a string or array of CSS class names
+ to apply to that date's calendar cell.
+ </li>
+ <li>
+ <code>autoUpdateInput</code>: (boolean) Indicates whether the date range picker should
+ automatically update the value of an <code>&lt;input&gt;</code> element it's attached to
+ at initialization and when the selected dates change.
+ </li>
+ <li>
+ <code>parentEl</code>: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body'
+ </li>
+ </ul>
+
+ </div>
+
+ <div id="methods" name="methods">
+
+ <h2>Methods</h2>
+
+ <p>
+ You can programmatically update the <code>startDate</code> and <code>endDate</code>
+ in the picker using the <code>setStartDate</code> and <code>setEndDate</code> methods.
+ You can access the Date Range Picker object and its functions and properties through
+ data properties of the element you attached it to.
+ </p>
+
+ <script src="https://gist.github.com/dangrossman/8ff9b1220c9b5682e8bd.js"></script>
+
+ <br />
+
+ <ul class="nobullets">
+ <li>
+ <code>setStartDate(Date/moment/string)</code>: Sets the date range picker's currently selected start date to the provided date
+ </li>
+ <li>
+ <code>setEndDate(Date/moment/string)</code>: Sets the date range picker's currently selected end date to the provided date
+ </li>
+ </ul>
+
+ <p style="margin: 0"><b>Example usage:</b></p>
+
+ <script src="https://gist.github.com/dangrossman/e1a8effbaeacb50a1e31.js"></script>
+
+ </div>
+
+ <div id="events" name="events">
+
+ <h2>Events</h2>
+
+ <p>
+ Several events are triggered on the element you attach the picker to, which you can listen for.
+ </p>
+
+ <ul class="nobullets">
+ <li>
+ <code>show.daterangepicker</code>: Triggered when the picker is shown
+ </li>
+ <li>
+ <code>hide.daterangepicker</code>: Triggered when the picker is hidden
+ </li>
+ <li>
+ <code>showCalendar.daterangepicker</code>: Triggered when the calendar(s) are shown
+ </li>
+ <li>
+ <code>hideCalendar.daterangepicker</code>: Triggered when the calendar(s) are hidden
+ </li>
+ <li>
+ <code>apply.daterangepicker</code>: Triggered when the apply button is clicked,
+ or when a predefined range is clicked
+ </li>
+ <li>
+ <code>cancel.daterangepicker</code>: Triggered when the cancel button is clicked
+ </li>
+ </ul>
+
+ <p>
+ Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event:
+ </p>
+
+ <script src="https://gist.github.com/dangrossman/1bea78da703f2896564d.js"></script>
+
+ <br />
+
+ <p>
+ While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed:
+ </p>
+
+ <script src="https://gist.github.com/dangrossman/0c6c911fea1459b5fd13.js"></script>
+
+ </div>
+
+ <div id="license" name="license">
+
+ <h2>License</h2>
+
+ <p>The MIT License (MIT)</p>
+
+ <p>Copyright (c) 2012-2017 <a href="http://www.dangrossman.info">Dan Grossman</a></p>
+
+ <p>
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ </p>
+
+ <p>
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ </p>
+
+ <p>
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ </p>
+
+ </div>
+
+ <div id="comments">
+
+ <h2>Comments</h2>
+
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_url = 'http://www.dangrossman.info/2012/08/20/a-date-range-picker-for-twitter-bootstrap/';
+ var disqus_identifier = '1045 http://www.dangrossman.info/?p=1045';
+ var disqus_container_id = 'disqus_thread';
+ var disqus_shortname = 'dangrossman';
+ var disqus_title = "A Date Range Picker for Bootstrap";
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+
+ <!-- Begin W3Counter Tracking Code -->
+ <script type="text/javascript" src="https://www.w3counter.com/tracker.js?id=90840"></script>
+ <!-- End W3Counter Tracking Code -->
+
+ <script type="text/javascript">
+ var im_domain = 'awio';
+ var im_project_id = 48;
+ (function(e,t){window._improvely=[];var n=e.getElementsByTagName("script")[0];var r=e.createElement("script");r.type="text/javascript";r.src="https://"+im_domain+".iljmp.com/improvely.js";r.async=true;n.parentNode.insertBefore(r,n);if(typeof t.init=="undefined"){t.init=function(e,t){window._improvely.push(["init",e,t])};t.goal=function(e){window._improvely.push(["goal",e])};t.conversion=function(e){window._improvely.push(["conversion",e])};t.label=function(e){window._improvely.push(["label",e])}}window.improvely=t;t.init(im_domain,im_project_id)})(document,window.improvely||[])
+ </script>
+
+ <script>
+ !function(e){window._wsg=7;var t=e.getElementsByTagName("script")[0],s=e.createElement("script");s.type="text/javascript",s.src="https://www.websitegoodies.com/js/widgets.js",t.parentNode.insertBefore(s,t)}(document);
+ </script>
+
+ <div id="footer">
+ Copyright &copy; 2012-2017 <a href="http://www.awio.com">Awio Web Services LLC</a>.
+ &nbsp;
+ Developed and maintained by <a href="http://www.dangrossman.info/">Dan Grossman</a>.
+ &nbsp;
+ </div>
+
+ </body>
+</html>
diff --git a/public/bower_components/bootstrap-daterangepicker/website/website.css b/public/bower_components/bootstrap-daterangepicker/website/website.css
new file mode 100644
index 0000000..74fbbda
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/website/website.css
@@ -0,0 +1,127 @@
+body {
+ font-size: 15px;
+ line-height: 1.6em;
+ position: relative;
+ margin: 0;
+}
+.container {
+ width: 95%;
+ max-width: 1260px;
+}
+p, pre {
+ margin-bottom: 2em;
+}
+.main h2 {
+ font-weight: bold;
+ margin: 60px 0 20px 0;
+}
+.main h3 {
+ margin: 60px 0 20px 0;
+}
+.main h4 {
+ margin: 0 0 10px 0;
+ font-weight: bold;
+}
+ul.nobullets {
+ margin: 0;
+ padding: 0;
+ list-style-position: inside;
+}
+li {
+ padding-bottom: 1em;
+}
+#sidebar {
+ top: 20px;
+ width: 300px;
+}
+#sidebar ul {
+ margin-bottom: 5px;
+}
+#sidebar li {
+ margin-bottom: 0;
+ padding-bottom: 0;
+}
+#sidebar li ul {
+ display: none;
+}
+#sidebar li.active ul {
+ display: block;
+}
+#sidebar li li {
+ padding: 4px 0;
+}
+input[type="text"] {
+ padding: 6px;
+ width: 100%;
+ border-radius: 4px;
+}
+.navbar {
+ text-align: left;
+ margin: 0;
+ border: 0;
+}
+.navbar-inverse {
+ background: #ccc;
+}
+.navbar .container {
+ padding: 0 20px;
+}
+.navbar-nav li a:link, .navbar-nav li a:visited {
+ font-weight: bold;
+ color: #fff;
+ font-size: 16px;
+}
+.navbar-nav li {
+ background: #fff;
+}
+.navbar-nav li a:hover {
+ opacity: 0.8;
+}
+.navbar-nav li {
+ padding: 0;
+}
+.navbar-inverse .navbar-text {
+ margin: 18px 0 0 0;
+ color: #eee;
+}
+#footer {
+ background: #222;
+ margin-top: 80px;
+ padding: 30px;
+ color: #fff;
+ text-align: center;
+}
+#footer a:link, #footer a:visited {
+ color: #fff;
+ border-bottom: 1px dotted #fff;
+}
+#jumbo {
+ background: #f5f5f5 linear-gradient(to bottom,#eee 0,#f5f5f5 100%);
+ color: #000;
+ padding: 30px 0;
+ margin-bottom: 30px;
+}
+#jumbo .btn {
+ border-radius: 0;
+}
+#config .demo { position: relative; }
+#config .demo i { position: absolute; bottom: 10px; right: 24px; top: auto; cursor: pointer; }
+
+#rightcol {
+ margin-left: 330px;
+}
+
+#nav-spy {
+ float: left;
+ width: 300px;
+}
+
+@media (max-width: 980px) {
+ #rightcol {
+ margin-left: 0;
+ }
+ #nav-spy {
+ float: none;
+ position: relative;
+ }
+}
diff --git a/public/bower_components/bootstrap-daterangepicker/website/website.js b/public/bower_components/bootstrap-daterangepicker/website/website.js
new file mode 100644
index 0000000..8ded2e9
--- /dev/null
+++ b/public/bower_components/bootstrap-daterangepicker/website/website.js
@@ -0,0 +1,146 @@
+$(document).ready(function() {
+
+ $('#config-text').keyup(function() {
+ eval($(this).val());
+ });
+
+ $('.configurator input, .configurator select').change(function() {
+ updateConfig();
+ });
+
+ $('.demo i').click(function() {
+ $(this).parent().find('input').click();
+ });
+
+ $('#startDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment().subtract(6, 'days')
+ });
+
+ $('#endDate').daterangepicker({
+ singleDatePicker: true,
+ startDate: moment()
+ });
+
+ updateConfig();
+
+ function updateConfig() {
+ var options = {};
+
+ if ($('#singleDatePicker').is(':checked'))
+ options.singleDatePicker = true;
+
+ if ($('#showDropdowns').is(':checked'))
+ options.showDropdowns = true;
+
+ if ($('#showWeekNumbers').is(':checked'))
+ options.showWeekNumbers = true;
+
+ if ($('#showISOWeekNumbers').is(':checked'))
+ options.showISOWeekNumbers = true;
+
+ if ($('#timePicker').is(':checked'))
+ options.timePicker = true;
+
+ if ($('#timePicker24Hour').is(':checked'))
+ options.timePicker24Hour = true;
+
+ if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
+ options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
+
+ if ($('#timePickerSeconds').is(':checked'))
+ options.timePickerSeconds = true;
+
+ if ($('#autoApply').is(':checked'))
+ options.autoApply = true;
+
+ if ($('#dateLimit').is(':checked'))
+ options.dateLimit = { days: 7 };
+
+ if ($('#ranges').is(':checked')) {
+ options.ranges = {
+ 'Today': [moment(), moment()],
+ 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+ };
+ }
+
+ if ($('#locale').is(':checked')) {
+ options.locale = {
+ format: 'MM/DD/YYYY',
+ separator: ' - ',
+ applyLabel: 'Apply',
+ cancelLabel: 'Cancel',
+ fromLabel: 'From',
+ toLabel: 'To',
+ customRangeLabel: 'Custom',
+ weekLabel: 'W',
+ daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
+ monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ firstDay: 1
+ };
+ }
+
+ if (!$('#linkedCalendars').is(':checked'))
+ options.linkedCalendars = false;
+
+ if (!$('#autoUpdateInput').is(':checked'))
+ options.autoUpdateInput = false;
+
+ if (!$('#showCustomRangeLabel').is(':checked'))
+ options.showCustomRangeLabel = false;
+
+ if ($('#alwaysShowCalendars').is(':checked'))
+ options.alwaysShowCalendars = true;
+
+ if ($('#parentEl').val().length)
+ options.parentEl = $('#parentEl').val();
+
+ if ($('#startDate').val().length)
+ options.startDate = $('#startDate').val();
+
+ if ($('#endDate').val().length)
+ options.endDate = $('#endDate').val();
+
+ if ($('#minDate').val().length)
+ options.minDate = $('#minDate').val();
+
+ if ($('#maxDate').val().length)
+ options.maxDate = $('#maxDate').val();
+
+ if ($('#opens').val().length && $('#opens').val() != 'right')
+ options.opens = $('#opens').val();
+
+ if ($('#drops').val().length && $('#drops').val() != 'down')
+ options.drops = $('#drops').val();
+
+ if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
+ options.buttonClasses = $('#buttonClasses').val();
+
+ if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success')
+ options.applyClass = $('#applyClass').val();
+
+ if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default')
+ options.cancelClass = $('#cancelClass').val();
+
+ $('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');\n});");
+
+ $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
+
+ }
+
+ if ($(window).width() > 980) {
+ $('#sidebar').affix({
+ offset: {
+ top: 300,
+ bottom: function () {
+ return (this.bottom = $('.footer').outerHeight(true))
+ }
+ }
+ });
+ }
+ $('body').scrollspy({ target: '#nav-spy', offset: 20 });
+});