├── drp.png ├── .gitignore ├── example ├── browserify │ ├── README.md │ ├── main.js │ └── index.html └── amd │ ├── main.js │ ├── index.html │ └── require.js ├── bower.json ├── package.js ├── package.json ├── README.md ├── website ├── website.css ├── website.js └── index.html ├── daterangepicker.css ├── demo.html ├── daterangepicker.scss └── moment.min.js /drp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/bootstrap-daterangepicker/master/drp.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | node_modules 3 | npm-debug.log 4 | *.sublime-workspace 5 | *.sublime-project 6 | *.sw[onp] 7 | -------------------------------------------------------------------------------- /example/browserify/README.md: -------------------------------------------------------------------------------- 1 | # Browserify example 2 | 3 | Two steps need to be done for this to work 4 | 5 | In the project root 6 | 7 | npm install 8 | 9 | In this folder 10 | 11 | ../../node_modules/.bin/browserify main.js -o bundle.js 12 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-daterangepicker", 3 | "main": [ 4 | "daterangepicker.js", 5 | "daterangepicker.css" 6 | ], 7 | "ignore": [ 8 | "**/.*", 9 | "node_modules", 10 | "bower_components", 11 | "test", 12 | "tests", 13 | "moment.js", 14 | "moment.min.js" 15 | ], 16 | "dependencies": { 17 | "jquery": "1.9.1 - 3", 18 | "moment": ">=2.9.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | name: 'dangrossman:bootstrap-daterangepicker', 3 | version: '2.1.24', 4 | summary: 'Date range picker component for Bootstrap', 5 | git: 'https://github.com/dangrossman/bootstrap-daterangepicker', 6 | documentation: 'README.md' 7 | }); 8 | 9 | Package.onUse(function(api) { 10 | api.versionsFrom('METEOR@0.9.0.1'); 11 | 12 | api.use('twbs:bootstrap@3.3.4', ["client"], {weak: true}); 13 | api.use('momentjs:moment@2.10.3', ["client"]); 14 | api.use('jquery@1.11.3_2', ["client"]); 15 | 16 | api.addFiles('daterangepicker.js', ["client"]); 17 | api.addFiles('daterangepicker.css', ["client"]); 18 | }); 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-daterangepicker", 3 | "version": "2.1.24", 4 | "description": "Date range picker component for Bootstrap", 5 | "main": "daterangepicker.js", 6 | "style": "daterangepicker.css", 7 | "scripts": { 8 | "scss": "node-sass daterangepicker.scss > daterangepicker.css", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/dangrossman/bootstrap-daterangepicker.git" 14 | }, 15 | "author": { 16 | "name": "Dan Grossman", 17 | "email": "dan@dangrossman.info", 18 | "url": "http://www.dangrossman.info" 19 | }, 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/dangrossman/bootstrap-daterangepicker/issues" 23 | }, 24 | "homepage": "https://github.com/dangrossman/bootstrap-daterangepicker", 25 | "dependencies": { 26 | "jquery": ">=1.10", 27 | "moment": "^2.9.0" 28 | }, 29 | "devDependencies": { 30 | "node-sass": "^3.4.2" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Date Range Picker for Bootstrap 2 | 3 | ![Improvely.com](http://i.imgur.com/LbAMf3D.png) 4 | 5 | This date range picker component for Bootstrap creates a dropdown menu from which a user can 6 | select a range of dates. I created it while building the UI for [Improvely](http://www.improvely.com), 7 | which needed a way to select date ranges for reports. 8 | 9 | Features include limiting the selectable date range, localizable strings and date formats, 10 | a single date picker mode, optional time picker (for e.g. making appointments or reservations), 11 | and styles that match the default Bootstrap 3 theme. 12 | 13 | ## [Documentation and Live Usage Examples](http://www.daterangepicker.com) 14 | 15 | ## [See It In a Live Application](https://awio.iljmp.com/5/drpdemogh) 16 | 17 | ## License 18 | 19 | This code is made available under the same license as Bootstrap. Moment.js is included in this repository 20 | for convenience. It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php). 21 | 22 | -- 23 | 24 | The MIT License (MIT) 25 | 26 | Copyright (c) 2012-2016 Dan Grossman 27 | 28 | Permission is hereby granted, free of charge, to any person obtaining a copy 29 | of this software and associated documentation files (the "Software"), to deal 30 | in the Software without restriction, including without limitation the rights 31 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 32 | copies of the Software, and to permit persons to whom the Software is 33 | furnished to do so, subject to the following conditions: 34 | 35 | The above copyright notice and this permission notice shall be included in 36 | all copies or substantial portions of the Software. 37 | 38 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 39 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 40 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 41 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 42 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 43 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 44 | THE SOFTWARE. 45 | -------------------------------------------------------------------------------- /website/website.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 15px; 3 | line-height: 1.6em; 4 | position: relative; 5 | margin: 0; 6 | } 7 | .container { 8 | width: 95%; 9 | max-width: 1260px; 10 | } 11 | p, pre { 12 | margin-bottom: 2em; 13 | } 14 | .main h2 { 15 | font-weight: bold; 16 | margin: 60px 0 20px 0; 17 | } 18 | .main h3 { 19 | margin: 60px 0 20px 0; 20 | } 21 | .main h4 { 22 | margin: 0 0 10px 0; 23 | font-weight: bold; 24 | } 25 | ul.nobullets { 26 | margin: 0; 27 | padding: 0; 28 | list-style-position: inside; 29 | } 30 | li { 31 | padding-bottom: 1em; 32 | } 33 | #sidebar { 34 | top: 20px; 35 | width: 300px; 36 | } 37 | #sidebar ul { 38 | margin-bottom: 5px; 39 | } 40 | #sidebar li { 41 | margin-bottom: 0; 42 | padding-bottom: 0; 43 | } 44 | #sidebar li ul { 45 | display: none; 46 | } 47 | #sidebar li.active ul { 48 | display: block; 49 | } 50 | #sidebar li li { 51 | padding: 4px 0; 52 | } 53 | input[type="text"] { 54 | padding: 6px; 55 | width: 100%; 56 | border-radius: 4px; 57 | } 58 | .navbar { 59 | text-align: left; 60 | margin: 0; 61 | border: 0; 62 | } 63 | .navbar-inverse { 64 | background: #222; 65 | } 66 | .navbar .container { 67 | padding: 0 20px; 68 | } 69 | .navbar-nav li a:link, .navbar-nav li a:visited { 70 | font-weight: bold; 71 | color: #fff; 72 | font-size: 16px; 73 | } 74 | .navbar-nav li { 75 | background: #fff; 76 | } 77 | .navbar-nav li a:hover { 78 | opacity: 0.8; 79 | } 80 | .navbar-nav li { 81 | padding: 0; 82 | } 83 | .navbar-inverse .navbar-text { 84 | margin: 18px 0 0 0; 85 | color: #eee; 86 | } 87 | #footer { 88 | background: #222; 89 | margin-top: 80px; 90 | padding: 30px; 91 | color: #fff; 92 | text-align: center; 93 | } 94 | #footer a:link, #footer a:visited { 95 | color: #fff; 96 | border-bottom: 1px dotted #fff; 97 | } 98 | #jumbo { 99 | background: #f5f5f5 linear-gradient(to bottom,#eee 0,#f5f5f5 100%); 100 | color: #000; 101 | padding: 30px 0; 102 | margin-bottom: 30px; 103 | } 104 | #jumbo .btn { 105 | border-radius: 0; 106 | } 107 | 108 | #config-text { 109 | height: 300px; 110 | width: 100%; 111 | padding: 10px; 112 | } 113 | .input-calendar { 114 | margin-left: 8px; 115 | } 116 | 117 | #rightcol { 118 | margin-left: 330px; 119 | } 120 | 121 | #nav-spy { 122 | float: left; 123 | width: 300px; 124 | } 125 | 126 | @media (max-width: 980px) { 127 | #rightcol { 128 | margin-left: 0; 129 | } 130 | #nav-spy { 131 | float: none; 132 | position: relative; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /example/browserify/main.js: -------------------------------------------------------------------------------- 1 | require('../../daterangepicker.js'); 2 | var $ = require('jquery'), 3 | moment = require('moment'); 4 | 5 | $(document).ready(function() { 6 | 7 | $('#config-text').keyup(function() { 8 | eval($(this).val()); 9 | }); 10 | 11 | $('.configurator input, .configurator select').change(function() { 12 | updateConfig(); 13 | }); 14 | 15 | $('.demo i').click(function() { 16 | $(this).parent().find('input').click(); 17 | }); 18 | 19 | $('#startDate').daterangepicker({ 20 | singleDatePicker: true, 21 | startDate: moment().subtract(6, 'days') 22 | }); 23 | 24 | $('#endDate').daterangepicker({ 25 | singleDatePicker: true, 26 | startDate: moment() 27 | }); 28 | 29 | updateConfig(); 30 | 31 | function updateConfig() { 32 | var options = {}; 33 | 34 | if ($('#singleDatePicker').is(':checked')) 35 | options.singleDatePicker = true; 36 | 37 | if ($('#showDropdowns').is(':checked')) 38 | options.showDropdowns = true; 39 | 40 | if ($('#showWeekNumbers').is(':checked')) 41 | options.showWeekNumbers = true; 42 | 43 | if ($('#showISOWeekNumbers').is(':checked')) 44 | options.showISOWeekNumbers = true; 45 | 46 | if ($('#timePicker').is(':checked')) 47 | options.timePicker = true; 48 | 49 | if ($('#timePicker24Hour').is(':checked')) 50 | options.timePicker24Hour = true; 51 | 52 | if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) 53 | options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); 54 | 55 | if ($('#timePickerSeconds').is(':checked')) 56 | options.timePickerSeconds = true; 57 | 58 | if ($('#autoApply').is(':checked')) 59 | options.autoApply = true; 60 | 61 | if ($('#dateLimit').is(':checked')) 62 | options.dateLimit = { days: 7 }; 63 | 64 | if ($('#ranges').is(':checked')) { 65 | options.ranges = { 66 | 'Today': [moment(), moment()], 67 | 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], 68 | 'Last 7 Days': [moment().subtract(6, 'days'), moment()], 69 | 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 70 | 'This Month': [moment().startOf('month'), moment().endOf('month')], 71 | 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] 72 | }; 73 | } 74 | 75 | if ($('#locale').is(':checked')) { 76 | options.locale = { 77 | format: 'MM/DD/YYYY HH:mm', 78 | separator: ' - ', 79 | applyLabel: 'Apply', 80 | cancelLabel: 'Cancel', 81 | fromLabel: 'From', 82 | toLabel: 'To', 83 | customRangeLabel: 'Custom', 84 | daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], 85 | monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 86 | firstDay: 1 87 | }; 88 | } 89 | 90 | if (!$('#linkedCalendars').is(':checked')) 91 | options.linkedCalendars = false; 92 | 93 | if (!$('#autoUpdateInput').is(':checked')) 94 | options.autoUpdateInput = false; 95 | 96 | if ($('#alwaysShowCalendars').is(':checked')) 97 | options.alwaysShowCalendars = true; 98 | 99 | if ($('#inline').is(':checked')) 100 | options.inline = true; 101 | 102 | if ($('#parentEl').val().length) 103 | options.parentEl = $('#parentEl').val(); 104 | 105 | if ($('#startDate').val().length) 106 | options.startDate = $('#startDate').val(); 107 | 108 | if ($('#endDate').val().length) 109 | options.endDate = $('#endDate').val(); 110 | 111 | if ($('#minDate').val().length) 112 | options.minDate = $('#minDate').val(); 113 | 114 | if ($('#maxDate').val().length) 115 | options.maxDate = $('#maxDate').val(); 116 | 117 | if ($('#opens').val().length && $('#opens').val() != 'right') 118 | options.opens = $('#opens').val(); 119 | 120 | if ($('#drops').val().length && $('#drops').val() != 'down') 121 | options.drops = $('#drops').val(); 122 | 123 | if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') 124 | options.buttonClasses = $('#buttonClasses').val(); 125 | 126 | if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success') 127 | options.applyClass = $('#applyClass').val(); 128 | 129 | if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default') 130 | options.cancelClass = $('#cancelClass').val(); 131 | 132 | $('#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});"); 133 | 134 | $('#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 + ')'); }); 135 | 136 | } 137 | 138 | }); 139 | -------------------------------------------------------------------------------- /example/amd/main.js: -------------------------------------------------------------------------------- 1 | requirejs.config({ 2 | "paths": { 3 | "jquery": "https://code.jquery.com/jquery-1.11.3.min", 4 | "moment": "../../moment", 5 | "daterangepicker": "../../daterangepicker" 6 | } 7 | }); 8 | 9 | requirejs(['jquery', 'moment', 'daterangepicker'] , function ($, moment) { 10 | $(document).ready(function() { 11 | 12 | $('#config-text').keyup(function() { 13 | eval($(this).val()); 14 | }); 15 | 16 | $('.configurator input, .configurator select').change(function() { 17 | updateConfig(); 18 | }); 19 | 20 | $('.demo i').click(function() { 21 | $(this).parent().find('input').click(); 22 | }); 23 | 24 | $('#startDate').daterangepicker({ 25 | singleDatePicker: true, 26 | startDate: moment().subtract(6, 'days') 27 | }); 28 | 29 | $('#endDate').daterangepicker({ 30 | singleDatePicker: true, 31 | startDate: moment() 32 | }); 33 | 34 | updateConfig(); 35 | 36 | function updateConfig() { 37 | var options = {}; 38 | 39 | if ($('#singleDatePicker').is(':checked')) 40 | options.singleDatePicker = true; 41 | 42 | if ($('#showDropdowns').is(':checked')) 43 | options.showDropdowns = true; 44 | 45 | if ($('#showWeekNumbers').is(':checked')) 46 | options.showWeekNumbers = true; 47 | 48 | if ($('#showISOWeekNumbers').is(':checked')) 49 | options.showISOWeekNumbers = true; 50 | 51 | if ($('#timePicker').is(':checked')) 52 | options.timePicker = true; 53 | 54 | if ($('#timePicker24Hour').is(':checked')) 55 | options.timePicker24Hour = true; 56 | 57 | if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) 58 | options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); 59 | 60 | if ($('#timePickerSeconds').is(':checked')) 61 | options.timePickerSeconds = true; 62 | 63 | if ($('#autoApply').is(':checked')) 64 | options.autoApply = true; 65 | 66 | if ($('#dateLimit').is(':checked')) 67 | options.dateLimit = { days: 7 }; 68 | 69 | if ($('#ranges').is(':checked')) { 70 | options.ranges = { 71 | 'Today': [moment(), moment()], 72 | 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], 73 | 'Last 7 Days': [moment().subtract(6, 'days'), moment()], 74 | 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 75 | 'This Month': [moment().startOf('month'), moment().endOf('month')], 76 | 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] 77 | }; 78 | } 79 | 80 | if ($('#locale').is(':checked')) { 81 | options.locale = { 82 | format: 'MM/DD/YYYY HH:mm', 83 | separator: ' - ', 84 | applyLabel: 'Apply', 85 | cancelLabel: 'Cancel', 86 | fromLabel: 'From', 87 | toLabel: 'To', 88 | customRangeLabel: 'Custom', 89 | daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], 90 | monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 91 | firstDay: 1 92 | }; 93 | } 94 | 95 | if (!$('#linkedCalendars').is(':checked')) 96 | options.linkedCalendars = false; 97 | 98 | if (!$('#autoUpdateInput').is(':checked')) 99 | options.autoUpdateInput = false; 100 | 101 | if ($('#alwaysShowCalendars').is(':checked')) 102 | options.alwaysShowCalendars = true; 103 | 104 | if ($('#inline').is(':checked')) 105 | options.inline = true; 106 | 107 | if ($('#parentEl').val().length) 108 | options.parentEl = $('#parentEl').val(); 109 | 110 | if ($('#startDate').val().length) 111 | options.startDate = $('#startDate').val(); 112 | 113 | if ($('#endDate').val().length) 114 | options.endDate = $('#endDate').val(); 115 | 116 | if ($('#minDate').val().length) 117 | options.minDate = $('#minDate').val(); 118 | 119 | if ($('#maxDate').val().length) 120 | options.maxDate = $('#maxDate').val(); 121 | 122 | if ($('#opens').val().length && $('#opens').val() != 'right') 123 | options.opens = $('#opens').val(); 124 | 125 | if ($('#drops').val().length && $('#drops').val() != 'down') 126 | options.drops = $('#drops').val(); 127 | 128 | if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') 129 | options.buttonClasses = $('#buttonClasses').val(); 130 | 131 | if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success') 132 | options.applyClass = $('#applyClass').val(); 133 | 134 | if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default') 135 | options.cancelClass = $('#cancelClass').val(); 136 | 137 | $('#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});"); 138 | 139 | $('#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 + ')'); }); 140 | 141 | } 142 | 143 | }); 144 | }); 145 | -------------------------------------------------------------------------------- /website/website.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | $('#config-text').keyup(function() { 4 | eval($(this).val()); 5 | }); 6 | 7 | $('.configurator input, .configurator select').change(function() { 8 | updateConfig(); 9 | }); 10 | 11 | $('.demo i').click(function() { 12 | $(this).parent().find('input').click(); 13 | }); 14 | 15 | $('#startDate').daterangepicker({ 16 | singleDatePicker: true, 17 | startDate: moment().subtract(6, 'days') 18 | }); 19 | 20 | $('#endDate').daterangepicker({ 21 | singleDatePicker: true, 22 | startDate: moment() 23 | }); 24 | 25 | updateConfig(); 26 | 27 | function updateConfig() { 28 | var options = {}; 29 | 30 | if ($('#singleDatePicker').is(':checked')) 31 | options.singleDatePicker = true; 32 | 33 | if ($('#showDropdowns').is(':checked')) 34 | options.showDropdowns = true; 35 | 36 | if ($('#showWeekNumbers').is(':checked')) 37 | options.showWeekNumbers = true; 38 | 39 | if ($('#showISOWeekNumbers').is(':checked')) 40 | options.showISOWeekNumbers = true; 41 | 42 | if ($('#timePicker').is(':checked')) 43 | options.timePicker = true; 44 | 45 | if ($('#timePicker24Hour').is(':checked')) 46 | options.timePicker24Hour = true; 47 | 48 | if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) 49 | options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); 50 | 51 | if ($('#timePickerSeconds').is(':checked')) 52 | options.timePickerSeconds = true; 53 | 54 | if ($('#autoApply').is(':checked')) 55 | options.autoApply = true; 56 | 57 | if ($('#dateLimit').is(':checked')) 58 | options.dateLimit = { days: 7 }; 59 | 60 | if ($('#ranges').is(':checked')) { 61 | options.ranges = { 62 | 'Today': [moment(), moment()], 63 | 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], 64 | 'Last 7 Days': [moment().subtract(6, 'days'), moment()], 65 | 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 66 | 'This Month': [moment().startOf('month'), moment().endOf('month')], 67 | 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] 68 | }; 69 | } 70 | 71 | if ($('#locale').is(':checked')) { 72 | options.locale = { 73 | format: 'MM/DD/YYYY', 74 | separator: ' - ', 75 | applyLabel: 'Apply', 76 | cancelLabel: 'Cancel', 77 | fromLabel: 'From', 78 | toLabel: 'To', 79 | customRangeLabel: 'Custom', 80 | weekLabel: 'W', 81 | daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], 82 | monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 83 | firstDay: 1 84 | }; 85 | } 86 | 87 | if (!$('#linkedCalendars').is(':checked')) 88 | options.linkedCalendars = false; 89 | 90 | if (!$('#autoUpdateInput').is(':checked')) 91 | options.autoUpdateInput = false; 92 | 93 | if (!$('#showCustomRangeLabel').is(':checked')) 94 | options.showCustomRangeLabel = false; 95 | 96 | if ($('#alwaysShowCalendars').is(':checked')) 97 | options.alwaysShowCalendars = true; 98 | 99 | if ($('#inline').is(':checked')) 100 | options.inline = true; 101 | 102 | if ($('#parentEl').val().length) 103 | options.parentEl = $('#parentEl').val(); 104 | 105 | if ($('#startDate').val().length) 106 | options.startDate = $('#startDate').val(); 107 | 108 | if ($('#endDate').val().length) 109 | options.endDate = $('#endDate').val(); 110 | 111 | if ($('#minDate').val().length) 112 | options.minDate = $('#minDate').val(); 113 | 114 | if ($('#maxDate').val().length) 115 | options.maxDate = $('#maxDate').val(); 116 | 117 | if ($('#opens').val().length && $('#opens').val() != 'right') 118 | options.opens = $('#opens').val(); 119 | 120 | if ($('#drops').val().length && $('#drops').val() != 'down') 121 | options.drops = $('#drops').val(); 122 | 123 | if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') 124 | options.buttonClasses = $('#buttonClasses').val(); 125 | 126 | if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success') 127 | options.applyClass = $('#applyClass').val(); 128 | 129 | if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default') 130 | options.cancelClass = $('#cancelClass').val(); 131 | 132 | $('#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});"); 133 | 134 | $('#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 + ')'); }); 135 | 136 | } 137 | 138 | if ($(window).width() > 980) { 139 | $('#sidebar').affix({ 140 | offset: { 141 | top: 300, 142 | bottom: function () { 143 | return (this.bottom = $('.footer').outerHeight(true)) 144 | } 145 | } 146 | }); 147 | } 148 | $('body').scrollspy({ target: '#nav-spy', offset: 20 }); 149 | }); 150 | -------------------------------------------------------------------------------- /example/browserify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | A date range picker for Bootstrap 6 | 7 | 8 | 12 | 13 | 14 | 15 |
16 | 17 |

Configuration Builder

18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 | 26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 |
35 | 36 |
37 | 38 | 39 |
40 | 41 |
42 | 43 | 44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 |
52 |
53 | 54 |
55 | 58 |
59 | 60 |
61 | 64 |
65 | 66 |
67 | 70 |
71 | 72 |
73 | 76 |
77 | 78 |
79 | 82 |
83 | 84 |
85 | 88 |
89 | 90 |
91 | 94 |
95 | 96 |
97 | 98 | 99 |
100 | 101 |
102 | 105 |
106 | 107 |
108 | 111 |
112 | 113 |
114 | 117 |
118 | 119 |
120 | 123 |
124 | 125 |
126 | 129 |
130 | 131 |
132 | 135 |
136 | 137 |
138 | 141 |
142 | 143 |
144 | 147 |
148 | 149 |
150 |
151 | 152 |
153 | 154 | 159 |
160 | 161 |
162 | 163 | 167 |
168 | 169 |
170 | 171 | 172 |
173 | 174 |
175 | 176 | 177 |
178 | 179 |
180 | 181 | 182 |
183 | 184 |
185 | 186 |
187 |
188 | 189 |
190 | 191 |
192 | 193 |
194 |

Your Date Range Picker

195 | 196 | 197 |
198 | 199 |
200 |

Configuration

201 | 202 |
203 | 204 |
205 |
206 | 207 |
208 | 209 |
210 | 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /example/amd/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | A date range picker for Bootstrap 6 | 7 | 8 | 12 | 13 | 14 | 15 |
16 | 17 |

Configuration Builder

18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 | 26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 |
35 | 36 |
37 | 38 | 39 |
40 | 41 |
42 | 43 | 44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 |
52 |
53 | 54 |
55 | 58 |
59 | 60 |
61 | 64 |
65 | 66 |
67 | 70 |
71 | 72 |
73 | 76 |
77 | 78 |
79 | 82 |
83 | 84 |
85 | 88 |
89 | 90 |
91 | 94 |
95 | 96 |
97 | 98 | 99 |
100 | 101 |
102 | 105 |
106 | 107 |
108 | 111 |
112 | 113 |
114 | 117 |
118 | 119 |
120 | 123 |
124 | 125 |
126 | 129 |
130 | 131 |
132 | 135 |
136 | 137 |
138 | 141 |
142 | 143 |
144 | 147 |
148 | 149 |
150 |
151 | 152 |
153 | 154 | 159 |
160 | 161 |
162 | 163 | 167 |
168 | 169 |
170 | 171 | 172 |
173 | 174 |
175 | 176 | 177 |
178 | 179 |
180 | 181 | 182 |
183 | 184 |
185 | 186 |
187 |
188 | 189 |
190 | 191 |
192 | 193 |
194 |

Your Date Range Picker

195 | 196 | 197 |
198 | 199 |
200 |

Configuration

201 | 202 |
203 | 204 |
205 |
206 | 207 |
208 | 209 |
210 | 211 | 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /daterangepicker.css: -------------------------------------------------------------------------------- 1 | .daterangepicker-inline { 2 | position: relative; } 3 | 4 | .daterangepicker-tooltip { 5 | position: absolute; 6 | background: #fff; 7 | top: 100px; 8 | left: 20px; } 9 | .daterangepicker-tooltip:before, .daterangepicker-tooltip:after { 10 | position: absolute; 11 | display: inline-block; 12 | border-bottom-color: rgba(0, 0, 0, 0.2); 13 | content: ''; } 14 | .daterangepicker-tooltip:before { 15 | top: -7px; 16 | border-right: 7px solid transparent; 17 | border-left: 7px solid transparent; 18 | border-bottom: 7px solid #ccc; } 19 | .daterangepicker-tooltip:after { 20 | top: -6px; 21 | border-right: 6px solid transparent; 22 | border-bottom: 6px solid #fff; 23 | border-left: 6px solid transparent; } 24 | 25 | .daterangepicker { 26 | color: inherit; 27 | border-radius: 4px; 28 | width: 278px; 29 | padding: 4px; 30 | margin-top: 1px; 31 | /* Calendars */ } 32 | .daterangepicker.opensleft:before { 33 | right: 9px; } 34 | .daterangepicker.opensleft:after { 35 | right: 10px; } 36 | .daterangepicker.openscenter:before { 37 | left: 0; 38 | right: 0; 39 | width: 0; 40 | margin-left: auto; 41 | margin-right: auto; } 42 | .daterangepicker.openscenter:after { 43 | left: 0; 44 | right: 0; 45 | width: 0; 46 | margin-left: auto; 47 | margin-right: auto; } 48 | .daterangepicker.opensright:before { 49 | left: 9px; } 50 | .daterangepicker.opensright:after { 51 | left: 10px; } 52 | .daterangepicker.dropup { 53 | margin-top: -5px; } 54 | .daterangepicker.dropup:before { 55 | top: initial; 56 | bottom: -7px; 57 | border-bottom: initial; 58 | border-top: 7px solid #ccc; } 59 | .daterangepicker.dropup:after { 60 | top: initial; 61 | bottom: -6px; 62 | border-bottom: initial; 63 | border-top: 6px solid #fff; } 64 | .daterangepicker.dropdown-menu { 65 | max-width: none; 66 | z-index: 3001; } 67 | .daterangepicker.single .ranges, .daterangepicker.single .calendar { 68 | float: none; } 69 | .daterangepicker.show-calendar .calendar { 70 | display: block; } 71 | .daterangepicker .calendar { 72 | display: none; 73 | max-width: 270px; 74 | margin: 4px; } 75 | .daterangepicker .calendar.single .calendar-table { 76 | border: none; } 77 | .daterangepicker .calendar th, .daterangepicker .calendar td { 78 | white-space: nowrap; 79 | text-align: center; 80 | min-width: 32px; } 81 | .daterangepicker .calendar-table { 82 | border: 1px solid #fff; 83 | padding: 4px; 84 | border-radius: 4px; 85 | background: #fff; } 86 | .daterangepicker table { 87 | width: 100%; 88 | margin: 0; } 89 | .daterangepicker td, .daterangepicker th { 90 | text-align: center; 91 | width: 20px; 92 | height: 20px; 93 | border-radius: 4px; 94 | border: 1px solid transparent; 95 | white-space: nowrap; 96 | cursor: pointer; } 97 | .daterangepicker td.available:hover, .daterangepicker th.available:hover { 98 | background-color: #eee; 99 | border-color: transparent; 100 | color: inherit; } 101 | .daterangepicker td.week, .daterangepicker th.week { 102 | font-size: 80%; 103 | color: #ccc; } 104 | .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date { 105 | background-color: #fff; 106 | border-color: transparent; 107 | color: #999; } 108 | .daterangepicker td.in-range { 109 | background-color: #ebf4f8; 110 | border-color: transparent; 111 | color: #000; 112 | border-radius: 0; } 113 | .daterangepicker td.start-date { 114 | border-radius: 4px 0 0 4px; } 115 | .daterangepicker td.end-date { 116 | border-radius: 0 4px 4px 0; } 117 | .daterangepicker td.start-date.end-date { 118 | border-radius: 4px; } 119 | .daterangepicker td.active, .daterangepicker td.active:hover { 120 | background-color: #357ebd; 121 | border-color: transparent; 122 | color: #fff; } 123 | .daterangepicker th.month { 124 | width: auto; } 125 | .daterangepicker td.disabled, .daterangepicker option.disabled { 126 | color: #999; 127 | cursor: not-allowed; 128 | text-decoration: line-through; } 129 | .daterangepicker select.monthselect, .daterangepicker select.yearselect { 130 | font-size: 12px; 131 | padding: 1px; 132 | height: auto; 133 | margin: 0; 134 | cursor: default; } 135 | .daterangepicker select.monthselect { 136 | margin-right: 2%; 137 | width: 56%; } 138 | .daterangepicker select.yearselect { 139 | width: 40%; } 140 | .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect { 141 | width: 50px; 142 | margin-bottom: 0; } 143 | .daterangepicker .input-mini { 144 | border: 1px solid #ccc; 145 | border-radius: 4px; 146 | color: #555; 147 | height: 30px; 148 | line-height: 30px; 149 | display: block; 150 | vertical-align: middle; 151 | margin: 0 0 5px 0; 152 | padding: 0 6px 0 28px; 153 | width: 100%; } 154 | .daterangepicker .input-mini.active { 155 | border: 1px solid #08c; 156 | border-radius: 4px; } 157 | .daterangepicker .daterangepicker_input { 158 | position: relative; } 159 | .daterangepicker .daterangepicker_input i { 160 | position: absolute; 161 | left: 8px; 162 | top: 8px; } 163 | .daterangepicker.rtl .input-mini { 164 | padding-right: 28px; 165 | padding-left: 6px; } 166 | .daterangepicker.rtl .daterangepicker_input i { 167 | left: auto; 168 | right: 8px; } 169 | .daterangepicker .calendar-time { 170 | text-align: center; 171 | margin: 5px auto; 172 | line-height: 30px; 173 | position: relative; 174 | padding-left: 28px; } 175 | .daterangepicker .calendar-time select.disabled { 176 | color: #ccc; 177 | cursor: not-allowed; } 178 | 179 | .ranges { 180 | font-size: 11px; 181 | float: none; 182 | margin: 4px; 183 | text-align: left; } 184 | .ranges ul { 185 | list-style: none; 186 | margin: 0 auto; 187 | padding: 0; 188 | width: 100%; } 189 | .ranges li { 190 | font-size: 13px; 191 | background: #f5f5f5; 192 | border: 1px solid #f5f5f5; 193 | border-radius: 4px; 194 | color: #08c; 195 | padding: 3px 12px; 196 | margin-bottom: 8px; 197 | cursor: pointer; } 198 | .ranges li:hover { 199 | background: #08c; 200 | border: 1px solid #08c; 201 | color: #fff; } 202 | .ranges li.active { 203 | background: #08c; 204 | border: 1px solid #08c; 205 | color: #fff; } 206 | 207 | /* Larger Screen Styling */ 208 | @media (min-width: 564px) { 209 | .daterangepicker { 210 | width: auto; } 211 | .daterangepicker .ranges ul { 212 | width: 160px; } 213 | .daterangepicker.single .ranges ul { 214 | width: 100%; } 215 | .daterangepicker.single .calendar.left { 216 | clear: none; } 217 | .daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .calendar { 218 | float: left; } 219 | .daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .calendar { 220 | float: right; } 221 | .daterangepicker.ltr { 222 | direction: ltr; 223 | text-align: left; } 224 | .daterangepicker.ltr .calendar.left { 225 | clear: left; 226 | margin-right: 0; } 227 | .daterangepicker.ltr .calendar.left .calendar-table { 228 | border-right: none; 229 | border-top-right-radius: 0; 230 | border-bottom-right-radius: 0; } 231 | .daterangepicker.ltr .calendar.right { 232 | margin-left: 0; } 233 | .daterangepicker.ltr .calendar.right .calendar-table { 234 | border-left: none; 235 | border-top-left-radius: 0; 236 | border-bottom-left-radius: 0; } 237 | .daterangepicker.ltr .left .daterangepicker_input { 238 | padding-right: 12px; } 239 | .daterangepicker.ltr .calendar.left .calendar-table { 240 | padding-right: 12px; } 241 | .daterangepicker.ltr .ranges, .daterangepicker.ltr .calendar { 242 | float: left; } 243 | .daterangepicker.rtl { 244 | direction: rtl; 245 | text-align: right; } 246 | .daterangepicker.rtl .calendar.left { 247 | clear: right; 248 | margin-left: 0; } 249 | .daterangepicker.rtl .calendar.left .calendar-table { 250 | border-left: none; 251 | border-top-left-radius: 0; 252 | border-bottom-left-radius: 0; } 253 | .daterangepicker.rtl .calendar.right { 254 | margin-right: 0; } 255 | .daterangepicker.rtl .calendar.right .calendar-table { 256 | border-right: none; 257 | border-top-right-radius: 0; 258 | border-bottom-right-radius: 0; } 259 | .daterangepicker.rtl .left .daterangepicker_input { 260 | padding-left: 12px; } 261 | .daterangepicker.rtl .calendar.left .calendar-table { 262 | padding-left: 12px; } 263 | .daterangepicker.rtl .ranges, .daterangepicker.rtl .calendar { 264 | text-align: right; 265 | float: right; } } 266 | 267 | @media (min-width: 730px) { 268 | .daterangepicker .ranges { 269 | width: auto; } 270 | .daterangepicker.ltr .ranges { 271 | float: left; } 272 | .daterangepicker.rtl .ranges { 273 | float: right; } 274 | .daterangepicker .calendar.left { 275 | clear: none !important; } } 276 | 277 | -------------------------------------------------------------------------------- /demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | A date range picker for Bootstrap 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 |
22 | 23 |

Configuration Builder

24 | 25 |
26 | 27 |
28 |
29 | 30 |
31 | 32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 |
48 | 49 | 50 |
51 | 52 |
53 | 54 | 55 |
56 | 57 |
58 |
59 | 60 |
61 | 64 |
65 | 66 |
67 | 70 |
71 | 72 |
73 | 76 |
77 | 78 |
79 | 82 |
83 | 84 |
85 | 88 |
89 | 90 |
91 | 94 |
95 | 96 |
97 | 100 |
101 | 102 |
103 | 104 | 105 |
106 | 107 |
108 | 111 |
112 | 113 |
114 | 117 |
118 | 119 |
120 | 123 |
124 | 125 |
126 | 129 | 132 |
133 | 134 |
135 | 138 |
139 | 140 |
141 | 144 |
145 |
146 |
147 | 148 |
149 | 152 |
153 | 154 |
155 | 158 |
159 | 160 |
161 | 164 |
165 | 166 |
167 | 168 | 173 |
174 | 175 |
176 | 177 | 181 |
182 | 183 |
184 | 185 | 186 |
187 | 188 |
189 | 190 | 191 |
192 | 193 |
194 | 195 | 196 |
197 | 198 |
199 | 200 |
201 |
202 | 203 |
204 | 205 |
206 | 207 |
208 |

Your Date Range Picker

209 | 210 | 211 |
212 | 213 |
214 |

Configuration

215 | 216 |
217 | 218 |
219 |
220 | 221 |
222 | 223 |
224 | 225 | 235 | 236 | 379 | 380 | 381 | 382 | -------------------------------------------------------------------------------- /example/amd/require.js: -------------------------------------------------------------------------------- 1 | /* 2 | RequireJS 2.2.0 Copyright jQuery Foundation and other contributors. 3 | Released under MIT license, http://github.com/requirejs/requirejs/LICENSE 4 | */ 5 | var requirejs,require,define; 6 | (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;dthis.depCount&&!this.defined){if(K(k)){if(this.events.error&&this.map.isDefine||g.onError!== 18 | 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); 19 | 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)})|| 20 | ""),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=== 21 | 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, 22 | 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); 23 | 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= 24 | 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&& 25 | (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", 26 | "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||1e.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(){}, 35 | 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&& 36 | (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); 37 | -------------------------------------------------------------------------------- /daterangepicker.scss: -------------------------------------------------------------------------------- 1 | // 2 | // A stylesheet for use with Bootstrap 3.x 3 | // @author: Dan Grossman http://www.dangrossman.info/ 4 | // @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved. 5 | // @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php 6 | // @website: https://www.improvely.com/ 7 | // 8 | 9 | // 10 | // VARIABLES 11 | // 12 | 13 | // 14 | // Settings 15 | 16 | // The class name to contain everything within. 17 | $prefix-class: daterangepicker; 18 | $arrow-size: 7px !default; 19 | 20 | // 21 | // Colors 22 | $daterangepicker-color: inherit !default; 23 | $daterangepicker-bg-color: #fff !default; 24 | 25 | $daterangepicker-cell-color: $daterangepicker-color !default; 26 | $daterangepicker-cell-border-color: transparent !default; 27 | $daterangepicker-cell-bg-color: $daterangepicker-bg-color !default; 28 | 29 | $daterangepicker-cell-hover-color: $daterangepicker-color !default; 30 | $daterangepicker-cell-hover-border-color: $daterangepicker-cell-border-color !default; 31 | $daterangepicker-cell-hover-bg-color: #eee !default; 32 | 33 | $daterangepicker-in-range-color: #000 !default; 34 | $daterangepicker-in-range-border-color: transparent !default; 35 | $daterangepicker-in-range-bg-color: #ebf4f8 !default; 36 | 37 | $daterangepicker-active-color: #fff !default; 38 | $daterangepicker-active-bg-color: #357ebd !default; 39 | $daterangepicker-active-border-color: transparent !default; 40 | 41 | $daterangepicker-unselected-color: #999 !default; 42 | $daterangepicker-unselected-border-color: transparent !default; 43 | $daterangepicker-unselected-bg-color: #fff !default; 44 | 45 | // 46 | // daterangepicker 47 | $daterangepicker-width: 278px !default; 48 | $daterangepicker-padding: 4px !default; 49 | $daterangepicker-z-index: 3000 !default; 50 | 51 | $daterangepicker-border-size: 1px !default; 52 | $daterangepicker-border-color: #ccc !default; 53 | $daterangepicker-border-radius: 4px !default; 54 | 55 | 56 | // 57 | // Calendar 58 | $daterangepicker-calendar-margin: $daterangepicker-padding !default; 59 | $daterangepicker-calendar-bg-color: $daterangepicker-bg-color !default; 60 | 61 | $daterangepicker-calendar-border-size: 1px !default; 62 | $daterangepicker-calendar-border-color: $daterangepicker-bg-color !default; 63 | $daterangepicker-calendar-border-radius: $daterangepicker-border-radius !default; 64 | 65 | // 66 | // Calendar Cells 67 | $daterangepicker-cell-size: 20px !default; 68 | $daterangepicker-cell-width: $daterangepicker-cell-size !default; 69 | $daterangepicker-cell-height: $daterangepicker-cell-size !default; 70 | 71 | $daterangepicker-cell-border-radius: $daterangepicker-calendar-border-radius !default; 72 | $daterangepicker-cell-border-size: 1px !default; 73 | 74 | // 75 | // Dropdowns 76 | $daterangepicker-dropdown-z-index: $daterangepicker-z-index + 1 !default; 77 | 78 | // 79 | // Controls 80 | $daterangepicker-control-height: 30px !default; 81 | $daterangepicker-control-line-height: $daterangepicker-control-height !default; 82 | $daterangepicker-control-color: #555 !default; 83 | 84 | $daterangepicker-control-border-size: 1px !default; 85 | $daterangepicker-control-border-color: #ccc !default; 86 | $daterangepicker-control-border-radius: 4px !default; 87 | 88 | $daterangepicker-control-active-border-size: 1px !default; 89 | $daterangepicker-control-active-border-color: #08c !default; 90 | $daterangepicker-control-active-border-radius: $daterangepicker-control-border-radius !default; 91 | 92 | $daterangepicker-control-disabled-color: #ccc !default; 93 | 94 | // 95 | // Ranges 96 | $daterangepicker-ranges-color: #08c !default; 97 | $daterangepicker-ranges-bg-color: #f5f5f5 !default; 98 | 99 | $daterangepicker-ranges-border-size: 1px !default; 100 | $daterangepicker-ranges-border-color: $daterangepicker-ranges-bg-color !default; 101 | $daterangepicker-ranges-border-radius: $daterangepicker-border-radius !default; 102 | 103 | $daterangepicker-ranges-hover-color: #fff !default; 104 | $daterangepicker-ranges-hover-bg-color: $daterangepicker-ranges-color !default; 105 | $daterangepicker-ranges-hover-border-size: $daterangepicker-ranges-border-size !default; 106 | $daterangepicker-ranges-hover-border-color: $daterangepicker-ranges-hover-bg-color !default; 107 | $daterangepicker-ranges-hover-border-radius: $daterangepicker-border-radius !default; 108 | 109 | $daterangepicker-ranges-active-border-size: $daterangepicker-ranges-border-size !default; 110 | $daterangepicker-ranges-active-border-color: $daterangepicker-ranges-bg-color !default; 111 | $daterangepicker-ranges-active-border-radius: $daterangepicker-border-radius !default; 112 | 113 | $arrow-prefix-size: $arrow-size; 114 | $arrow-suffix-size: ($arrow-size - $daterangepicker-border-size); 115 | 116 | // 117 | // STYLESHEETS 118 | // 119 | 120 | .#{$prefix-class}-inline { 121 | position: relative; 122 | } 123 | .#{$prefix-class}-tooltip { 124 | position: absolute; 125 | background: $daterangepicker-bg-color; 126 | 127 | // TODO: Should these be parameterized?? 128 | top: 100px; 129 | left: 20px; 130 | 131 | &:before, &:after { 132 | position: absolute; 133 | display: inline-block; 134 | 135 | border-bottom-color: rgba(0, 0, 0, 0.2); 136 | content: ''; 137 | } 138 | 139 | &:before { 140 | top: -$arrow-prefix-size; 141 | 142 | border-right: $arrow-prefix-size solid transparent; 143 | border-left: $arrow-prefix-size solid transparent; 144 | border-bottom: $arrow-prefix-size solid $daterangepicker-border-color; 145 | } 146 | 147 | &:after { 148 | top: -$arrow-suffix-size; 149 | 150 | border-right: $arrow-suffix-size solid transparent; 151 | border-bottom: $arrow-suffix-size solid $daterangepicker-bg-color; 152 | border-left: $arrow-suffix-size solid transparent; 153 | } 154 | } 155 | .#{$prefix-class} { 156 | color: $daterangepicker-color; 157 | border-radius: $daterangepicker-border-radius; 158 | width: $daterangepicker-width; 159 | padding: $daterangepicker-padding; 160 | margin-top: $daterangepicker-border-size; 161 | 162 | &.opensleft { 163 | &:before { 164 | // TODO: Make this relative to prefix size. 165 | right: $arrow-prefix-size + 2px; 166 | } 167 | 168 | &:after { 169 | // TODO: Make this relative to suffix size. 170 | right: $arrow-suffix-size + 4px; 171 | } 172 | } 173 | 174 | &.openscenter { 175 | &:before { 176 | left: 0; 177 | right: 0; 178 | width: 0; 179 | margin-left: auto; 180 | margin-right: auto; 181 | } 182 | 183 | &:after { 184 | left: 0; 185 | right: 0; 186 | width: 0; 187 | margin-left: auto; 188 | margin-right: auto; 189 | } 190 | } 191 | 192 | &.opensright { 193 | &:before { 194 | // TODO: Make this relative to prefix size. 195 | left: $arrow-prefix-size + 2px; 196 | } 197 | 198 | &:after { 199 | // TODO: Make this relative to suffix size. 200 | left: $arrow-suffix-size + 4px; 201 | } 202 | } 203 | 204 | &.dropup { 205 | margin-top: -5px; 206 | 207 | // NOTE: Note sure why these are special-cased. 208 | &:before { 209 | top: initial; 210 | bottom: -$arrow-prefix-size; 211 | border-bottom: initial; 212 | border-top: $arrow-prefix-size solid $daterangepicker-border-color; 213 | } 214 | 215 | &:after { 216 | top: initial; 217 | bottom:-$arrow-suffix-size; 218 | border-bottom: initial; 219 | border-top: $arrow-suffix-size solid $daterangepicker-bg-color; 220 | } 221 | } 222 | 223 | &.dropdown-menu { 224 | max-width: none; 225 | z-index: $daterangepicker-dropdown-z-index; 226 | } 227 | 228 | &.single { 229 | .ranges, .calendar { 230 | float: none; 231 | } 232 | } 233 | 234 | /* Calendars */ 235 | &.show-calendar { 236 | .calendar { 237 | display: block; 238 | } 239 | } 240 | 241 | .calendar { 242 | display: none; 243 | max-width: $daterangepicker-width - ($daterangepicker-calendar-margin * 2); 244 | margin: $daterangepicker-calendar-margin; 245 | 246 | &.single { 247 | .calendar-table { 248 | border: none; 249 | } 250 | } 251 | 252 | th, td { 253 | white-space: nowrap; 254 | text-align: center; 255 | 256 | // TODO: Should this actually be hard-coded? 257 | min-width: 32px; 258 | } 259 | } 260 | 261 | .calendar-table { 262 | border: $daterangepicker-calendar-border-size solid $daterangepicker-calendar-border-color; 263 | padding: $daterangepicker-calendar-margin; 264 | border-radius: $daterangepicker-calendar-border-radius; 265 | background: $daterangepicker-calendar-bg-color; 266 | } 267 | 268 | table { 269 | width: 100%; 270 | margin: 0; 271 | } 272 | 273 | td, th { 274 | text-align: center; 275 | width: $daterangepicker-cell-width; 276 | height: $daterangepicker-cell-height; 277 | border-radius: $daterangepicker-cell-border-radius; 278 | border: $daterangepicker-cell-border-size solid $daterangepicker-cell-border-color; 279 | white-space: nowrap; 280 | cursor: pointer; 281 | 282 | &.available { 283 | &:hover { 284 | background-color: $daterangepicker-cell-hover-bg-color; 285 | border-color: $daterangepicker-cell-hover-border-color; 286 | color: $daterangepicker-cell-hover-color; 287 | } 288 | } 289 | 290 | &.week { 291 | font-size: 80%; 292 | color: #ccc; 293 | } 294 | } 295 | 296 | td { 297 | &.off { 298 | &, &.in-range, &.start-date, &.end-date { 299 | background-color: $daterangepicker-unselected-bg-color; 300 | border-color: $daterangepicker-unselected-border-color; 301 | color: $daterangepicker-unselected-color; 302 | } 303 | } 304 | 305 | // 306 | // Date Range 307 | &.in-range { 308 | background-color: $daterangepicker-in-range-bg-color; 309 | border-color: $daterangepicker-in-range-border-color; 310 | color: $daterangepicker-in-range-color; 311 | 312 | // TODO: Should this be static or should it be parameterized? 313 | border-radius: 0; 314 | } 315 | 316 | &.start-date { 317 | border-radius: $daterangepicker-cell-border-radius 0 0 $daterangepicker-cell-border-radius; 318 | } 319 | 320 | &.end-date { 321 | border-radius: 0 $daterangepicker-cell-border-radius $daterangepicker-cell-border-radius 0; 322 | } 323 | 324 | &.start-date.end-date { 325 | border-radius: $daterangepicker-cell-border-radius; 326 | } 327 | 328 | &.active { 329 | &, &:hover { 330 | background-color: $daterangepicker-active-bg-color; 331 | border-color: $daterangepicker-active-border-color; 332 | color: $daterangepicker-active-color; 333 | } 334 | } 335 | } 336 | 337 | th { 338 | &.month { 339 | width: auto; 340 | } 341 | } 342 | 343 | // 344 | // Disabled Controls 345 | // 346 | td, option { 347 | &.disabled { 348 | color: #999; 349 | cursor: not-allowed; 350 | text-decoration: line-through; 351 | } 352 | } 353 | 354 | select { 355 | &.monthselect, &.yearselect { 356 | font-size: 12px; 357 | padding: 1px; 358 | height: auto; 359 | margin: 0; 360 | cursor: default; 361 | } 362 | 363 | &.monthselect { 364 | margin-right: 2%; 365 | width: 56%; 366 | } 367 | 368 | &.yearselect { 369 | width: 40%; 370 | } 371 | 372 | &.hourselect, &.minuteselect, &.secondselect, &.ampmselect { 373 | width: 50px; 374 | margin-bottom: 0; 375 | } 376 | } 377 | 378 | // 379 | // Text Input Controls (above calendar) 380 | // 381 | .input-mini { 382 | border: $daterangepicker-control-border-size solid $daterangepicker-control-border-color; 383 | border-radius: $daterangepicker-control-border-radius; 384 | color: $daterangepicker-control-color; 385 | height: $daterangepicker-control-line-height; 386 | line-height: $daterangepicker-control-height; 387 | display: block; 388 | vertical-align: middle; 389 | 390 | // TODO: Should these all be static, too?? 391 | margin: 0 0 5px 0; 392 | padding: 0 6px 0 28px; 393 | width: 100%; 394 | 395 | &.active { 396 | border: $daterangepicker-control-active-border-size solid $daterangepicker-control-active-border-color; 397 | border-radius: $daterangepicker-control-active-border-radius; 398 | } 399 | } 400 | 401 | .daterangepicker_input { 402 | position: relative; 403 | 404 | i { 405 | position: absolute; 406 | 407 | // NOTE: These appear to be eyeballed to me... 408 | left: 8px; 409 | top: 8px; 410 | } 411 | } 412 | &.rtl { 413 | .input-mini { 414 | padding-right: 28px; 415 | padding-left: 6px; 416 | } 417 | .daterangepicker_input i { 418 | left: auto; 419 | right: 8px; 420 | } 421 | } 422 | 423 | // 424 | // Time Picker 425 | // 426 | .calendar-time { 427 | text-align: center; 428 | margin: 5px auto; 429 | line-height: $daterangepicker-control-line-height; 430 | position: relative; 431 | padding-left: 28px; 432 | 433 | select { 434 | &.disabled { 435 | color: $daterangepicker-control-disabled-color; 436 | cursor: not-allowed; 437 | } 438 | } 439 | } 440 | } 441 | 442 | // 443 | // Predefined Ranges 444 | // 445 | 446 | .ranges { 447 | font-size: 11px; 448 | float: none; 449 | margin: 4px; 450 | text-align: left; 451 | 452 | ul { 453 | list-style: none; 454 | margin: 0 auto; 455 | padding: 0; 456 | width: 100%; 457 | } 458 | 459 | li { 460 | font-size: 13px; 461 | background: $daterangepicker-ranges-bg-color; 462 | border: $daterangepicker-ranges-border-size solid $daterangepicker-ranges-border-color; 463 | border-radius: $daterangepicker-ranges-border-radius; 464 | color: $daterangepicker-ranges-color; 465 | padding: 3px 12px; 466 | margin-bottom: 8px; 467 | cursor: pointer; 468 | 469 | &:hover { 470 | background: $daterangepicker-ranges-hover-bg-color; 471 | border: $daterangepicker-ranges-hover-border-size solid $daterangepicker-ranges-hover-border-color; 472 | color: $daterangepicker-ranges-hover-color; 473 | } 474 | 475 | &.active { 476 | background: $daterangepicker-ranges-hover-bg-color; 477 | border: $daterangepicker-ranges-hover-border-size solid $daterangepicker-ranges-hover-border-color; 478 | color: $daterangepicker-ranges-hover-color; 479 | } 480 | } 481 | } 482 | 483 | /* Larger Screen Styling */ 484 | @media (min-width: 564px) { 485 | .#{$prefix-class} { 486 | width: auto; 487 | 488 | .ranges { 489 | ul { 490 | width: 160px; 491 | } 492 | } 493 | 494 | &.single { 495 | .ranges { 496 | ul { 497 | width: 100%; 498 | } 499 | } 500 | 501 | .calendar.left { 502 | clear: none; 503 | } 504 | 505 | &.ltr { 506 | .ranges, .calendar { 507 | float:left; 508 | } 509 | } 510 | &.rtl { 511 | .ranges, .calendar { 512 | float:right; 513 | } 514 | } 515 | } 516 | 517 | &.ltr { 518 | direction: ltr; 519 | text-align: left; 520 | .calendar{ 521 | &.left { 522 | clear: left; 523 | margin-right: 0; 524 | 525 | .calendar-table { 526 | border-right: none; 527 | border-top-right-radius: 0; 528 | border-bottom-right-radius: 0; 529 | } 530 | } 531 | 532 | &.right { 533 | margin-left: 0; 534 | 535 | .calendar-table { 536 | border-left: none; 537 | border-top-left-radius: 0; 538 | border-bottom-left-radius: 0; 539 | } 540 | } 541 | } 542 | 543 | .left .daterangepicker_input { 544 | padding-right: 12px; 545 | } 546 | 547 | .calendar.left .calendar-table { 548 | padding-right: 12px; 549 | } 550 | 551 | .ranges, .calendar { 552 | float: left; 553 | } 554 | } 555 | &.rtl { 556 | direction: rtl; 557 | text-align: right; 558 | .calendar{ 559 | &.left { 560 | clear: right; 561 | margin-left: 0; 562 | 563 | .calendar-table { 564 | border-left: none; 565 | border-top-left-radius: 0; 566 | border-bottom-left-radius: 0; 567 | } 568 | } 569 | 570 | &.right { 571 | margin-right: 0; 572 | 573 | .calendar-table { 574 | border-right: none; 575 | border-top-right-radius: 0; 576 | border-bottom-right-radius: 0; 577 | } 578 | } 579 | } 580 | 581 | .left .daterangepicker_input { 582 | padding-left: 12px; 583 | } 584 | 585 | .calendar.left .calendar-table { 586 | padding-left: 12px; 587 | } 588 | 589 | .ranges, .calendar { 590 | text-align: right; 591 | float: right; 592 | } 593 | } 594 | } 595 | } 596 | 597 | @media (min-width: 730px) { 598 | .#{$prefix-class} { 599 | .ranges { 600 | width: auto; 601 | } 602 | &.ltr { 603 | .ranges { 604 | float: left; 605 | } 606 | } 607 | &.rtl { 608 | .ranges { 609 | float: right; 610 | } 611 | } 612 | 613 | .calendar.left { 614 | clear: none !important; 615 | } 616 | } 617 | } 618 | -------------------------------------------------------------------------------- /moment.min.js: -------------------------------------------------------------------------------- 1 | //! moment.js 2 | //! version : 2.13.0 3 | //! authors : Tim Wood, Iskren Chernev, Moment.js contributors 4 | //! license : MIT 5 | //! momentjs.com 6 | !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return fd.apply(null,arguments)}function b(a){fd=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in hd)d=hd[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),id===!1&&(id=!0,a.updateOffset(this),id=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function u(b,c){var d=!0;return g(function(){return null!=a.deprecationHandler&&a.deprecationHandler(null,b),d&&(t(b+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),d=!1),c.apply(this,arguments)},c)}function v(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c),jd[b]||(t(c),jd[b]=!0)}function w(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function x(a){return"[object Object]"===Object.prototype.toString.call(a)}function y(a){var b,c;for(c in a)b=a[c],w(b)?this[c]=b:this["_"+c]=b;this._config=a,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function z(a,b){var c,d=g({},a);for(c in b)f(b,c)&&(x(a[c])&&x(b[c])?(d[c]={},g(d[c],a[c]),g(d[c],b[c])):null!=b[c]?d[c]=b[c]:delete d[c]);return d}function A(a){null!=a&&this.set(a)}function B(a){return a?a.toLowerCase().replace("_","-"):a}function C(a){for(var b,c,d,e,f=0;f0;){if(d=D(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function D(a){var b=null;if(!nd[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=ld._abbr,require("./locale/"+a),E(b)}catch(c){}return nd[a]}function E(a,b){var c;return a&&(c=m(b)?H(a):F(a,b),c&&(ld=c)),ld._abbr}function F(a,b){return null!==b?(b.abbr=a,null!=nd[a]?(v("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),b=z(nd[a]._config,b)):null!=b.parentLocale&&(null!=nd[b.parentLocale]?b=z(nd[b.parentLocale]._config,b):v("parentLocaleUndefined","specified parentLocale is not defined yet")),nd[a]=new A(b),E(a),nd[a]):(delete nd[a],null)}function G(a,b){if(null!=b){var c;null!=nd[a]&&(b=z(nd[a]._config,b)),c=new A(b),c.parentLocale=nd[a],nd[a]=c,E(a)}else null!=nd[a]&&(null!=nd[a].parentLocale?nd[a]=nd[a].parentLocale:null!=nd[a]&&delete nd[a]);return nd[a]}function H(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return ld;if(!c(a)){if(b=D(a))return b;a=[a]}return C(a)}function I(){return kd(nd)}function J(a,b){var c=a.toLowerCase();od[c]=od[c+"s"]=od[b]=a}function K(a){return"string"==typeof a?od[a]||od[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)f(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(b,c){return function(d){return null!=d?(O(this,b,d),a.updateOffset(this,c),this):N(this,b)}}function N(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function O(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function P(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=K(a),w(this[a]))return this[a](b);return this}function Q(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function R(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(sd[a]=e),b&&(sd[b[0]]=function(){return Q(e.apply(this,arguments),b[1],b[2])}),c&&(sd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function S(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function T(a){var b,c,d=a.match(pd);for(b=0,c=d.length;c>b;b++)sd[d[b]]?d[b]=sd[d[b]]:d[b]=S(d[b]);return function(b){var e,f="";for(e=0;c>e;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}function U(a,b){return a.isValid()?(b=V(b,a.localeData()),rd[b]=rd[b]||T(b),rd[b](a)):a.localeData().invalidDate()}function V(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(qd.lastIndex=0;d>=0&&qd.test(a);)a=a.replace(qd,c),qd.lastIndex=0,d-=1;return a}function W(a,b,c){Kd[a]=w(b)?b:function(a,d){return a&&c?c:b}}function X(a,b){return f(Kd,a)?Kd[a](b._strict,b._locale):new RegExp(Y(a))}function Y(a){return Z(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function Z(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;cd;++d)f=h([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=md.call(this._shortMonthsParse,g),-1!==e?e:null):(e=md.call(this._longMonthsParse,g),-1!==e?e:null):"MMM"===b?(e=md.call(this._shortMonthsParse,g),-1!==e?e:(e=md.call(this._longMonthsParse,g),-1!==e?e:null)):(e=md.call(this._longMonthsParse,g),-1!==e?e:(e=md.call(this._shortMonthsParse,g),-1!==e?e:null))}function fa(a,b,c){var d,e,f;if(this._monthsParseExact)return ea.call(this,a,b,c);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function ga(a,b){var c;if(!a.isValid())return a;if("string"==typeof b)if(/^\d+$/.test(b))b=r(b);else if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),ba(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ha(b){return null!=b?(ga(this,b),a.updateOffset(this,!0),this):N(this,"Month")}function ia(){return ba(this.year(),this.month())}function ja(a){return this._monthsParseExact?(f(this,"_monthsRegex")||la.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ka(a){return this._monthsParseExact?(f(this,"_monthsRegex")||la.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function la(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=Z(d[b]),e[b]=Z(e[b]),f[b]=Z(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function ma(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[Nd]<0||c[Nd]>11?Nd:c[Od]<1||c[Od]>ba(c[Md],c[Nd])?Od:c[Pd]<0||c[Pd]>24||24===c[Pd]&&(0!==c[Qd]||0!==c[Rd]||0!==c[Sd])?Pd:c[Qd]<0||c[Qd]>59?Qd:c[Rd]<0||c[Rd]>59?Rd:c[Sd]<0||c[Sd]>999?Sd:-1,j(a)._overflowDayOfYear&&(Md>b||b>Od)&&(b=Od),j(a)._overflowWeeks&&-1===b&&(b=Td),j(a)._overflowWeekday&&-1===b&&(b=Ud),j(a).overflow=b),a}function na(a){var b,c,d,e,f,g,h=a._i,i=$d.exec(h)||_d.exec(h);if(i){for(j(a).iso=!0,b=0,c=be.length;c>b;b++)if(be[b][1].exec(i[1])){e=be[b][0],d=be[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=ce.length;c>b;b++)if(ce[b][1].exec(i[3])){f=(i[2]||" ")+ce[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!ae.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),Ca(a)}else a._isValid=!1}function oa(b){var c=de.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(na(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function pa(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function qa(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function ra(a){return sa(a)?366:365}function sa(a){return a%4===0&&a%100!==0||a%400===0}function ta(){return sa(this.year())}function ua(a,b,c){var d=7+b-c,e=(7+qa(a,0,d).getUTCDay()-b)%7;return-e+d-1}function va(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ua(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=ra(f)+j):j>ra(a)?(f=a+1,g=j-ra(a)):(f=a,g=j),{year:f,dayOfYear:g}}function wa(a,b,c){var d,e,f=ua(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+xa(e,b,c)):g>xa(a.year(),b,c)?(d=g-xa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function xa(a,b,c){var d=ua(a,b,c),e=ua(a+1,b,c);return(ra(a)-d+e)/7}function ya(a,b,c){return null!=a?a:null!=b?b:c}function za(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function Aa(a){var b,c,d,e,f=[];if(!a._d){for(d=za(a),a._w&&null==a._a[Od]&&null==a._a[Nd]&&Ba(a),a._dayOfYear&&(e=ya(a._a[Md],d[Md]),a._dayOfYear>ra(e)&&(j(a)._overflowDayOfYear=!0),c=qa(e,0,a._dayOfYear),a._a[Nd]=c.getUTCMonth(),a._a[Od]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[Pd]&&0===a._a[Qd]&&0===a._a[Rd]&&0===a._a[Sd]&&(a._nextDay=!0,a._a[Pd]=0),a._d=(a._useUTC?qa:pa).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Pd]=24)}}function Ba(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ya(b.GG,a._a[Md],wa(Ka(),1,4).year),d=ya(b.W,1),e=ya(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ya(b.gg,a._a[Md],wa(Ka(),f,g).year),d=ya(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>xa(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=va(c,d,e,f,g),a._a[Md]=h.year,a._dayOfYear=h.dayOfYear)}function Ca(b){if(b._f===a.ISO_8601)return void na(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=V(b._f,b._locale).match(pd)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),sd[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),aa(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[Pd]<=12&&b._a[Pd]>0&&(j(b).bigHour=void 0),j(b).parsedDateParts=b._a.slice(0),j(b).meridiem=b._meridiem,b._a[Pd]=Da(b._locale,b._a[Pd],b._meridiem),Aa(b),ma(b)}function Da(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function Ea(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function Fa(a){if(!a._d){var b=L(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),Aa(a)}}function Ga(a){var b=new o(ma(Ha(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ha(a){var b=a._i,e=a._f;return a._locale=a._locale||H(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(ma(b)):(c(e)?Ea(a):e?Ca(a):d(b)?a._d=b:Ia(a),k(a)||(a._d=null),a))}function Ia(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(f.valueOf()):"string"==typeof f?oa(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),Aa(b)):"object"==typeof f?Fa(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ja(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Ga(f)}function Ka(a,b,c,d){return Ja(a,b,c,d,!1)}function La(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ka();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+Q(~~(a/60),2)+b+Q(~~a%60,2)})}function Ra(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(ie)||["-",0,0],f=+(60*e[1])+r(e[2]);return"+"===e[0]?f:-f}function Sa(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?b.valueOf():Ka(b).valueOf())-e.valueOf(),e._d.setTime(e._d.valueOf()+f),a.updateOffset(e,!1),e):Ka(b).local()}function Ta(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ua(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=Ra(Hd,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ta(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?jb(this,db(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ta(this):null!=b?this:NaN}function Va(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Wa(a){return this.utcOffset(0,a)}function Xa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ta(this),"m")),this}function Ya(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ra(Gd,this._i)),this}function Za(a){return this.isValid()?(a=a?Ka(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function $a(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _a(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ha(a),a._a){var b=a._isUTC?h(a._a):Ka(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function ab(){return this.isValid()?!this._isUTC:!1}function bb(){return this.isValid()?this._isUTC:!1}function cb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function db(a,b){var c,d,e,g=a,h=null;return Pa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=je.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[Od])*c,h:r(h[Pd])*c,m:r(h[Qd])*c,s:r(h[Rd])*c,ms:r(h[Sd])*c}):(h=ke.exec(a))?(c="-"===h[1]?-1:1,g={y:eb(h[2],c),M:eb(h[3],c),w:eb(h[4],c),d:eb(h[5],c),h:eb(h[6],c),m:eb(h[7],c),s:eb(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=gb(Ka(g.from),Ka(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Oa(g),Pa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function eb(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function fb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function gb(a,b){var c;return a.isValid()&&b.isValid()?(b=Sa(b,a),a.isBefore(b)?c=fb(a,b):(c=fb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function hb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function ib(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(v(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=db(c,d),jb(this,e,a),this}}function jb(b,c,d,e){var f=c._milliseconds,g=hb(c._days),h=hb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&O(b,"Date",N(b,"Date")+g*d),h&&ga(b,N(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function kb(a,b){var c=a||Ka(),d=Sa(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(w(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ka(c)))}function lb(){return new o(this)}function mb(a,b){var c=p(a)?a:Ka(a);return this.isValid()&&c.isValid()?(b=K(m(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function ub(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function vb(){var a=this.clone().utc();return 0f&&(b=f),Vb.call(this,a,b,c,d,e))}function Vb(a,b,c,d,e){var f=va(a,b,c,d,e),g=qa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Wb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Xb(a){return wa(a,this._week.dow,this._week.doy).week}function Yb(){return this._week.dow}function Zb(){return this._week.doy}function $b(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function _b(a){var b=wa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function ac(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function bc(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function cc(a){return this._weekdaysShort[a.day()]}function dc(a){return this._weekdaysMin[a.day()]}function ec(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)f=h([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=md.call(this._weekdaysParse,g),-1!==e?e:null):"ddd"===b?(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:null):(e=md.call(this._minWeekdaysParse,g),-1!==e?e:null):"dddd"===b?(e=md.call(this._weekdaysParse,g),-1!==e?e:(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:(e=md.call(this._minWeekdaysParse,g),-1!==e?e:null))):"ddd"===b?(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:(e=md.call(this._weekdaysParse,g),-1!==e?e:(e=md.call(this._minWeekdaysParse,g),-1!==e?e:null))):(e=md.call(this._minWeekdaysParse,g),-1!==e?e:(e=md.call(this._weekdaysParse,g),-1!==e?e:(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:null)))}function fc(a,b,c){var d,e,f;if(this._weekdaysParseExact)return ec.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=h([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function gc(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=ac(a,this.localeData()),this.add(a-b,"d")):b}function hc(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function ic(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function jc(a){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||mc.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex}function kc(a){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||mc.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function lc(a){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||mc.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function mc(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],i=[],j=[],k=[];for(b=0;7>b;b++)c=h([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),i.push(e),j.push(f),k.push(d),k.push(e),k.push(f);for(g.sort(a),i.sort(a),j.sort(a),k.sort(a),b=0;7>b;b++)i[b]=Z(i[b]),j[b]=Z(j[b]),k[b]=Z(k[b]);this._weekdaysRegex=new RegExp("^("+k.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+j.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}function nc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function oc(){return this.hours()%12||12}function pc(){return this.hours()||24}function qc(a,b){R(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function rc(a,b){return b._meridiemParse}function sc(a){return"p"===(a+"").toLowerCase().charAt(0)}function tc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function uc(a,b){b[Sd]=r(1e3*("0."+a))}function vc(){return this._isUTC?"UTC":""}function wc(){return this._isUTC?"Coordinated Universal Time":""}function xc(a){return Ka(1e3*a)}function yc(){return Ka.apply(null,arguments).parseZone()}function zc(a,b,c){var d=this._calendar[a];return w(d)?d.call(b,c):d}function Ac(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function Bc(){return this._invalidDate}function Cc(a){return this._ordinal.replace("%d",a)}function Dc(a){return a}function Ec(a,b,c,d){var e=this._relativeTime[c];return w(e)?e(a,b,c,d):e.replace(/%d/i,a)}function Fc(a,b){var c=this._relativeTime[a>0?"future":"past"];return w(c)?c(b):c.replace(/%s/i,b)}function Gc(a,b,c,d){var e=H(),f=h().set(d,b);return e[c](f,a)}function Hc(a,b,c){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return Gc(a,b,c,"month");var d,e=[];for(d=0;12>d;d++)e[d]=Gc(a,d,c,"month");return e}function Ic(a,b,c,d){"boolean"==typeof a?("number"==typeof b&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,"number"==typeof b&&(c=b,b=void 0),b=b||"");var e=H(),f=a?e._week.dow:0;if(null!=c)return Gc(b,(c+f)%7,d,"day");var g,h=[];for(g=0;7>g;g++)h[g]=Gc(b,(g+f)%7,d,"day");return h}function Jc(a,b){return Hc(a,b,"months")}function Kc(a,b){return Hc(a,b,"monthsShort")}function Lc(a,b,c){return Ic(a,b,c,"weekdays")}function Mc(a,b,c){return Ic(a,b,c,"weekdaysShort")}function Nc(a,b,c){return Ic(a,b,c,"weekdaysMin")}function Oc(){var a=this._data;return this._milliseconds=Le(this._milliseconds),this._days=Le(this._days),this._months=Le(this._months),a.milliseconds=Le(a.milliseconds),a.seconds=Le(a.seconds),a.minutes=Le(a.minutes),a.hours=Le(a.hours),a.months=Le(a.months),a.years=Le(a.years),this}function Pc(a,b,c,d){var e=db(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Qc(a,b){return Pc(this,a,b,1)}function Rc(a,b){return Pc(this,a,b,-1)}function Sc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Tc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Sc(Vc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Uc(g)),h+=e,g-=Sc(Vc(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Uc(a){return 4800*a/146097}function Vc(a){return 146097*a/4800}function Wc(a){var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+Uc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Vc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Xc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Yc(a){return function(){return this.as(a)}}function Zc(a){ 7 | return a=K(a),this[a+"s"]()}function $c(a){return function(){return this._data[a]}}function _c(){return q(this.days()/7)}function ad(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function bd(a,b,c){var d=db(a).abs(),e=_e(d.as("s")),f=_e(d.as("m")),g=_e(d.as("h")),h=_e(d.as("d")),i=_e(d.as("M")),j=_e(d.as("y")),k=e=f&&["m"]||f=g&&["h"]||g=h&&["d"]||h=i&&["M"]||i=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,ad.apply(null,k)}function cd(a,b){return void 0===af[a]?!1:void 0===b?af[a]:(af[a]=b,!0)}function dd(a){var b=this.localeData(),c=bd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function ed(){var a,b,c,d=bf(this._milliseconds)/1e3,e=bf(this._days),f=bf(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var fd,gd;gd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;c>d;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};var hd=a.momentProperties=[],id=!1,jd={};a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;var kd;kd=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)f(a,b)&&c.push(b);return c};var ld,md,nd={},od={},pd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,qd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,rd={},sd={},td=/\d/,ud=/\d\d/,vd=/\d{3}/,wd=/\d{4}/,xd=/[+-]?\d{6}/,yd=/\d\d?/,zd=/\d\d\d\d?/,Ad=/\d\d\d\d\d\d?/,Bd=/\d{1,3}/,Cd=/\d{1,4}/,Dd=/[+-]?\d{1,6}/,Ed=/\d+/,Fd=/[+-]?\d+/,Gd=/Z|[+-]\d\d:?\d\d/gi,Hd=/Z|[+-]\d\d(?::?\d\d)?/gi,Id=/[+-]?\d+(\.\d{1,3})?/,Jd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Kd={},Ld={},Md=0,Nd=1,Od=2,Pd=3,Qd=4,Rd=5,Sd=6,Td=7,Ud=8;md=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var b;for(b=0;b=a?""+a:"+"+a}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),J("year","y"),W("Y",Fd),W("YY",yd,ud),W("YYYY",Cd,wd),W("YYYYY",Dd,xd),W("YYYYYY",Dd,xd),$(["YYYYY","YYYYYY"],Md),$("YYYY",function(b,c){c[Md]=2===b.length?a.parseTwoDigitYear(b):r(b)}),$("YY",function(b,c){c[Md]=a.parseTwoDigitYear(b)}),$("Y",function(a,b){b[Md]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var ee=M("FullYear",!0);a.ISO_8601=function(){};var fe=u("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ka.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),ge=u("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ka.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),he=function(){return Date.now?Date.now():+new Date};Qa("Z",":"),Qa("ZZ",""),W("Z",Hd),W("ZZ",Hd),$(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ra(Hd,a)});var ie=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var je=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,ke=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;db.fn=Oa.prototype;var le=ib(1,"add"),me=ib(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ne=u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Pb("gggg","weekYear"),Pb("ggggg","weekYear"),Pb("GGGG","isoWeekYear"),Pb("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),W("G",Fd),W("g",Fd),W("GG",yd,ud),W("gg",yd,ud),W("GGGG",Cd,wd),W("gggg",Cd,wd),W("GGGGG",Dd,xd),W("ggggg",Dd,xd),_(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),_(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),R("Q",0,"Qo","quarter"),J("quarter","Q"),W("Q",td),$("Q",function(a,b){b[Nd]=3*(r(a)-1)}),R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),W("w",yd),W("ww",yd,ud),W("W",yd),W("WW",yd,ud),_(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var oe={dow:0,doy:6};R("D",["DD",2],"Do","date"),J("date","D"),W("D",yd),W("DD",yd,ud),W("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),$(["D","DD"],Od),$("Do",function(a,b){b[Od]=r(a.match(yd)[0],10)});var pe=M("Date",!0);R("d",0,"do","day"),R("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),R("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),R("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),W("d",yd),W("e",yd),W("E",yd),W("dd",function(a,b){return b.weekdaysMinRegex(a)}),W("ddd",function(a,b){return b.weekdaysShortRegex(a)}),W("dddd",function(a,b){return b.weekdaysRegex(a)}),_(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),_(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),re="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),se="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),te=Jd,ue=Jd,ve=Jd;R("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),W("DDD",Bd),W("DDDD",vd),$(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),R("H",["HH",2],0,"hour"),R("h",["hh",2],0,oc),R("k",["kk",2],0,pc),R("hmm",0,0,function(){return""+oc.apply(this)+Q(this.minutes(),2)}),R("hmmss",0,0,function(){return""+oc.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),qc("a",!0),qc("A",!1),J("hour","h"),W("a",rc),W("A",rc),W("H",yd),W("h",yd),W("HH",yd,ud),W("hh",yd,ud),W("hmm",zd),W("hmmss",Ad),W("Hmm",zd),W("Hmmss",Ad),$(["H","HH"],Pd),$(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),$(["h","hh"],function(a,b,c){b[Pd]=r(a),j(c).bigHour=!0}),$("hmm",function(a,b,c){var d=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d)),j(c).bigHour=!0}),$("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d,2)),b[Rd]=r(a.substr(e)),j(c).bigHour=!0}),$("Hmm",function(a,b,c){var d=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d))}),$("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d,2)),b[Rd]=r(a.substr(e))});var we=/[ap]\.?m?\.?/i,xe=M("Hours",!0);R("m",["mm",2],0,"minute"),J("minute","m"),W("m",yd),W("mm",yd,ud),$(["m","mm"],Qd);var ye=M("Minutes",!1);R("s",["ss",2],0,"second"),J("second","s"),W("s",yd),W("ss",yd,ud),$(["s","ss"],Rd);var ze=M("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return 10*this.millisecond()}),R(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),R(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),R(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),R(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),R(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),J("millisecond","ms"),W("S",Bd,td),W("SS",Bd,ud),W("SSS",Bd,vd);var Ae;for(Ae="SSSS";Ae.length<=9;Ae+="S")W(Ae,Ed);for(Ae="S";Ae.length<=9;Ae+="S")$(Ae,uc);var Be=M("Milliseconds",!1);R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var Ce=o.prototype;Ce.add=le,Ce.calendar=kb,Ce.clone=lb,Ce.diff=sb,Ce.endOf=Eb,Ce.format=wb,Ce.from=xb,Ce.fromNow=yb,Ce.to=zb,Ce.toNow=Ab,Ce.get=P,Ce.invalidAt=Nb,Ce.isAfter=mb,Ce.isBefore=nb,Ce.isBetween=ob,Ce.isSame=pb,Ce.isSameOrAfter=qb,Ce.isSameOrBefore=rb,Ce.isValid=Lb,Ce.lang=ne,Ce.locale=Bb,Ce.localeData=Cb,Ce.max=ge,Ce.min=fe,Ce.parsingFlags=Mb,Ce.set=P,Ce.startOf=Db,Ce.subtract=me,Ce.toArray=Ib,Ce.toObject=Jb,Ce.toDate=Hb,Ce.toISOString=vb,Ce.toJSON=Kb,Ce.toString=ub,Ce.unix=Gb,Ce.valueOf=Fb,Ce.creationData=Ob,Ce.year=ee,Ce.isLeapYear=ta,Ce.weekYear=Qb,Ce.isoWeekYear=Rb,Ce.quarter=Ce.quarters=Wb,Ce.month=ha,Ce.daysInMonth=ia,Ce.week=Ce.weeks=$b,Ce.isoWeek=Ce.isoWeeks=_b,Ce.weeksInYear=Tb,Ce.isoWeeksInYear=Sb,Ce.date=pe,Ce.day=Ce.days=gc,Ce.weekday=hc,Ce.isoWeekday=ic,Ce.dayOfYear=nc,Ce.hour=Ce.hours=xe,Ce.minute=Ce.minutes=ye,Ce.second=Ce.seconds=ze,Ce.millisecond=Ce.milliseconds=Be,Ce.utcOffset=Ua,Ce.utc=Wa,Ce.local=Xa,Ce.parseZone=Ya,Ce.hasAlignedHourOffset=Za,Ce.isDST=$a,Ce.isDSTShifted=_a,Ce.isLocal=ab,Ce.isUtcOffset=bb,Ce.isUtc=cb,Ce.isUTC=cb,Ce.zoneAbbr=vc,Ce.zoneName=wc,Ce.dates=u("dates accessor is deprecated. Use date instead.",pe),Ce.months=u("months accessor is deprecated. Use month instead",ha),Ce.years=u("years accessor is deprecated. Use year instead",ee),Ce.zone=u("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Va);var De=Ce,Ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Fe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ge="Invalid date",He="%d",Ie=/\d{1,2}/,Je={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Ke=A.prototype;Ke._calendar=Ee,Ke.calendar=zc,Ke._longDateFormat=Fe,Ke.longDateFormat=Ac,Ke._invalidDate=Ge,Ke.invalidDate=Bc,Ke._ordinal=He,Ke.ordinal=Cc,Ke._ordinalParse=Ie,Ke.preparse=Dc,Ke.postformat=Dc,Ke._relativeTime=Je,Ke.relativeTime=Ec,Ke.pastFuture=Fc,Ke.set=y,Ke.months=ca,Ke._months=Wd,Ke.monthsShort=da,Ke._monthsShort=Xd,Ke.monthsParse=fa,Ke._monthsRegex=Zd,Ke.monthsRegex=ka,Ke._monthsShortRegex=Yd,Ke.monthsShortRegex=ja,Ke.week=Xb,Ke._week=oe,Ke.firstDayOfYear=Zb,Ke.firstDayOfWeek=Yb,Ke.weekdays=bc,Ke._weekdays=qe,Ke.weekdaysMin=dc,Ke._weekdaysMin=se,Ke.weekdaysShort=cc,Ke._weekdaysShort=re,Ke.weekdaysParse=fc,Ke._weekdaysRegex=te,Ke.weekdaysRegex=jc,Ke._weekdaysShortRegex=ue,Ke.weekdaysShortRegex=kc,Ke._weekdaysMinRegex=ve,Ke.weekdaysMinRegex=lc,Ke.isPM=sc,Ke._meridiemParse=we,Ke.meridiem=tc,E("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=u("moment.lang is deprecated. Use moment.locale instead.",E),a.langData=u("moment.langData is deprecated. Use moment.localeData instead.",H);var Le=Math.abs,Me=Yc("ms"),Ne=Yc("s"),Oe=Yc("m"),Pe=Yc("h"),Qe=Yc("d"),Re=Yc("w"),Se=Yc("M"),Te=Yc("y"),Ue=$c("milliseconds"),Ve=$c("seconds"),We=$c("minutes"),Xe=$c("hours"),Ye=$c("days"),Ze=$c("months"),$e=$c("years"),_e=Math.round,af={s:45,m:45,h:22,d:26,M:11},bf=Math.abs,cf=Oa.prototype;cf.abs=Oc,cf.add=Qc,cf.subtract=Rc,cf.as=Wc,cf.asMilliseconds=Me,cf.asSeconds=Ne,cf.asMinutes=Oe,cf.asHours=Pe,cf.asDays=Qe,cf.asWeeks=Re,cf.asMonths=Se,cf.asYears=Te,cf.valueOf=Xc,cf._bubble=Tc,cf.get=Zc,cf.milliseconds=Ue,cf.seconds=Ve,cf.minutes=We,cf.hours=Xe,cf.days=Ye,cf.weeks=_c,cf.months=Ze,cf.years=$e,cf.humanize=dd,cf.toISOString=ed,cf.toString=ed,cf.toJSON=ed,cf.locale=Bb,cf.localeData=Cb,cf.toIsoString=u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ed),cf.lang=ne,R("X",0,0,"unix"),R("x",0,0,"valueOf"),W("x",Fd),W("X",Id),$("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),$("x",function(a,b,c){c._d=new Date(r(a))}),a.version="2.13.0",b(Ka),a.fn=De,a.min=Ma,a.max=Na,a.now=he,a.utc=h,a.unix=xc,a.months=Jc,a.isDate=d,a.locale=E,a.invalid=l,a.duration=db,a.isMoment=p,a.weekdays=Lc,a.parseZone=yc,a.localeData=H,a.isDuration=Pa,a.monthsShort=Kc,a.weekdaysMin=Nc,a.defineLocale=F,a.updateLocale=G,a.locales=I,a.weekdaysShort=Mc,a.normalizeUnits=K,a.relativeTimeThreshold=cd,a.prototype=De;var df=a;return df}); -------------------------------------------------------------------------------- /website/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Date Range Picker for Bootstrap 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 81 | 82 |
83 |
84 |
85 |
86 | 87 |

Date Range Picker

88 |

89 | A JavaScript component for choosing date ranges. 90 |
91 | Designed to work with the Bootstrap CSS framework. 92 |

93 | 94 |
95 |
96 | 97 | View on GitHub 98 | 99 |   100 | 101 | Download ZIP 102 | 103 |

104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 |
112 |
113 |
114 |
115 | 116 |
117 |
118 | 119 | 152 | 153 |
154 | 155 |
156 | 157 |

158 | Originally built for reporting at Improvely, 159 | the Date Range Picker can be attached to any webpage element to pop up two calendars 160 | for selecting dates, times, or from predefined ranges like "Last 30 Days". 161 |

162 | 163 | 164 | 165 |
166 | 167 |
168 | 169 |

Usage

170 | 171 |

172 | Date Range Picker relies on Bootstrap, jQuery and Moment.js. 173 | 174 | Include the required scripts and stylesheet in your page: 175 |

176 | 177 | 178 | 179 |

Then attach the picker to the element you want to trigger it:

180 | 181 | 182 | 183 |
184 | 185 |

186 | You can customize Date Range Picker with options, and 187 | get notified when the user chooses new dates by providing a callback function. 188 |

189 | 190 | 191 | 192 |
193 | 194 |
195 | 196 |

Examples

197 | 198 |
199 | 200 |

Date Range Picker

201 | 202 |

203 | The Date Range Picker is attached to a text input. It will use the current 204 | value of the input to initialize, and update the input if new dates are chosen. 205 |

206 | 207 |
208 |
209 | 210 |
211 |
212 |

Demo:

213 | 214 |
215 |
216 | 217 | 222 | 223 |
224 | 225 |
226 | 227 |

Date and Time

228 | 229 |

230 | The Date Range Picker can also be used to select times. Hour, minute and (optional) 231 | second dropdowns are added below the calendars. An option exists to set the increment 232 | count of the minutes dropdown to e.g. offer only 15-minute or 30-minute increments. 233 |

234 | 235 |
236 |
237 | 238 |
239 |
240 |

Demo:

241 | 242 |
243 |
244 | 245 | 256 | 257 |
258 | 259 |
260 | 261 |

Single Date Picker

262 | 263 |

264 | The Date Range Picker can be turned into a single date picker widget with only 265 | one calendar. In this example, dropdowns to select a month and year have also 266 | been enabled at the top of the calendar to quickly jump to different months. 267 |

268 | 269 |
270 |
271 | 272 |
273 |
274 |

Demo:

275 | 276 |
277 |
278 | 279 | 291 | 292 |
293 | 294 |
295 | 296 |

Predefined Ranges

297 | 298 |

299 | This example shows the option to predefine date ranges that 300 | the user can choose from a list. 301 |

302 | 303 |
304 |
305 | 306 |
307 |
308 |

Demo:

309 |
310 |   311 | 312 |
313 |
314 |
315 | 316 | 343 | 344 |
345 | 346 |
347 | 348 |

Input Initially Empty

349 | 350 |

351 | If you're using a date range as a filter, you may want to attach a picker to an 352 | input but leave it empty by default. This example shows how to accomplish that 353 | using the autoUpdateInput setting, and the apply and 354 | cancel events. 355 |

356 | 357 |
358 |
359 | 360 |
361 |
362 |

Demo:

363 | 364 |
365 |
366 | 367 | 368 |
369 | 370 | 390 | 391 |
392 | 393 | 394 | 395 |
396 | 397 |

Configuration Generator

398 | 399 |
400 | 401 |
402 |
403 | 404 |
405 | 406 |
407 | 408 | 409 |
410 | 411 |
412 | 413 | 414 |
415 | 416 |
417 | 418 | 419 |
420 | 421 |
422 | 423 | 424 |
425 | 426 |
427 | 428 | 429 |
430 | 431 |
432 |
433 | 434 |
435 | 438 |
439 | 440 |
441 | 444 |
445 | 446 |
447 | 450 |
451 | 452 |
453 | 456 |
457 | 458 |
459 | 462 |
463 | 464 |
465 | 468 |
469 | 470 |
471 | 474 |
475 | 476 |
477 | 478 | 479 |
480 | 481 |
482 | 485 |
486 | 487 |
488 | 491 |
492 | 493 |
494 | 497 |
498 | 499 |
500 | 503 | 506 |
507 | 508 |
509 | 512 |
513 | 514 |
515 | 518 |
519 | 520 |
521 |
522 | 523 |
524 | 527 |
528 | 529 |
530 | 533 |
534 | 535 |
536 | 539 |
540 | 541 |
542 | 543 | 548 |
549 | 550 |
551 | 552 | 556 |
557 | 558 |
559 | 560 | 561 |
562 | 563 |
564 | 565 | 566 |
567 | 568 |
569 | 570 | 571 |
572 | 573 |
574 | 575 |
576 |
577 |
578 | 579 |
580 | 581 |
582 |

Your Date Range Picker

583 | 584 | 585 |
586 | 587 |
588 |

Configuration

589 | 590 |
591 | 592 |
593 |
594 | 595 |
596 | 597 |
598 | 599 |
600 | 601 |

Options

602 | 603 |
    604 |
  • 605 | startDate (Date object, moment object or string) The start of the initially selected date range 606 |
  • 607 |
  • 608 | endDate: (Date object, moment object or string) The end of the initially selected date range 609 |
  • 610 |
  • 611 | minDate: (Date object, moment object or string) The earliest date a user may select 612 |
  • 613 |
  • 614 | maxDate: (Date object, moment object or string) The latest date a user may select 615 |
  • 616 |
  • 617 | dateLimit: (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) 618 |
  • 619 |
  • 620 | showDropdowns: (boolean) Show year and month select boxes above calendars to jump to a specific month and year 621 |
  • 622 |
  • 623 | showWeekNumbers: (boolean) Show localized week numbers at the start of each week on the calendars 624 |
  • 625 |
  • 626 | showISOWeekNumbers: (boolean) Show ISO week numbers at the start of each week on the calendars 627 |
  • 628 |
  • 629 | timePicker: (boolean) Allow selection of dates with times, not just dates 630 |
  • 631 |
  • 632 | timePickerIncrement: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30) 633 |
  • 634 |
  • 635 | timePicker24Hour: (boolean) Use 24-hour instead of 12-hour times, removing the AM/PM selection 636 |
  • 637 |
  • 638 | timePickerSeconds: (boolean) Show seconds in the timePicker 639 |
  • 640 |
  • 641 | ranges: (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 642 |
  • 643 |
  • 644 | showCustomRangeLabel: (boolean) Displays an item labeled "Custom Range" at 645 | the end of the list of predefined ranges, when the ranges option is used. 646 | This option will be highlighted whenever the current date range selection does not match 647 | one of the predefined ranges. Clicking it will display the calendars to select a new range. 648 |
  • 649 |
  • 650 | alwaysShowCalendars: (boolean) Normally, if you use the ranges 651 | 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. 652 |
  • 653 | 654 | 655 |
  • 656 | inline: (boolean) When enabled, it will append the picker inline on parentEl 657 |
  • 658 | 659 | 660 |
  • 661 | opens: (string: 'left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to 662 |
  • 663 |
  • 664 | drops: (string: 'down' or 'up') Whether the picker appears below (default) or above the HTML element it's attached to 665 |
  • 666 |
  • 667 | buttonClasses: (array) CSS class names that will be added to all buttons in the picker 668 |
  • 669 |
  • 670 | applyClass: (string) CSS class string that will be added to the apply button 671 |
  • 672 |
  • 673 | cancelClass: (string) CSS class string that will be added to the cancel button 674 |
  • 675 |
  • 676 | locale: (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. 677 | Check off "locale (with example settings)" in the configuration generator to see how 678 | to customize these options. 679 |
  • 680 |
  • 681 | singleDatePicker: (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 682 |
  • 683 |
  • 684 | autoApply: (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 685 |
  • 686 |
  • 687 | linkedCalendars: (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. 688 |
  • 689 |
  • 690 | isInvalidDate: (function) A function that is passed each date in the two 691 | calendars before they are displayed, and may return true or false to indicate whether 692 | that date should be available for selection or not. 693 |
  • 694 |
  • 695 | isCustomDate: (function) A function that is passed each date in the two 696 | calendars before they are displayed, and may return a string or array of CSS class names 697 | to apply to that date's calendar cell. 698 |
  • 699 |
  • 700 | autoUpdateInput: (boolean) Indicates whether the date range picker should 701 | automatically update the value of an <input> element it's attached to 702 | at initialization and when the selected dates change. 703 |
  • 704 |
  • 705 | parentEl: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body' 706 |
  • 707 |
708 | 709 |
710 | 711 |
712 | 713 |

Methods

714 | 715 |

716 | You can programmatically update the startDate and endDate 717 | in the picker using the setStartDate and setEndDate methods. 718 | You can access the Date Range Picker object and its functions and properties through 719 | data properties of the element you attached it to. 720 |

721 | 722 | 723 | 724 |
725 | 726 |
    727 |
  • 728 | setStartDate(Date/moment/string): Sets the date range picker's currently selected start date to the provided date 729 |
  • 730 |
  • 731 | setEndDate(Date/moment/string): Sets the date range picker's currently selected end date to the provided date 732 |
  • 733 |
734 | 735 |

Example usage:

736 | 737 | 738 | 739 |
740 | 741 |
742 | 743 |

Events

744 | 745 |

746 | Several events are triggered on the element you attach the picker to, which you can listen for. 747 |

748 | 749 |
    750 |
  • 751 | show.daterangepicker: Triggered when the picker is shown 752 |
  • 753 |
  • 754 | hide.daterangepicker: Triggered when the picker is hidden 755 |
  • 756 |
  • 757 | showCalendar.daterangepicker: Triggered when the calendar(s) are shown 758 |
  • 759 |
  • 760 | hideCalendar.daterangepicker: Triggered when the calendar(s) are hidden 761 |
  • 762 |
  • 763 | apply.daterangepicker: Triggered when the apply button is clicked, 764 | or when a predefined range is clicked 765 |
  • 766 |
  • 767 | cancel.daterangepicker: Triggered when the cancel button is clicked 768 |
  • 769 |
770 | 771 |

772 | 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: 773 |

774 | 775 | 776 | 777 |
778 | 779 |

780 | 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: 781 |

782 | 783 | 784 | 785 |
786 | 787 |
788 | 789 |

License

790 | 791 |

The MIT License (MIT)

792 | 793 |

Copyright (c) 2012-2015 Dan Grossman

794 | 795 |

796 | 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: 797 |

798 | 799 |

800 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 801 |

802 | 803 |

804 | 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. 805 |

806 | 807 |
808 | 809 |
810 | 811 |

Comments

812 | 813 |
814 | 829 | 830 | 831 |
832 | 833 |
834 | 835 |
836 |
837 | 838 | 839 | 840 | 843 | 846 | 847 | 848 | 853 | 854 | 857 | 858 | 859 | 865 | 866 | 867 | 868 | --------------------------------------------------------------------------------