From cd8bd3f5cc9ece0bbf3fd245184c209483137bce Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 19 Feb 2017 21:38:13 +0200 Subject: [PATCH] Fix for #1352 --- bower.json | 2 +- public/css/daterangepicker.css | 2 +- public/css/daterangepicker.css.map | 2 +- public/js/daterangepicker.min.js | 4 ++-- public/js/daterangepicker.min.js.map | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index dbf7d9f25b..7b80af7445 100644 --- a/bower.json +++ b/bower.json @@ -29,7 +29,7 @@ "fuse.js": "~2.0.2", "dropzone": "~4.3.0", "nouislider": "~8.5.1", - "bootstrap-daterangepicker": "~2.1.24", + "bootstrap-daterangepicker": "~2.1.25", "sweetalert2": "^5.3.8", "jSignature": "brinley/jSignature#^2.1.0", "select2": "select2-dist#^4.0.3", diff --git a/public/css/daterangepicker.css b/public/css/daterangepicker.css index 199333f7e2..6df5d9952b 100644 --- a/public/css/daterangepicker.css +++ b/public/css/daterangepicker.css @@ -1,2 +1,2 @@ -.daterangepicker.single .calendar,.daterangepicker.single .ranges,.ranges{float:none}.daterangepicker{position:absolute;color:inherit;background:#fff;border-radius:4px;width:278px;padding:4px;margin-top:1px;top:100px;left:20px}.daterangepicker:after,.daterangepicker:before{position:absolute;display:inline-block;content:''}.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc}.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent}.daterangepicker.opensleft:before{right:9px}.daterangepicker.opensleft:after{right:10px}.daterangepicker.openscenter:after,.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.opensright:before{left:9px}.daterangepicker.opensright:after{left:10px}.daterangepicker.dropup{margin-top:-5px}.daterangepicker.dropup:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc}.daterangepicker.dropup:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff}.daterangepicker.dropdown-menu{max-width:none;z-index:3001}.daterangepicker.show-calendar .calendar{display:block}.daterangepicker .calendar{display:none;max-width:270px;margin:4px}.daterangepicker .calendar.single .calendar-table{border:none}.daterangepicker .calendar td,.daterangepicker .calendar th{white-space:nowrap;text-align:center;min-width:32px}.daterangepicker .calendar-table{border:1px solid #fff;padding:4px;border-radius:4px;background:#fff}.daterangepicker table{width:100%;margin:0}.daterangepicker td,.daterangepicker th{text-align:center;width:20px;height:20px;border-radius:4px;border:1px solid transparent;white-space:nowrap;cursor:pointer}.daterangepicker td.available:hover,.daterangepicker th.available:hover{background-color:#eee;border-color:transparent;color:inherit}.daterangepicker td.week,.daterangepicker th.week{font-size:80%;color:#ccc}.daterangepicker td.off,.daterangepicker td.off.end-date,.daterangepicker td.off.in-range,.daterangepicker td.off.start-date{background-color:#fff;border-color:transparent;color:#999}.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#000;border-radius:0}.daterangepicker td.start-date{border-radius:4px 0 0 4px}.daterangepicker td.end-date{border-radius:0 4px 4px 0}.daterangepicker td.start-date.end-date{border-radius:4px}.daterangepicker td.active,.daterangepicker td.active:hover{background-color:#357ebd;border-color:transparent;color:#fff}.daterangepicker th.month{width:auto}.daterangepicker option.disabled,.daterangepicker td.disabled{color:#999;cursor:not-allowed;text-decoration:line-through}.daterangepicker select.monthselect,.daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default}.daterangepicker select.monthselect{margin-right:2%;width:56%}.daterangepicker select.yearselect{width:40%}.daterangepicker select.ampmselect,.daterangepicker select.hourselect,.daterangepicker select.minuteselect,.daterangepicker select.secondselect{width:50px;margin-bottom:0}.daterangepicker .input-mini{border:1px solid #ccc;border-radius:4px;color:#555;height:30px;line-height:30px;display:block;vertical-align:middle;margin:0 0 5px;padding:0 6px 0 28px;width:100%}.daterangepicker .input-mini.active{border:1px solid #08c;border-radius:4px}.daterangepicker .daterangepicker_input{position:relative}.daterangepicker .daterangepicker_input i{position:absolute;left:8px;top:8px}.daterangepicker.rtl .input-mini{padding-right:28px;padding-left:6px}.daterangepicker.rtl .daterangepicker_input i{left:auto;right:8px}.daterangepicker .calendar-time{text-align:center;margin:5px auto;line-height:30px;position:relative;padding-left:28px}.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed}.ranges{font-size:11px;margin:4px;text-align:left}.ranges ul{list-style:none;margin:0 auto;padding:0;width:100%}.ranges li{font-size:13px;background:#f5f5f5;border:1px solid #f5f5f5;border-radius:4px;color:#08c;padding:3px 12px;margin-bottom:8px;cursor:pointer}.ranges li.active,.ranges li:hover{background:#08c;border:1px solid #08c;color:#fff}@media (min-width:564px){.daterangepicker.ltr .calendar.right .calendar-table,.daterangepicker.rtl .calendar.left .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker.ltr .calendar.left .calendar-table,.daterangepicker.rtl .calendar.right .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker{width:auto}.daterangepicker .ranges ul{width:160px}.daterangepicker.single .ranges ul{width:100%}.daterangepicker.single .calendar.left{clear:none}.daterangepicker.single.ltr .calendar,.daterangepicker.single.ltr .ranges{float:left}.daterangepicker.single.rtl .calendar,.daterangepicker.single.rtl .ranges{float:right}.daterangepicker.ltr{direction:ltr;text-align:left}.daterangepicker.ltr .calendar.left{clear:left;margin-right:0}.daterangepicker.ltr .calendar.right{margin-left:0}.daterangepicker.ltr .calendar.left .calendar-table,.daterangepicker.ltr .left .daterangepicker_input{padding-right:12px}.daterangepicker.ltr .calendar,.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl{direction:rtl;text-align:right}.daterangepicker.rtl .calendar.left{clear:right;margin-left:0}.daterangepicker.rtl .calendar.right{margin-right:0}.daterangepicker.rtl .calendar.left .calendar-table,.daterangepicker.rtl .left .daterangepicker_input{padding-left:12px}.daterangepicker.rtl .calendar,.daterangepicker.rtl .ranges{text-align:right;float:right}}@media (min-width:730px){.daterangepicker .ranges{width:auto}.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl .ranges{float:right}.daterangepicker .calendar.left{clear:none!important}} +.daterangepicker.single .calendar,.daterangepicker.single .ranges,.ranges{float:none}.daterangepicker{position:absolute;color:inherit;background-color:#fff;border-radius:4px;width:278px;padding:4px;margin-top:1px;top:100px;left:20px}.daterangepicker:after,.daterangepicker:before{position:absolute;display:inline-block;content:''}.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc}.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent}.daterangepicker.opensleft:before{right:9px}.daterangepicker.opensleft:after{right:10px}.daterangepicker.openscenter:after,.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.opensright:before{left:9px}.daterangepicker.opensright:after{left:10px}.daterangepicker.dropup{margin-top:-5px}.daterangepicker.dropup:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc}.daterangepicker.dropup:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff}.daterangepicker.dropdown-menu{max-width:none;z-index:3001}.daterangepicker.show-calendar .calendar{display:block}.daterangepicker .calendar{display:none;max-width:270px;margin:4px}.daterangepicker .calendar.single .calendar-table{border:none}.daterangepicker .calendar td,.daterangepicker .calendar th{white-space:nowrap;text-align:center;min-width:32px}.daterangepicker .calendar-table{border:1px solid #fff;padding:4px;border-radius:4px;background-color:#fff}.daterangepicker table{width:100%;margin:0}.daterangepicker td,.daterangepicker th{text-align:center;width:20px;height:20px;border-radius:4px;border:1px solid transparent;white-space:nowrap;cursor:pointer}.daterangepicker td.available:hover,.daterangepicker th.available:hover{background-color:#eee;border-color:transparent;color:inherit}.daterangepicker td.week,.daterangepicker th.week{font-size:80%;color:#ccc}.daterangepicker td.off,.daterangepicker td.off.end-date,.daterangepicker td.off.in-range,.daterangepicker td.off.start-date{background-color:#fff;border-color:transparent;color:#999}.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#000;border-radius:0}.daterangepicker td.start-date{border-radius:4px 0 0 4px}.daterangepicker td.end-date{border-radius:0 4px 4px 0}.daterangepicker td.start-date.end-date{border-radius:4px}.daterangepicker td.active,.daterangepicker td.active:hover{background-color:#357ebd;border-color:transparent;color:#fff}.daterangepicker th.month{width:auto}.daterangepicker option.disabled,.daterangepicker td.disabled{color:#999;cursor:not-allowed;text-decoration:line-through}.daterangepicker select.monthselect,.daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default}.daterangepicker select.monthselect{margin-right:2%;width:56%}.daterangepicker select.yearselect{width:40%}.daterangepicker select.ampmselect,.daterangepicker select.hourselect,.daterangepicker select.minuteselect,.daterangepicker select.secondselect{width:50px;margin-bottom:0}.daterangepicker .input-mini{border:1px solid #ccc;border-radius:4px;color:#555;height:30px;line-height:30px;display:block;vertical-align:middle;margin:0 0 5px;padding:0 6px 0 28px;width:100%}.daterangepicker .input-mini.active{border:1px solid #08c;border-radius:4px}.daterangepicker .daterangepicker_input{position:relative}.daterangepicker .daterangepicker_input i{position:absolute;left:8px;top:8px}.daterangepicker.rtl .input-mini{padding-right:28px;padding-left:6px}.daterangepicker.rtl .daterangepicker_input i{left:auto;right:8px}.daterangepicker .calendar-time{text-align:center;margin:5px auto;line-height:30px;position:relative;padding-left:28px}.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed}.ranges{font-size:11px;margin:4px;text-align:left}.ranges ul{list-style:none;margin:0 auto;padding:0;width:100%}.ranges li{font-size:13px;background-color:#f5f5f5;border:1px solid #f5f5f5;border-radius:4px;color:#08c;padding:3px 12px;margin-bottom:8px;cursor:pointer}.ranges li.active,.ranges li:hover{background-color:#08c;border:1px solid #08c;color:#fff}@media (min-width:564px){.daterangepicker.ltr .calendar.right .calendar-table,.daterangepicker.rtl .calendar.left .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker.ltr .calendar.left .calendar-table,.daterangepicker.rtl .calendar.right .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker{width:auto}.daterangepicker .ranges ul{width:160px}.daterangepicker.single .ranges ul{width:100%}.daterangepicker.single .calendar.left{clear:none}.daterangepicker.single.ltr .calendar,.daterangepicker.single.ltr .ranges{float:left}.daterangepicker.single.rtl .calendar,.daterangepicker.single.rtl .ranges{float:right}.daterangepicker.ltr{direction:ltr;text-align:left}.daterangepicker.ltr .calendar.left{clear:left;margin-right:0}.daterangepicker.ltr .calendar.right{margin-left:0}.daterangepicker.ltr .calendar.left .calendar-table,.daterangepicker.ltr .left .daterangepicker_input{padding-right:12px}.daterangepicker.ltr .calendar,.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl{direction:rtl;text-align:right}.daterangepicker.rtl .calendar.left{clear:right;margin-left:0}.daterangepicker.rtl .calendar.right{margin-right:0}.daterangepicker.rtl .calendar.left .calendar-table,.daterangepicker.rtl .left .daterangepicker_input{padding-left:12px}.daterangepicker.rtl .calendar,.daterangepicker.rtl .ranges{text-align:right;float:right}}@media (min-width:730px){.daterangepicker .ranges{width:auto}.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl .ranges{float:right}.daterangepicker .calendar.left{clear:none!important}} /*# sourceMappingURL=daterangepicker.css.map */ diff --git a/public/css/daterangepicker.css.map b/public/css/daterangepicker.css.map index 54e1ee9685..151509d846 100644 --- a/public/css/daterangepicker.css.map +++ b/public/css/daterangepicker.css.map @@ -1 +1 @@ -{"version":3,"sources":["daterangepicker.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"daterangepicker.css","sourcesContent":[".daterangepicker {\n position: absolute;\n color: inherit;\n background: #fff;\n border-radius: 4px;\n width: 278px;\n padding: 4px;\n margin-top: 1px;\n top: 100px;\n left: 20px;\n /* Calendars */ }\n .daterangepicker:before, .daterangepicker:after {\n position: absolute;\n display: inline-block;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n content: ''; }\n .daterangepicker:before {\n top: -7px;\n border-right: 7px solid transparent;\n border-left: 7px solid transparent;\n border-bottom: 7px solid #ccc; }\n .daterangepicker:after {\n top: -6px;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #fff;\n border-left: 6px solid transparent; }\n .daterangepicker.opensleft:before {\n right: 9px; }\n .daterangepicker.opensleft:after {\n right: 10px; }\n .daterangepicker.openscenter:before {\n left: 0;\n right: 0;\n width: 0;\n margin-left: auto;\n margin-right: auto; }\n .daterangepicker.openscenter:after {\n left: 0;\n right: 0;\n width: 0;\n margin-left: auto;\n margin-right: auto; }\n .daterangepicker.opensright:before {\n left: 9px; }\n .daterangepicker.opensright:after {\n left: 10px; }\n .daterangepicker.dropup {\n margin-top: -5px; }\n .daterangepicker.dropup:before {\n top: initial;\n bottom: -7px;\n border-bottom: initial;\n border-top: 7px solid #ccc; }\n .daterangepicker.dropup:after {\n top: initial;\n bottom: -6px;\n border-bottom: initial;\n border-top: 6px solid #fff; }\n .daterangepicker.dropdown-menu {\n max-width: none;\n z-index: 3001; }\n .daterangepicker.single .ranges, .daterangepicker.single .calendar {\n float: none; }\n .daterangepicker.show-calendar .calendar {\n display: block; }\n .daterangepicker .calendar {\n display: none;\n max-width: 270px;\n margin: 4px; }\n .daterangepicker .calendar.single .calendar-table {\n border: none; }\n .daterangepicker .calendar th, .daterangepicker .calendar td {\n white-space: nowrap;\n text-align: center;\n min-width: 32px; }\n .daterangepicker .calendar-table {\n border: 1px solid #fff;\n padding: 4px;\n border-radius: 4px;\n background: #fff; }\n .daterangepicker table {\n width: 100%;\n margin: 0; }\n .daterangepicker td, .daterangepicker th {\n text-align: center;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid transparent;\n white-space: nowrap;\n cursor: pointer; }\n .daterangepicker td.available:hover, .daterangepicker th.available:hover {\n background-color: #eee;\n border-color: transparent;\n color: inherit; }\n .daterangepicker td.week, .daterangepicker th.week {\n font-size: 80%;\n color: #ccc; }\n .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {\n background-color: #fff;\n border-color: transparent;\n color: #999; }\n .daterangepicker td.in-range {\n background-color: #ebf4f8;\n border-color: transparent;\n color: #000;\n border-radius: 0; }\n .daterangepicker td.start-date {\n border-radius: 4px 0 0 4px; }\n .daterangepicker td.end-date {\n border-radius: 0 4px 4px 0; }\n .daterangepicker td.start-date.end-date {\n border-radius: 4px; }\n .daterangepicker td.active, .daterangepicker td.active:hover {\n background-color: #357ebd;\n border-color: transparent;\n color: #fff; }\n .daterangepicker th.month {\n width: auto; }\n .daterangepicker td.disabled, .daterangepicker option.disabled {\n color: #999;\n cursor: not-allowed;\n text-decoration: line-through; }\n .daterangepicker select.monthselect, .daterangepicker select.yearselect {\n font-size: 12px;\n padding: 1px;\n height: auto;\n margin: 0;\n cursor: default; }\n .daterangepicker select.monthselect {\n margin-right: 2%;\n width: 56%; }\n .daterangepicker select.yearselect {\n width: 40%; }\n .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {\n width: 50px;\n margin-bottom: 0; }\n .daterangepicker .input-mini {\n border: 1px solid #ccc;\n border-radius: 4px;\n color: #555;\n height: 30px;\n line-height: 30px;\n display: block;\n vertical-align: middle;\n margin: 0 0 5px 0;\n padding: 0 6px 0 28px;\n width: 100%; }\n .daterangepicker .input-mini.active {\n border: 1px solid #08c;\n border-radius: 4px; }\n .daterangepicker .daterangepicker_input {\n position: relative; }\n .daterangepicker .daterangepicker_input i {\n position: absolute;\n left: 8px;\n top: 8px; }\n .daterangepicker.rtl .input-mini {\n padding-right: 28px;\n padding-left: 6px; }\n .daterangepicker.rtl .daterangepicker_input i {\n left: auto;\n right: 8px; }\n .daterangepicker .calendar-time {\n text-align: center;\n margin: 5px auto;\n line-height: 30px;\n position: relative;\n padding-left: 28px; }\n .daterangepicker .calendar-time select.disabled {\n color: #ccc;\n cursor: not-allowed; }\n\n.ranges {\n font-size: 11px;\n float: none;\n margin: 4px;\n text-align: left; }\n .ranges ul {\n list-style: none;\n margin: 0 auto;\n padding: 0;\n width: 100%; }\n .ranges li {\n font-size: 13px;\n background: #f5f5f5;\n border: 1px solid #f5f5f5;\n border-radius: 4px;\n color: #08c;\n padding: 3px 12px;\n margin-bottom: 8px;\n cursor: pointer; }\n .ranges li:hover {\n background: #08c;\n border: 1px solid #08c;\n color: #fff; }\n .ranges li.active {\n background: #08c;\n border: 1px solid #08c;\n color: #fff; }\n\n/* Larger Screen Styling */\n@media (min-width: 564px) {\n .daterangepicker {\n width: auto; }\n .daterangepicker .ranges ul {\n width: 160px; }\n .daterangepicker.single .ranges ul {\n width: 100%; }\n .daterangepicker.single .calendar.left {\n clear: none; }\n .daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .calendar {\n float: left; }\n .daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .calendar {\n float: right; }\n .daterangepicker.ltr {\n direction: ltr;\n text-align: left; }\n .daterangepicker.ltr .calendar.left {\n clear: left;\n margin-right: 0; }\n .daterangepicker.ltr .calendar.left .calendar-table {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .daterangepicker.ltr .calendar.right {\n margin-left: 0; }\n .daterangepicker.ltr .calendar.right .calendar-table {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n .daterangepicker.ltr .left .daterangepicker_input {\n padding-right: 12px; }\n .daterangepicker.ltr .calendar.left .calendar-table {\n padding-right: 12px; }\n .daterangepicker.ltr .ranges, .daterangepicker.ltr .calendar {\n float: left; }\n .daterangepicker.rtl {\n direction: rtl;\n text-align: right; }\n .daterangepicker.rtl .calendar.left {\n clear: right;\n margin-left: 0; }\n .daterangepicker.rtl .calendar.left .calendar-table {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n .daterangepicker.rtl .calendar.right {\n margin-right: 0; }\n .daterangepicker.rtl .calendar.right .calendar-table {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .daterangepicker.rtl .left .daterangepicker_input {\n padding-left: 12px; }\n .daterangepicker.rtl .calendar.left .calendar-table {\n padding-left: 12px; }\n .daterangepicker.rtl .ranges, .daterangepicker.rtl .calendar {\n text-align: right;\n float: right; } }\n@media (min-width: 730px) {\n .daterangepicker .ranges {\n width: auto; }\n .daterangepicker.ltr .ranges {\n float: left; }\n .daterangepicker.rtl .ranges {\n float: right; }\n .daterangepicker .calendar.left {\n clear: none !important; } }\n"]} \ No newline at end of file +{"version":3,"sources":["daterangepicker.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"daterangepicker.css","sourcesContent":[".daterangepicker {\n position: absolute;\n color: inherit;\n background-color: #fff;\n border-radius: 4px;\n width: 278px;\n padding: 4px;\n margin-top: 1px;\n top: 100px;\n left: 20px;\n /* Calendars */ }\n .daterangepicker:before, .daterangepicker:after {\n position: absolute;\n display: inline-block;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n content: ''; }\n .daterangepicker:before {\n top: -7px;\n border-right: 7px solid transparent;\n border-left: 7px solid transparent;\n border-bottom: 7px solid #ccc; }\n .daterangepicker:after {\n top: -6px;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #fff;\n border-left: 6px solid transparent; }\n .daterangepicker.opensleft:before {\n right: 9px; }\n .daterangepicker.opensleft:after {\n right: 10px; }\n .daterangepicker.openscenter:before {\n left: 0;\n right: 0;\n width: 0;\n margin-left: auto;\n margin-right: auto; }\n .daterangepicker.openscenter:after {\n left: 0;\n right: 0;\n width: 0;\n margin-left: auto;\n margin-right: auto; }\n .daterangepicker.opensright:before {\n left: 9px; }\n .daterangepicker.opensright:after {\n left: 10px; }\n .daterangepicker.dropup {\n margin-top: -5px; }\n .daterangepicker.dropup:before {\n top: initial;\n bottom: -7px;\n border-bottom: initial;\n border-top: 7px solid #ccc; }\n .daterangepicker.dropup:after {\n top: initial;\n bottom: -6px;\n border-bottom: initial;\n border-top: 6px solid #fff; }\n .daterangepicker.dropdown-menu {\n max-width: none;\n z-index: 3001; }\n .daterangepicker.single .ranges, .daterangepicker.single .calendar {\n float: none; }\n .daterangepicker.show-calendar .calendar {\n display: block; }\n .daterangepicker .calendar {\n display: none;\n max-width: 270px;\n margin: 4px; }\n .daterangepicker .calendar.single .calendar-table {\n border: none; }\n .daterangepicker .calendar th, .daterangepicker .calendar td {\n white-space: nowrap;\n text-align: center;\n min-width: 32px; }\n .daterangepicker .calendar-table {\n border: 1px solid #fff;\n padding: 4px;\n border-radius: 4px;\n background-color: #fff; }\n .daterangepicker table {\n width: 100%;\n margin: 0; }\n .daterangepicker td, .daterangepicker th {\n text-align: center;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid transparent;\n white-space: nowrap;\n cursor: pointer; }\n .daterangepicker td.available:hover, .daterangepicker th.available:hover {\n background-color: #eee;\n border-color: transparent;\n color: inherit; }\n .daterangepicker td.week, .daterangepicker th.week {\n font-size: 80%;\n color: #ccc; }\n .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {\n background-color: #fff;\n border-color: transparent;\n color: #999; }\n .daterangepicker td.in-range {\n background-color: #ebf4f8;\n border-color: transparent;\n color: #000;\n border-radius: 0; }\n .daterangepicker td.start-date {\n border-radius: 4px 0 0 4px; }\n .daterangepicker td.end-date {\n border-radius: 0 4px 4px 0; }\n .daterangepicker td.start-date.end-date {\n border-radius: 4px; }\n .daterangepicker td.active, .daterangepicker td.active:hover {\n background-color: #357ebd;\n border-color: transparent;\n color: #fff; }\n .daterangepicker th.month {\n width: auto; }\n .daterangepicker td.disabled, .daterangepicker option.disabled {\n color: #999;\n cursor: not-allowed;\n text-decoration: line-through; }\n .daterangepicker select.monthselect, .daterangepicker select.yearselect {\n font-size: 12px;\n padding: 1px;\n height: auto;\n margin: 0;\n cursor: default; }\n .daterangepicker select.monthselect {\n margin-right: 2%;\n width: 56%; }\n .daterangepicker select.yearselect {\n width: 40%; }\n .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {\n width: 50px;\n margin-bottom: 0; }\n .daterangepicker .input-mini {\n border: 1px solid #ccc;\n border-radius: 4px;\n color: #555;\n height: 30px;\n line-height: 30px;\n display: block;\n vertical-align: middle;\n margin: 0 0 5px 0;\n padding: 0 6px 0 28px;\n width: 100%; }\n .daterangepicker .input-mini.active {\n border: 1px solid #08c;\n border-radius: 4px; }\n .daterangepicker .daterangepicker_input {\n position: relative; }\n .daterangepicker .daterangepicker_input i {\n position: absolute;\n left: 8px;\n top: 8px; }\n .daterangepicker.rtl .input-mini {\n padding-right: 28px;\n padding-left: 6px; }\n .daterangepicker.rtl .daterangepicker_input i {\n left: auto;\n right: 8px; }\n .daterangepicker .calendar-time {\n text-align: center;\n margin: 5px auto;\n line-height: 30px;\n position: relative;\n padding-left: 28px; }\n .daterangepicker .calendar-time select.disabled {\n color: #ccc;\n cursor: not-allowed; }\n\n.ranges {\n font-size: 11px;\n float: none;\n margin: 4px;\n text-align: left; }\n .ranges ul {\n list-style: none;\n margin: 0 auto;\n padding: 0;\n width: 100%; }\n .ranges li {\n font-size: 13px;\n background-color: #f5f5f5;\n border: 1px solid #f5f5f5;\n border-radius: 4px;\n color: #08c;\n padding: 3px 12px;\n margin-bottom: 8px;\n cursor: pointer; }\n .ranges li:hover {\n background-color: #08c;\n border: 1px solid #08c;\n color: #fff; }\n .ranges li.active {\n background-color: #08c;\n border: 1px solid #08c;\n color: #fff; }\n\n/* Larger Screen Styling */\n@media (min-width: 564px) {\n .daterangepicker {\n width: auto; }\n .daterangepicker .ranges ul {\n width: 160px; }\n .daterangepicker.single .ranges ul {\n width: 100%; }\n .daterangepicker.single .calendar.left {\n clear: none; }\n .daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .calendar {\n float: left; }\n .daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .calendar {\n float: right; }\n .daterangepicker.ltr {\n direction: ltr;\n text-align: left; }\n .daterangepicker.ltr .calendar.left {\n clear: left;\n margin-right: 0; }\n .daterangepicker.ltr .calendar.left .calendar-table {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .daterangepicker.ltr .calendar.right {\n margin-left: 0; }\n .daterangepicker.ltr .calendar.right .calendar-table {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n .daterangepicker.ltr .left .daterangepicker_input {\n padding-right: 12px; }\n .daterangepicker.ltr .calendar.left .calendar-table {\n padding-right: 12px; }\n .daterangepicker.ltr .ranges, .daterangepicker.ltr .calendar {\n float: left; }\n .daterangepicker.rtl {\n direction: rtl;\n text-align: right; }\n .daterangepicker.rtl .calendar.left {\n clear: right;\n margin-left: 0; }\n .daterangepicker.rtl .calendar.left .calendar-table {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n .daterangepicker.rtl .calendar.right {\n margin-right: 0; }\n .daterangepicker.rtl .calendar.right .calendar-table {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .daterangepicker.rtl .left .daterangepicker_input {\n padding-left: 12px; }\n .daterangepicker.rtl .calendar.left .calendar-table {\n padding-left: 12px; }\n .daterangepicker.rtl .ranges, .daterangepicker.rtl .calendar {\n text-align: right;\n float: right; } }\n@media (min-width: 730px) {\n .daterangepicker .ranges {\n width: auto; }\n .daterangepicker.ltr .ranges {\n float: left; }\n .daterangepicker.rtl .ranges {\n float: right; }\n .daterangepicker .calendar.left {\n clear: none !important; } }\n"]} \ No newline at end of file diff --git a/public/js/daterangepicker.min.js b/public/js/daterangepicker.min.js index 588eec199a..7cc0ab6326 100644 --- a/public/js/daterangepicker.min.js +++ b/public/js/daterangepicker.min.js @@ -1,3 +1,3 @@ -!function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery"],function(a,i){return t.daterangepicker=e(a,i)});else if("object"==typeof module&&module.exports){var a="undefined"!=typeof window?window.jQuery:void 0;a||(a=require("jquery"),a.fn||(a.fn={})),module.exports=e(require("moment"),a)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,function(t,e){var a=function(a,i,s){if(this.parentEl="body",this.element=e(a),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={direction:"ltr",format:"MM/DD/YYYY",separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof i&&null!==i||(i={}),i=e.extend(this.element.data(),i),"string"==typeof i.template||i.template instanceof e||(i.template=''),this.parentEl=e(i.parentEl&&e(i.parentEl).length?i.parentEl:this.parentEl),this.container=e(i.template).appendTo(this.parentEl),"object"==typeof i.locale&&("string"==typeof i.locale.direction&&(this.locale.direction=i.locale.direction),"string"==typeof i.locale.format&&(this.locale.format=i.locale.format),"string"==typeof i.locale.separator&&(this.locale.separator=i.locale.separator),"object"==typeof i.locale.daysOfWeek&&(this.locale.daysOfWeek=i.locale.daysOfWeek.slice()),"object"==typeof i.locale.monthNames&&(this.locale.monthNames=i.locale.monthNames.slice()),"number"==typeof i.locale.firstDay&&(this.locale.firstDay=i.locale.firstDay),"string"==typeof i.locale.applyLabel&&(this.locale.applyLabel=i.locale.applyLabel),"string"==typeof i.locale.cancelLabel&&(this.locale.cancelLabel=i.locale.cancelLabel),"string"==typeof i.locale.weekLabel&&(this.locale.weekLabel=i.locale.weekLabel),"string"==typeof i.locale.customRangeLabel&&(this.locale.customRangeLabel=i.locale.customRangeLabel)),this.container.addClass(this.locale.direction),"string"==typeof i.startDate&&(this.startDate=t(i.startDate,this.locale.format)),"string"==typeof i.endDate&&(this.endDate=t(i.endDate,this.locale.format)),"string"==typeof i.minDate&&(this.minDate=t(i.minDate,this.locale.format)),"string"==typeof i.maxDate&&(this.maxDate=t(i.maxDate,this.locale.format)),"object"==typeof i.startDate&&(this.startDate=t(i.startDate)),"object"==typeof i.endDate&&(this.endDate=t(i.endDate)),"object"==typeof i.minDate&&(this.minDate=t(i.minDate)),"object"==typeof i.maxDate&&(this.maxDate=t(i.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof i.applyClass&&(this.applyClass=i.applyClass),"string"==typeof i.cancelClass&&(this.cancelClass=i.cancelClass),"object"==typeof i.dateLimit&&(this.dateLimit=i.dateLimit),"string"==typeof i.opens&&(this.opens=i.opens),"string"==typeof i.drops&&(this.drops=i.drops),"boolean"==typeof i.showWeekNumbers&&(this.showWeekNumbers=i.showWeekNumbers),"boolean"==typeof i.showISOWeekNumbers&&(this.showISOWeekNumbers=i.showISOWeekNumbers),"string"==typeof i.buttonClasses&&(this.buttonClasses=i.buttonClasses),"object"==typeof i.buttonClasses&&(this.buttonClasses=i.buttonClasses.join(" ")),"boolean"==typeof i.showDropdowns&&(this.showDropdowns=i.showDropdowns),"boolean"==typeof i.showCustomRangeLabel&&(this.showCustomRangeLabel=i.showCustomRangeLabel),"boolean"==typeof i.singleDatePicker&&(this.singleDatePicker=i.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof i.timePicker&&(this.timePicker=i.timePicker),"boolean"==typeof i.timePickerSeconds&&(this.timePickerSeconds=i.timePickerSeconds),"number"==typeof i.timePickerIncrement&&(this.timePickerIncrement=i.timePickerIncrement),"boolean"==typeof i.timePicker24Hour&&(this.timePicker24Hour=i.timePicker24Hour),"boolean"==typeof i.autoApply&&(this.autoApply=i.autoApply),"boolean"==typeof i.autoUpdateInput&&(this.autoUpdateInput=i.autoUpdateInput),"boolean"==typeof i.linkedCalendars&&(this.linkedCalendars=i.linkedCalendars),"function"==typeof i.isInvalidDate&&(this.isInvalidDate=i.isInvalidDate),"function"==typeof i.isCustomDate&&(this.isCustomDate=i.isCustomDate),"boolean"==typeof i.alwaysShowCalendars&&(this.alwaysShowCalendars=i.alwaysShowCalendars),0!=this.locale.firstDay)for(var n=this.locale.firstDay;n>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),n--;var r,h,o;if("undefined"==typeof i.startDate&&"undefined"==typeof i.endDate&&e(this.element).is("input[type=text]")){var l=e(this.element).val(),c=l.split(this.locale.separator);r=h=null,2==c.length?(r=t(c[0],this.locale.format),h=t(c[1],this.locale.format)):this.singleDatePicker&&""!==l&&(r=t(l,this.locale.format),h=t(l,this.locale.format)),null!==r&&null!==h&&(this.setStartDate(r),this.setEndDate(h))}if("object"==typeof i.ranges){for(o in i.ranges){r="string"==typeof i.ranges[o][0]?t(i.ranges[o][0],this.locale.format):t(i.ranges[o][0]),h="string"==typeof i.ranges[o][1]?t(i.ranges[o][1],this.locale.format):t(i.ranges[o][1]),this.minDate&&r.isBefore(this.minDate)&&(r=this.minDate.clone());var d=this.maxDate;if(this.dateLimit&&d&&r.clone().add(this.dateLimit).isAfter(d)&&(d=r.clone().add(this.dateLimit)),d&&h.isAfter(d)&&(h=d.clone()),!(this.minDate&&h.isBefore(this.minDate,this.timepicker?"minute":"day")||d&&r.isAfter(d,this.timepicker?"minute":"day"))){var m=document.createElement("textarea");m.innerHTML=o;var f=m.value;this.ranges[f]=[r,h]}}var p="",this.container.find(".ranges").prepend(p)}"function"==typeof s&&(this.callback=s),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof i.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide()),("undefined"==typeof i.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),"undefined"!=typeof i.ranges&&"right"==this.opens&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",e.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",e.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsChanged,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)).on("click.daterangepicker","li",e.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",e.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",e.proxy(this.updateFormInputs,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return a.prototype={constructor:a,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate,this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate,this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,a;if(this.endDate){if(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),a=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour){var i=this.container.find(".left .ampmselect").val();"PM"===i&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0)}}else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),a=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour){var i=this.container.find(".right .ampmselect").val();"PM"===i&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0)}this.leftCalendar.month.hour(t).minute(e).second(a),this.rightCalendar.month.hour(t).minute(e).second(a)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(a){var i="left"==a?this.leftCalendar:this.rightCalendar,s=i.month.month(),n=i.month.year(),r=i.month.hour(),h=i.month.minute(),o=i.month.second(),l=t([n,s]).daysInMonth(),c=t([n,s,1]),d=t([n,s,l]),m=t(c).subtract(1,"month").month(),f=t(c).subtract(1,"month").year(),p=t([f,m]).daysInMonth(),u=c.day(),i=[];i.firstDay=c,i.lastDay=d;for(var g=0;g<6;g++)i[g]=[];var D=p-u+this.locale.firstDay+1;D>p&&(D-=7),u==this.locale.firstDay&&(D=p-6);for(var k,y,v=t([f,m,D,12,h,o]),g=0,k=0,y=0;g<42;g++,k++,v=t(v).add(24,"hour"))g>0&&k%7===0&&(k=0,y++),i[y][k]=v.clone().hour(r).minute(h).second(o),v.hour(12),this.minDate&&i[y][k].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&i[y][k].isBefore(this.minDate)&&"left"==a&&(i[y][k]=this.minDate.clone()),this.maxDate&&i[y][k].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&i[y][k].isAfter(this.maxDate)&&"right"==a&&(i[y][k]=this.maxDate.clone());"left"==a?this.leftCalendar.calendar=i:this.rightCalendar.calendar=i;var C="left"==a?this.minDate:this.startDate,b=this.maxDate,Y=("left"==a?this.startDate:this.endDate,"ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"}),w='';w+="",w+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(w+=""),w+=C&&!C.isBefore(i.firstDay)||this.linkedCalendars&&"left"!=a?"":'';var P=this.locale.monthNames[i[1][1].month()]+i[1][1].format(" YYYY");if(this.showDropdowns){for(var M=i[1][1].month(),x=i[1][1].year(),I=b&&b.year()||x+5,L=C&&C.year()||x-50,S=x==L,A=x==I,_='";for(var E='",P=_+E}if(w+='",w+=b&&!b.isAfter(i.lastDay)||this.linkedCalendars&&"right"!=a&&!this.singleDatePicker?"":'',w+="",w+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(w+='"),e.each(this.locale.daysOfWeek,function(t,e){w+=""}),w+="",w+="",w+="",null==this.endDate&&this.dateLimit){var O=this.startDate.clone().add(this.dateLimit).endOf("day");b&&!O.isBefore(b)||(b=O)}for(var y=0;y<6;y++){w+="",this.showWeekNumbers?w+='":this.showISOWeekNumbers&&(w+='");for(var k=0;k<7;k++){var N=[];i[y][k].isSame(new Date,"day")&&N.push("today"),i[y][k].isoWeekday()>5&&N.push("weekend"),i[y][k].month()!=i[1][1].month()&&N.push("off"),this.minDate&&i[y][k].isBefore(this.minDate,"day")&&N.push("off","disabled"),b&&i[y][k].isAfter(b,"day")&&N.push("off","disabled"),this.isInvalidDate(i[y][k])&&N.push("off","disabled"),i[y][k].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&N.push("active","start-date"),null!=this.endDate&&i[y][k].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&N.push("active","end-date"),null!=this.endDate&&i[y][k]>this.startDate&&i[y][k]'+i[y][k].date()+""}w+=""}w+="",w+="
'+P+"
'+this.locale.weekLabel+""+e+"
'+i[y][0].week()+"'+i[y][0].isoWeek()+"
",this.container.find(".calendar."+a+" .calendar-table").html(w)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,a,i,s=this.maxDate;if(!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(s=this.startDate.clone().add(this.dateLimit)),"left"==t)a=this.startDate.clone(),i=this.minDate;else if("right"==t){a=this.endDate.clone(),i=this.startDate;var n=this.container.find(".calendar.right .calendar-time div");if(!this.endDate&&""!=n.html()&&(a.hour(n.find(".hourselect option:selected").val()||a.hour()),a.minute(n.find(".minuteselect option:selected").val()||a.minute()),a.second(n.find(".secondselect option:selected").val()||a.second()),!this.timePicker24Hour)){var r=n.find(".ampmselect option:selected").val();"PM"===r&&a.hour()<12&&a.hour(a.hour()+12),"AM"===r&&12===a.hour()&&a.hour(0)}a.isBefore(this.startDate)&&(a=this.startDate.clone()),s&&a.isAfter(s)&&(a=s.clone())}e=' ",e+=': ",this.timePickerSeconds){e+=': "}if(!this.timePicker24Hour){e+='"}this.container.find(".calendar."+t+" .calendar-time div").html(e)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var t,a={top:0,left:0},i=e(window).width();this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},i=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-a.top:this.element.offset().top+this.element.outerHeight()-a.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:t,right:i-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:t,left:this.element.offset().left-a.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:t,left:this.element.offset().left-a.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy(function(t){this.outsideClick(t)},this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var a=e(t.target);"focusin"==t.type||a.closest(this.element).length||a.closest(this.container).length||a.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(t){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var e=t.target.getAttribute("data-range-key");if(e==this.locale.customRangeLabel)this.updateView();else{var a=this.ranges[e];this.container.find("input[name=daterangepicker_start]").val(a[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(a[1].format(this.locale.format))}}},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var a=this.ranges[e];this.startDate=a[0],this.endDate=a[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){var a=e(t.target).parents(".calendar");a.hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){var a=e(t.target).parents(".calendar");a.hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var a=e(t.target).attr("data-title"),i=a.substr(1,1),s=a.substr(3,1),n=e(t.target).parents(".calendar"),r=n.hasClass("left")?this.leftCalendar.calendar[i][s]:this.rightCalendar.calendar[i][s];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(r.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(r.format(this.locale.format));var h=this.leftCalendar,o=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".calendar td").each(function(t,a){if(!e(a).hasClass("week")){var i=e(a).attr("data-title"),s=i.substr(1,1),n=i.substr(3,1),c=e(a).parents(".calendar"),d=c.hasClass("left")?h.calendar[s][n]:o.calendar[s][n];d.isAfter(l)&&d.isBefore(r)||d.isSame(r,"day")?e(a).addClass("in-range"):e(a).removeClass("in-range")}})}},clickDate:function(t){if(e(t.target).hasClass("available")){var a=e(t.target).attr("data-title"),i=a.substr(1,1),s=a.substr(3,1),n=e(t.target).parents(".calendar"),r=n.hasClass("left")?this.leftCalendar.calendar[i][s]:this.rightCalendar.calendar[i][s];if(this.endDate||r.isBefore(this.startDate,"day")){if(this.timePicker){var h=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour){var o=this.container.find(".left .ampmselect").val();"PM"===o&&h<12&&(h+=12),"AM"===o&&12===h&&(h=0)}var l=parseInt(this.container.find(".left .minuteselect").val(),10),c=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;r=r.clone().hour(h).minute(l).second(c)}this.endDate=null,this.setStartDate(r.clone())}else if(!this.endDate&&r.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var h=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var o=this.container.find(".right .ampmselect").val();"PM"===o&&h<12&&(h+=12),"AM"===o&&12===h&&(h=0)}var l=parseInt(this.container.find(".right .minuteselect").val(),10),c=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;r=r.clone().hour(h).minute(l).second(c)}this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var a in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[a][0])&&this.endDate.isSame(this.ranges[a][1])){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[a][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[a][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}e++}t&&this.showCustomRangeLabel&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var a=e(t.target).closest(".calendar").hasClass("left"),i=a?"left":"right",s=this.container.find(".calendar."+i),n=parseInt(s.find(".monthselect").val(),10),r=s.find(".yearselect").val();a||(rthis.maxDate.year()||r==this.maxDate.year()&&n>this.maxDate.month())&&(n=this.maxDate.month(),r=this.maxDate.year()),a?(this.leftCalendar.month.month(n).year(r),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(n).year(r),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var a=e(t.target).closest(".calendar"),i=a.hasClass("left"),s=parseInt(a.find(".hourselect").val(),10),n=parseInt(a.find(".minuteselect").val(),10),r=this.timePickerSeconds?parseInt(a.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var h=a.find(".ampmselect").val();"PM"===h&&s<12&&(s+=12),"AM"===h&&12===s&&(s=0)}if(i){var o=this.startDate.clone(); -o.hour(s),o.minute(n),o.second(r),this.setStartDate(o),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==o.format("YYYY-MM-DD")&&this.endDate.isBefore(o)&&this.setEndDate(o.clone())}else if(this.endDate){var l=this.endDate.clone();l.hour(s),l.minute(n),l.second(r),this.setEndDate(l)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(a){var i=e(a.target).closest(".calendar").hasClass("right"),s=t(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),n=t(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);s.isValid()&&n.isValid()&&(i&&n.isBefore(s)&&(s=n.clone()),this.setStartDate(s),this.setEndDate(n),i?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateView()},formInputsFocused:function(t){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"),e(t.target).addClass("active");var a=e(t.target).closest(".calendar").hasClass("right");a&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(e){if(!this.endDate){var a=this.container.find('input[name="daterangepicker_end"]').val(),i=t(a,this.locale.format);i.isValid()&&(this.setEndDate(i),this.updateView())}},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),o--;var h,l,c;if("undefined"==typeof i.startDate&&"undefined"==typeof i.endDate&&e(this.element).is("input[type=text]")){var d=e(this.element).val(),m=d.split(this.locale.separator);h=l=null,2==m.length?(h=t(m[0],this.locale.format),l=t(m[1],this.locale.format)):this.singleDatePicker&&""!==d&&(h=t(d,this.locale.format),l=t(d,this.locale.format)),null!==h&&null!==l&&(this.setStartDate(h),this.setEndDate(l))}if("object"==typeof i.ranges){for(c in i.ranges){h="string"==typeof i.ranges[c][0]?t(i.ranges[c][0],this.locale.format):t(i.ranges[c][0]),l="string"==typeof i.ranges[c][1]?t(i.ranges[c][1],this.locale.format):t(i.ranges[c][1]),this.minDate&&h.isBefore(this.minDate)&&(h=this.minDate.clone());var f=this.maxDate;if(this.dateLimit&&f&&h.clone().add(this.dateLimit).isAfter(f)&&(f=h.clone().add(this.dateLimit)),f&&l.isAfter(f)&&(l=f.clone()),!(this.minDate&&l.isBefore(this.minDate,this.timepicker?"minute":"day")||f&&h.isAfter(f,this.timepicker?"minute":"day"))){var n=document.createElement("textarea");n.innerHTML=c;var r=n.value;this.ranges[r]=[h,l]}}var p="
    ";for(c in this.ranges)p+='
  • '+c+"
  • ";this.showCustomRangeLabel&&(p+='
  • '+this.locale.customRangeLabel+"
  • "),p+="
",this.container.find(".ranges").prepend(p)}"function"==typeof s&&(this.callback=s),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof i.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide()),("undefined"==typeof i.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),"undefined"!=typeof i.ranges&&"right"==this.opens&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",e.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",e.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsChanged,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)).on("click.daterangepicker","li",e.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",e.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",e.proxy(this.updateFormInputs,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return a.prototype={constructor:a,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,a;if(this.endDate){if(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),a=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour){var i=this.container.find(".left .ampmselect").val();"PM"===i&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0)}}else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),a=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour){var i=this.container.find(".right .ampmselect").val();"PM"===i&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0)}this.leftCalendar.month.hour(t).minute(e).second(a),this.rightCalendar.month.hour(t).minute(e).second(a)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(a){var i="left"==a?this.leftCalendar:this.rightCalendar,s=i.month.month(),n=i.month.year(),r=i.month.hour(),o=i.month.minute(),h=i.month.second(),l=t([n,s]).daysInMonth(),c=t([n,s,1]),d=t([n,s,l]),m=t(c).subtract(1,"month").month(),f=t(c).subtract(1,"month").year(),p=t([f,m]).daysInMonth(),u=c.day(),i=[];i.firstDay=c,i.lastDay=d;for(var g=0;g<6;g++)i[g]=[];var D=p-u+this.locale.firstDay+1;D>p&&(D-=7),u==this.locale.firstDay&&(D=p-6);for(var k,y,v=t([f,m,D,12,o,h]),g=0,k=0,y=0;g<42;g++,k++,v=t(v).add(24,"hour"))g>0&&k%7===0&&(k=0,y++),i[y][k]=v.clone().hour(r).minute(o).second(h),v.hour(12),this.minDate&&i[y][k].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&i[y][k].isBefore(this.minDate)&&"left"==a&&(i[y][k]=this.minDate.clone()),this.maxDate&&i[y][k].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&i[y][k].isAfter(this.maxDate)&&"right"==a&&(i[y][k]=this.maxDate.clone());"left"==a?this.leftCalendar.calendar=i:this.rightCalendar.calendar=i;var b="left"==a?this.minDate:this.startDate,C=this.maxDate,w=("left"==a?this.startDate:this.endDate,"ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"}),Y='';Y+="",Y+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(Y+=""),Y+=b&&!b.isBefore(i.firstDay)||this.linkedCalendars&&"left"!=a?"":'';var P=this.locale.monthNames[i[1][1].month()]+i[1][1].format(" YYYY");if(this.showDropdowns){for(var M=i[1][1].month(),x=i[1][1].year(),I=C&&C.year()||x+5,L=b&&b.year()||x-50,S=x==L,A=x==I,_='";for(var E='",P=_+E}if(Y+='",Y+=C&&!C.isAfter(i.lastDay)||this.linkedCalendars&&"right"!=a&&!this.singleDatePicker?"":'',Y+="",Y+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(Y+='"),e.each(this.locale.daysOfWeek,function(t,e){Y+=""}),Y+="",Y+="",Y+="",null==this.endDate&&this.dateLimit){var O=this.startDate.clone().add(this.dateLimit).endOf("day");C&&!O.isBefore(C)||(C=O)}for(var y=0;y<6;y++){Y+="",this.showWeekNumbers?Y+='":this.showISOWeekNumbers&&(Y+='");for(var k=0;k<7;k++){var N=[];i[y][k].isSame(new Date,"day")&&N.push("today"),i[y][k].isoWeekday()>5&&N.push("weekend"),i[y][k].month()!=i[1][1].month()&&N.push("off"),this.minDate&&i[y][k].isBefore(this.minDate,"day")&&N.push("off","disabled"),C&&i[y][k].isAfter(C,"day")&&N.push("off","disabled"),this.isInvalidDate(i[y][k])&&N.push("off","disabled"),i[y][k].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&N.push("active","start-date"),null!=this.endDate&&i[y][k].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&N.push("active","end-date"),null!=this.endDate&&i[y][k]>this.startDate&&i[y][k]'+i[y][k].date()+""}Y+=""}Y+="",Y+="
'+P+"
'+this.locale.weekLabel+""+e+"
'+i[y][0].week()+"'+i[y][0].isoWeek()+"
",this.container.find(".calendar."+a+" .calendar-table").html(Y)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,a,i,s=this.maxDate;if(!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(s=this.startDate.clone().add(this.dateLimit)),"left"==t)a=this.startDate.clone(),i=this.minDate;else if("right"==t){a=this.endDate.clone(),i=this.startDate;var n=this.container.find(".calendar.right .calendar-time div");if(""!=n.html()&&(a.hour(n.find(".hourselect option:selected").val()||a.hour()),a.minute(n.find(".minuteselect option:selected").val()||a.minute()),a.second(n.find(".secondselect option:selected").val()||a.second()),!this.timePicker24Hour)){var r=n.find(".ampmselect option:selected").val();"PM"===r&&a.hour()<12&&a.hour(a.hour()+12),"AM"===r&&12===a.hour()&&a.hour(0)}a.isBefore(this.startDate)&&(a=this.startDate.clone()),s&&a.isAfter(s)&&(a=s.clone())}e=' ",e+=': ",this.timePickerSeconds){e+=': "}if(!this.timePicker24Hour){e+='"}this.container.find(".calendar."+t+" .calendar-time div").html(e)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var t,a={top:0,left:0},i=e(window).width();this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},i=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-a.top:this.element.offset().top+this.element.outerHeight()-a.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:t,right:i-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:t,left:this.element.offset().left-a.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:t,left:this.element.offset().left-a.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy(function(t){this.outsideClick(t)},this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var a=e(t.target);"focusin"==t.type||a.closest(this.element).length||a.closest(this.container).length||a.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(t){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var e=t.target.getAttribute("data-range-key");if(e==this.locale.customRangeLabel)this.updateView();else{var a=this.ranges[e];this.container.find("input[name=daterangepicker_start]").val(a[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(a[1].format(this.locale.format))}}},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var a=this.ranges[e];this.startDate=a[0],this.endDate=a[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){var a=e(t.target).parents(".calendar");a.hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){var a=e(t.target).parents(".calendar");a.hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var a=e(t.target).attr("data-title"),i=a.substr(1,1),s=a.substr(3,1),n=e(t.target).parents(".calendar"),r=n.hasClass("left")?this.leftCalendar.calendar[i][s]:this.rightCalendar.calendar[i][s];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(r.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(r.format(this.locale.format));var o=this.leftCalendar,h=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".calendar tbody td").each(function(t,a){if(!e(a).hasClass("week")){var i=e(a).attr("data-title"),s=i.substr(1,1),n=i.substr(3,1),c=e(a).parents(".calendar"),d=c.hasClass("left")?o.calendar[s][n]:h.calendar[s][n];d.isAfter(l)&&d.isBefore(r)||d.isSame(r,"day")?e(a).addClass("in-range"):e(a).removeClass("in-range")}})}},clickDate:function(t){if(e(t.target).hasClass("available")){var a=e(t.target).attr("data-title"),i=a.substr(1,1),s=a.substr(3,1),n=e(t.target).parents(".calendar"),r=n.hasClass("left")?this.leftCalendar.calendar[i][s]:this.rightCalendar.calendar[i][s];if(this.endDate||r.isBefore(this.startDate,"day")){if(this.timePicker){var o=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour){var h=this.container.find(".left .ampmselect").val();"PM"===h&&o<12&&(o+=12),"AM"===h&&12===o&&(o=0)}var l=parseInt(this.container.find(".left .minuteselect").val(),10),c=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;r=r.clone().hour(o).minute(l).second(c)}this.endDate=null,this.setStartDate(r.clone())}else if(!this.endDate&&r.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var o=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var h=this.container.find(".right .ampmselect").val();"PM"===h&&o<12&&(o+=12),"AM"===h&&12===o&&(o=0)}var l=parseInt(this.container.find(".right .minuteselect").val(),10),c=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;r=r.clone().hour(o).minute(l).second(c)}this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var a in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[a][0])&&this.endDate.isSame(this.ranges[a][1])){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[a][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[a][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html():this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var a=e(t.target).closest(".calendar").hasClass("left"),i=a?"left":"right",s=this.container.find(".calendar."+i),n=parseInt(s.find(".monthselect").val(),10),r=s.find(".yearselect").val();a||(rthis.maxDate.year()||r==this.maxDate.year()&&n>this.maxDate.month())&&(n=this.maxDate.month(),r=this.maxDate.year()),a?(this.leftCalendar.month.month(n).year(r),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(n).year(r),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var a=e(t.target).closest(".calendar"),i=a.hasClass("left"),s=parseInt(a.find(".hourselect").val(),10),n=parseInt(a.find(".minuteselect").val(),10),r=this.timePickerSeconds?parseInt(a.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){ +var o=a.find(".ampmselect").val();"PM"===o&&s<12&&(s+=12),"AM"===o&&12===s&&(s=0)}if(i){var h=this.startDate.clone();h.hour(s),h.minute(n),h.second(r),this.setStartDate(h),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==h.format("YYYY-MM-DD")&&this.endDate.isBefore(h)&&this.setEndDate(h.clone())}else if(this.endDate){var l=this.endDate.clone();l.hour(s),l.minute(n),l.second(r),this.setEndDate(l)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(a){var i=e(a.target).closest(".calendar").hasClass("right"),s=t(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),n=t(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);s.isValid()&&n.isValid()&&(i&&n.isBefore(s)&&(s=n.clone()),this.setStartDate(s),this.setEndDate(n),i?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateView()},formInputsFocused:function(t){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"),e(t.target).addClass("active");var a=e(t.target).closest(".calendar").hasClass("right");a&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(e){if(!this.endDate){var a=this.container.find('input[name="daterangepicker_end"]').val(),i=t(a,this.locale.format);i.isValid()&&(this.setEndDate(i),this.updateView())}},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length' +\n '
' +\n '' +\n '' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n '' +\n '' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n ' ' +\n '' +\n '
' +\n '
' +\n '';\n\n this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl);\n this.container = $(options.template).appendTo(this.parentEl);\n\n //\n // handle all the possible options overriding defaults\n //\n\n if (typeof options.locale === 'object') {\n\n if (typeof options.locale.direction === 'string')\n this.locale.direction = options.locale.direction;\n\n if (typeof options.locale.format === 'string')\n this.locale.format = options.locale.format;\n\n if (typeof options.locale.separator === 'string')\n this.locale.separator = options.locale.separator;\n\n if (typeof options.locale.daysOfWeek === 'object')\n this.locale.daysOfWeek = options.locale.daysOfWeek.slice();\n\n if (typeof options.locale.monthNames === 'object')\n this.locale.monthNames = options.locale.monthNames.slice();\n\n if (typeof options.locale.firstDay === 'number')\n this.locale.firstDay = options.locale.firstDay;\n\n if (typeof options.locale.applyLabel === 'string')\n this.locale.applyLabel = options.locale.applyLabel;\n\n if (typeof options.locale.cancelLabel === 'string')\n this.locale.cancelLabel = options.locale.cancelLabel;\n\n if (typeof options.locale.weekLabel === 'string')\n this.locale.weekLabel = options.locale.weekLabel;\n\n if (typeof options.locale.customRangeLabel === 'string')\n this.locale.customRangeLabel = options.locale.customRangeLabel;\n\n }\n this.container.addClass(this.locale.direction);\n\n if (typeof options.startDate === 'string')\n this.startDate = moment(options.startDate, this.locale.format);\n\n if (typeof options.endDate === 'string')\n this.endDate = moment(options.endDate, this.locale.format);\n\n if (typeof options.minDate === 'string')\n this.minDate = moment(options.minDate, this.locale.format);\n\n if (typeof options.maxDate === 'string')\n this.maxDate = moment(options.maxDate, this.locale.format);\n\n if (typeof options.startDate === 'object')\n this.startDate = moment(options.startDate);\n\n if (typeof options.endDate === 'object')\n this.endDate = moment(options.endDate);\n\n if (typeof options.minDate === 'object')\n this.minDate = moment(options.minDate);\n\n if (typeof options.maxDate === 'object')\n this.maxDate = moment(options.maxDate);\n\n // sanity check for bad options\n if (this.minDate && this.startDate.isBefore(this.minDate))\n this.startDate = this.minDate.clone();\n\n // sanity check for bad options\n if (this.maxDate && this.endDate.isAfter(this.maxDate))\n this.endDate = this.maxDate.clone();\n\n if (typeof options.applyClass === 'string')\n this.applyClass = options.applyClass;\n\n if (typeof options.cancelClass === 'string')\n this.cancelClass = options.cancelClass;\n\n if (typeof options.dateLimit === 'object')\n this.dateLimit = options.dateLimit;\n\n if (typeof options.opens === 'string')\n this.opens = options.opens;\n\n if (typeof options.drops === 'string')\n this.drops = options.drops;\n\n if (typeof options.showWeekNumbers === 'boolean')\n this.showWeekNumbers = options.showWeekNumbers;\n\n if (typeof options.showISOWeekNumbers === 'boolean')\n this.showISOWeekNumbers = options.showISOWeekNumbers;\n\n if (typeof options.buttonClasses === 'string')\n this.buttonClasses = options.buttonClasses;\n\n if (typeof options.buttonClasses === 'object')\n this.buttonClasses = options.buttonClasses.join(' ');\n\n if (typeof options.showDropdowns === 'boolean')\n this.showDropdowns = options.showDropdowns;\n\n if (typeof options.showCustomRangeLabel === 'boolean')\n this.showCustomRangeLabel = options.showCustomRangeLabel;\n\n if (typeof options.singleDatePicker === 'boolean') {\n this.singleDatePicker = options.singleDatePicker;\n if (this.singleDatePicker)\n this.endDate = this.startDate.clone();\n }\n\n if (typeof options.timePicker === 'boolean')\n this.timePicker = options.timePicker;\n\n if (typeof options.timePickerSeconds === 'boolean')\n this.timePickerSeconds = options.timePickerSeconds;\n\n if (typeof options.timePickerIncrement === 'number')\n this.timePickerIncrement = options.timePickerIncrement;\n\n if (typeof options.timePicker24Hour === 'boolean')\n this.timePicker24Hour = options.timePicker24Hour;\n\n if (typeof options.autoApply === 'boolean')\n this.autoApply = options.autoApply;\n\n if (typeof options.autoUpdateInput === 'boolean')\n this.autoUpdateInput = options.autoUpdateInput;\n\n if (typeof options.linkedCalendars === 'boolean')\n this.linkedCalendars = options.linkedCalendars;\n\n if (typeof options.isInvalidDate === 'function')\n this.isInvalidDate = options.isInvalidDate;\n\n if (typeof options.isCustomDate === 'function')\n this.isCustomDate = options.isCustomDate;\n\n if (typeof options.alwaysShowCalendars === 'boolean')\n this.alwaysShowCalendars = options.alwaysShowCalendars;\n\n // update day names order to firstDay\n if (this.locale.firstDay != 0) {\n var iterator = this.locale.firstDay;\n while (iterator > 0) {\n this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());\n iterator--;\n }\n }\n\n var start, end, range;\n\n //if no start/end dates set, check if an input element contains initial values\n if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {\n if ($(this.element).is('input[type=text]')) {\n var val = $(this.element).val(),\n split = val.split(this.locale.separator);\n\n start = end = null;\n\n if (split.length == 2) {\n start = moment(split[0], this.locale.format);\n end = moment(split[1], this.locale.format);\n } else if (this.singleDatePicker && val !== \"\") {\n start = moment(val, this.locale.format);\n end = moment(val, this.locale.format);\n }\n if (start !== null && end !== null) {\n this.setStartDate(start);\n this.setEndDate(end);\n }\n }\n }\n\n if (typeof options.ranges === 'object') {\n for (range in options.ranges) {\n\n if (typeof options.ranges[range][0] === 'string')\n start = moment(options.ranges[range][0], this.locale.format);\n else\n start = moment(options.ranges[range][0]);\n\n if (typeof options.ranges[range][1] === 'string')\n end = moment(options.ranges[range][1], this.locale.format);\n else\n end = moment(options.ranges[range][1]);\n\n // If the start or end date exceed those allowed by the minDate or dateLimit\n // options, shorten the range to the allowable period.\n if (this.minDate && start.isBefore(this.minDate))\n start = this.minDate.clone();\n\n var maxDate = this.maxDate;\n if (this.dateLimit && maxDate && start.clone().add(this.dateLimit).isAfter(maxDate))\n maxDate = start.clone().add(this.dateLimit);\n if (maxDate && end.isAfter(maxDate))\n end = maxDate.clone();\n\n // If the end of the range is before the minimum or the start of the range is\n // after the maximum, don't display this range option at all.\n if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day')) \n || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day')))\n continue;\n\n //Support unicode chars in the range names.\n var elem = document.createElement('textarea');\n elem.innerHTML = range;\n var rangeHtml = elem.value;\n\n this.ranges[rangeHtml] = [start, end];\n }\n\n var list = '
    ';\n for (range in this.ranges) {\n list += '
  • ' + range + '
  • ';\n }\n if (this.showCustomRangeLabel) {\n list += '
  • ' + this.locale.customRangeLabel + '
  • ';\n }\n list += '
';\n this.container.find('.ranges').prepend(list);\n }\n\n if (typeof cb === 'function') {\n this.callback = cb;\n }\n\n if (!this.timePicker) {\n this.startDate = this.startDate.startOf('day');\n this.endDate = this.endDate.endOf('day');\n this.container.find('.calendar-time').hide();\n }\n\n //can't be used together for now\n if (this.timePicker && this.autoApply)\n this.autoApply = false;\n\n if (this.autoApply && typeof options.ranges !== 'object') {\n this.container.find('.ranges').hide();\n } else if (this.autoApply) {\n this.container.find('.applyBtn, .cancelBtn').addClass('hide');\n }\n\n if (this.singleDatePicker) {\n this.container.addClass('single');\n this.container.find('.calendar.left').addClass('single');\n this.container.find('.calendar.left').show();\n this.container.find('.calendar.right').hide();\n this.container.find('.daterangepicker_input input, .daterangepicker_input > i').hide();\n if (this.timePicker) {\n this.container.find('.ranges ul').hide();\n } else {\n this.container.find('.ranges').hide();\n }\n }\n\n if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) {\n this.container.addClass('show-calendar');\n }\n\n this.container.addClass('opens' + this.opens);\n\n //swap the position of the predefined ranges if opens right\n if (typeof options.ranges !== 'undefined' && this.opens == 'right') {\n this.container.find('.ranges').prependTo( this.container.find('.calendar.left').parent() );\n }\n\n //apply CSS classes and labels to buttons\n this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses);\n if (this.applyClass.length)\n this.container.find('.applyBtn').addClass(this.applyClass);\n if (this.cancelClass.length)\n this.container.find('.cancelBtn').addClass(this.cancelClass);\n this.container.find('.applyBtn').html(this.locale.applyLabel);\n this.container.find('.cancelBtn').html(this.locale.cancelLabel);\n\n //\n // event listeners\n //\n\n this.container.find('.calendar')\n .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))\n .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))\n .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this))\n .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))\n .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this))\n .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this))\n .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this))\n .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this))\n .on('click.daterangepicker', '.daterangepicker_input input', $.proxy(this.showCalendars, this))\n .on('focus.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsFocused, this))\n .on('blur.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsBlurred, this))\n .on('change.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsChanged, this));\n\n this.container.find('.ranges')\n .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))\n .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))\n .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))\n .on('mouseenter.daterangepicker', 'li', $.proxy(this.hoverRange, this))\n .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));\n\n if (this.element.is('input') || this.element.is('button')) {\n this.element.on({\n 'click.daterangepicker': $.proxy(this.show, this),\n 'focus.daterangepicker': $.proxy(this.show, this),\n 'keyup.daterangepicker': $.proxy(this.elementChanged, this),\n 'keydown.daterangepicker': $.proxy(this.keydown, this)\n });\n } else {\n this.element.on('click.daterangepicker', $.proxy(this.toggle, this));\n }\n\n //\n // if attached to a text input, set the initial value\n //\n\n if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));\n this.element.trigger('change');\n } else if (this.element.is('input') && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format));\n this.element.trigger('change');\n }\n\n };\n\n DateRangePicker.prototype = {\n\n constructor: DateRangePicker,\n\n setStartDate: function(startDate) {\n if (typeof startDate === 'string')\n this.startDate = moment(startDate, this.locale.format);\n\n if (typeof startDate === 'object')\n this.startDate = moment(startDate);\n\n if (!this.timePicker)\n this.startDate = this.startDate.startOf('day');\n\n if (this.timePicker && this.timePickerIncrement)\n this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n\n if (this.minDate && this.startDate.isBefore(this.minDate)) {\n this.startDate = this.minDate;\n if (this.timePicker && this.timePickerIncrement)\n this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n }\n\n if (this.maxDate && this.startDate.isAfter(this.maxDate)) {\n this.startDate = this.maxDate;\n if (this.timePicker && this.timePickerIncrement)\n this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n }\n\n if (!this.isShowing)\n this.updateElement();\n\n this.updateMonthsInView();\n },\n\n setEndDate: function(endDate) {\n if (typeof endDate === 'string')\n this.endDate = moment(endDate, this.locale.format);\n\n if (typeof endDate === 'object')\n this.endDate = moment(endDate);\n\n if (!this.timePicker)\n this.endDate = this.endDate.endOf('day');\n\n if (this.timePicker && this.timePickerIncrement)\n this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n\n if (this.endDate.isBefore(this.startDate))\n this.endDate = this.startDate.clone();\n\n if (this.maxDate && this.endDate.isAfter(this.maxDate))\n this.endDate = this.maxDate;\n\n if (this.dateLimit && this.startDate.clone().add(this.dateLimit).isBefore(this.endDate))\n this.endDate = this.startDate.clone().add(this.dateLimit);\n\n this.previousRightTime = this.endDate.clone();\n\n if (!this.isShowing)\n this.updateElement();\n\n this.updateMonthsInView();\n },\n\n isInvalidDate: function() {\n return false;\n },\n\n isCustomDate: function() {\n return false;\n },\n\n updateView: function() {\n if (this.timePicker) {\n this.renderTimePicker('left');\n this.renderTimePicker('right');\n if (!this.endDate) {\n this.container.find('.right .calendar-time select').attr('disabled', 'disabled').addClass('disabled');\n } else {\n this.container.find('.right .calendar-time select').removeAttr('disabled').removeClass('disabled');\n }\n }\n if (this.endDate) {\n this.container.find('input[name=\"daterangepicker_end\"]').removeClass('active');\n this.container.find('input[name=\"daterangepicker_start\"]').addClass('active');\n } else {\n this.container.find('input[name=\"daterangepicker_end\"]').addClass('active');\n this.container.find('input[name=\"daterangepicker_start\"]').removeClass('active');\n }\n this.updateMonthsInView();\n this.updateCalendars();\n this.updateFormInputs();\n },\n\n updateMonthsInView: function() {\n if (this.endDate) {\n\n //if both dates are visible already, do nothing\n if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month &&\n (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))\n &&\n (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))\n ) {\n return;\n }\n\n this.leftCalendar.month = this.startDate.clone().date(2);\n if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) {\n this.rightCalendar.month = this.endDate.clone().date(2);\n } else {\n this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');\n }\n\n } else {\n if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) {\n this.leftCalendar.month = this.startDate.clone().date(2);\n this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');\n }\n }\n if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) {\n this.rightCalendar.month = this.maxDate.clone().date(2);\n this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');\n }\n },\n\n updateCalendars: function() {\n\n if (this.timePicker) {\n var hour, minute, second;\n if (this.endDate) {\n hour = parseInt(this.container.find('.left .hourselect').val(), 10);\n minute = parseInt(this.container.find('.left .minuteselect').val(), 10);\n second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.left .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n } else {\n hour = parseInt(this.container.find('.right .hourselect').val(), 10);\n minute = parseInt(this.container.find('.right .minuteselect').val(), 10);\n second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.right .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n }\n this.leftCalendar.month.hour(hour).minute(minute).second(second);\n this.rightCalendar.month.hour(hour).minute(minute).second(second);\n }\n\n this.renderCalendar('left');\n this.renderCalendar('right');\n\n //highlight any predefined range matching the current start and end dates\n this.container.find('.ranges li').removeClass('active');\n if (this.endDate == null) return;\n\n this.calculateChosenLabel();\n },\n\n renderCalendar: function(side) {\n\n //\n // Build the matrix of dates that will populate the calendar\n //\n\n var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar;\n var month = calendar.month.month();\n var year = calendar.month.year();\n var hour = calendar.month.hour();\n var minute = calendar.month.minute();\n var second = calendar.month.second();\n var daysInMonth = moment([year, month]).daysInMonth();\n var firstDay = moment([year, month, 1]);\n var lastDay = moment([year, month, daysInMonth]);\n var lastMonth = moment(firstDay).subtract(1, 'month').month();\n var lastYear = moment(firstDay).subtract(1, 'month').year();\n var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();\n var dayOfWeek = firstDay.day();\n\n //initialize a 6 rows x 7 columns array for the calendar\n var calendar = [];\n calendar.firstDay = firstDay;\n calendar.lastDay = lastDay;\n\n for (var i = 0; i < 6; i++) {\n calendar[i] = [];\n }\n\n //populate the calendar with date objects\n var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;\n if (startDay > daysInLastMonth)\n startDay -= 7;\n\n if (dayOfWeek == this.locale.firstDay)\n startDay = daysInLastMonth - 6;\n\n var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]);\n\n var col, row;\n for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) {\n if (i > 0 && col % 7 === 0) {\n col = 0;\n row++;\n }\n calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second);\n curDate.hour(12);\n\n if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') {\n calendar[row][col] = this.minDate.clone();\n }\n\n if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') {\n calendar[row][col] = this.maxDate.clone();\n }\n\n }\n\n //make the calendar object available to hoverDate/clickDate\n if (side == 'left') {\n this.leftCalendar.calendar = calendar;\n } else {\n this.rightCalendar.calendar = calendar;\n }\n\n //\n // Display the calendar\n //\n\n var minDate = side == 'left' ? this.minDate : this.startDate;\n var maxDate = this.maxDate;\n var selected = side == 'left' ? this.startDate : this.endDate;\n var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'};\n\n var html = '';\n html += '';\n html += '';\n\n // add empty cell for week number\n if (this.showWeekNumbers || this.showISOWeekNumbers)\n html += '';\n\n if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) {\n html += '';\n } else {\n html += '';\n }\n\n var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(\" YYYY\");\n\n if (this.showDropdowns) {\n var currentMonth = calendar[1][1].month();\n var currentYear = calendar[1][1].year();\n var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);\n var minYear = (minDate && minDate.year()) || (currentYear - 50);\n var inMinYear = currentYear == minYear;\n var inMaxYear = currentYear == maxYear;\n\n var monthHtml = '\";\n\n var yearHtml = '';\n\n dateHtml = monthHtml + yearHtml;\n }\n\n html += '';\n if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) {\n html += '';\n } else {\n html += '';\n }\n\n html += '';\n html += '';\n\n // add week number label\n if (this.showWeekNumbers || this.showISOWeekNumbers)\n html += '';\n\n $.each(this.locale.daysOfWeek, function(index, dayOfWeek) {\n html += '';\n });\n\n html += '';\n html += '';\n html += '';\n\n //adjust maxDate to reflect the dateLimit setting in order to\n //grey out end dates beyond the dateLimit\n if (this.endDate == null && this.dateLimit) {\n var maxLimit = this.startDate.clone().add(this.dateLimit).endOf('day');\n if (!maxDate || maxLimit.isBefore(maxDate)) {\n maxDate = maxLimit;\n }\n }\n\n for (var row = 0; row < 6; row++) {\n html += '';\n\n // add week number\n if (this.showWeekNumbers)\n html += '';\n else if (this.showISOWeekNumbers)\n html += '';\n\n for (var col = 0; col < 7; col++) {\n\n var classes = [];\n\n //highlight today's date\n if (calendar[row][col].isSame(new Date(), \"day\"))\n classes.push('today');\n\n //highlight weekends\n if (calendar[row][col].isoWeekday() > 5)\n classes.push('weekend');\n\n //grey out the dates in other months displayed at beginning and end of this calendar\n if (calendar[row][col].month() != calendar[1][1].month())\n classes.push('off');\n\n //don't allow selection of dates before the minimum date\n if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day'))\n classes.push('off', 'disabled');\n\n //don't allow selection of dates after the maximum date\n if (maxDate && calendar[row][col].isAfter(maxDate, 'day'))\n classes.push('off', 'disabled');\n\n //don't allow selection of date if a custom function decides it's invalid\n if (this.isInvalidDate(calendar[row][col]))\n classes.push('off', 'disabled');\n\n //highlight the currently selected start date\n if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD'))\n classes.push('active', 'start-date');\n\n //highlight the currently selected end date\n if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD'))\n classes.push('active', 'end-date');\n\n //highlight dates in-between the selected dates\n if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate)\n classes.push('in-range');\n\n //apply custom classes for this date\n var isCustom = this.isCustomDate(calendar[row][col]);\n if (isCustom !== false) {\n if (typeof isCustom === 'string')\n classes.push(isCustom);\n else\n Array.prototype.push.apply(classes, isCustom);\n }\n\n var cname = '', disabled = false;\n for (var i = 0; i < classes.length; i++) {\n cname += classes[i] + ' ';\n if (classes[i] == 'disabled')\n disabled = true;\n }\n if (!disabled)\n cname += 'available';\n\n html += '';\n\n }\n html += '';\n }\n\n html += '';\n html += '
' + dateHtml + '
' + this.locale.weekLabel + '' + dayOfWeek + '
' + calendar[row][0].week() + '' + calendar[row][0].isoWeek() + '' + calendar[row][col].date() + '
';\n\n this.container.find('.calendar.' + side + ' .calendar-table').html(html);\n\n },\n\n renderTimePicker: function(side) {\n\n // Don't bother updating the time picker if it's currently disabled\n // because an end date hasn't been clicked yet\n if (side == 'right' && !this.endDate) return;\n\n var html, selected, minDate, maxDate = this.maxDate;\n\n if (this.dateLimit && (!this.maxDate || this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)))\n maxDate = this.startDate.clone().add(this.dateLimit);\n\n if (side == 'left') {\n selected = this.startDate.clone();\n minDate = this.minDate;\n } else if (side == 'right') {\n selected = this.endDate.clone();\n minDate = this.startDate;\n\n //Preserve the time already selected\n var timeSelector = this.container.find('.calendar.right .calendar-time div');\n if (!this.endDate && timeSelector.html() != '') {\n\n selected.hour(timeSelector.find('.hourselect option:selected').val() || selected.hour());\n selected.minute(timeSelector.find('.minuteselect option:selected').val() || selected.minute());\n selected.second(timeSelector.find('.secondselect option:selected').val() || selected.second());\n\n if (!this.timePicker24Hour) {\n var ampm = timeSelector.find('.ampmselect option:selected').val();\n if (ampm === 'PM' && selected.hour() < 12)\n selected.hour(selected.hour() + 12);\n if (ampm === 'AM' && selected.hour() === 12)\n selected.hour(0);\n }\n\n }\n\n if (selected.isBefore(this.startDate))\n selected = this.startDate.clone();\n\n if (maxDate && selected.isAfter(maxDate))\n selected = maxDate.clone();\n\n }\n\n //\n // hours\n //\n\n html = ' ';\n\n //\n // minutes\n //\n\n html += ': ';\n\n //\n // seconds\n //\n\n if (this.timePickerSeconds) {\n html += ': ';\n }\n\n //\n // AM/PM\n //\n\n if (!this.timePicker24Hour) {\n html += '';\n }\n\n this.container.find('.calendar.' + side + ' .calendar-time div').html(html);\n\n },\n\n updateFormInputs: function() {\n\n //ignore mouse movements while an above-calendar text input has focus\n if (this.container.find('input[name=daterangepicker_start]').is(\":focus\") || this.container.find('input[name=daterangepicker_end]').is(\":focus\"))\n return;\n\n this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.locale.format));\n if (this.endDate)\n this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.locale.format));\n\n if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) {\n this.container.find('button.applyBtn').removeAttr('disabled');\n } else {\n this.container.find('button.applyBtn').attr('disabled', 'disabled');\n }\n\n },\n\n move: function() {\n var parentOffset = { top: 0, left: 0 },\n containerTop;\n var parentRightEdge = $(window).width();\n if (!this.parentEl.is('body')) {\n parentOffset = {\n top: this.parentEl.offset().top - this.parentEl.scrollTop(),\n left: this.parentEl.offset().left - this.parentEl.scrollLeft()\n };\n parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left;\n }\n\n if (this.drops == 'up')\n containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;\n else\n containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;\n this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('dropup');\n\n if (this.opens == 'left') {\n this.container.css({\n top: containerTop,\n right: parentRightEdge - this.element.offset().left - this.element.outerWidth(),\n left: 'auto'\n });\n if (this.container.offset().left < 0) {\n this.container.css({\n right: 'auto',\n left: 9\n });\n }\n } else if (this.opens == 'center') {\n this.container.css({\n top: containerTop,\n left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2\n - this.container.outerWidth() / 2,\n right: 'auto'\n });\n if (this.container.offset().left < 0) {\n this.container.css({\n right: 'auto',\n left: 9\n });\n }\n } else {\n this.container.css({\n top: containerTop,\n left: this.element.offset().left - parentOffset.left,\n right: 'auto'\n });\n if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {\n this.container.css({\n left: 'auto',\n right: 0\n });\n }\n }\n },\n\n show: function(e) {\n if (this.isShowing) return;\n\n // Create a click proxy that is private to this instance of datepicker, for unbinding\n this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this);\n\n // Bind global datepicker mousedown for hiding and\n $(document)\n .on('mousedown.daterangepicker', this._outsideClickProxy)\n // also support mobile devices\n .on('touchend.daterangepicker', this._outsideClickProxy)\n // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them\n .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)\n // and also close when focus changes to outside the picker (eg. tabbing between controls)\n .on('focusin.daterangepicker', this._outsideClickProxy);\n\n // Reposition the picker if the window is resized while it's open\n $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this));\n\n this.oldStartDate = this.startDate.clone();\n this.oldEndDate = this.endDate.clone();\n this.previousRightTime = this.endDate.clone();\n\n this.updateView();\n this.container.show();\n this.move();\n this.element.trigger('show.daterangepicker', this);\n this.isShowing = true;\n },\n\n hide: function(e) {\n if (!this.isShowing) return;\n\n //incomplete date selection, revert to last values\n if (!this.endDate) {\n this.startDate = this.oldStartDate.clone();\n this.endDate = this.oldEndDate.clone();\n }\n\n //if a new date range was selected, invoke the user callback function\n if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))\n this.callback(this.startDate, this.endDate, this.chosenLabel);\n\n //if picker is attached to a text input, update it\n this.updateElement();\n\n $(document).off('.daterangepicker');\n $(window).off('.daterangepicker');\n this.container.hide();\n this.element.trigger('hide.daterangepicker', this);\n this.isShowing = false;\n },\n\n toggle: function(e) {\n if (this.isShowing) {\n this.hide();\n } else {\n this.show();\n }\n },\n\n outsideClick: function(e) {\n var target = $(e.target);\n // if the page is clicked anywhere except within the daterangerpicker/button\n // itself then call this.hide()\n if (\n // ie modal dialog fix\n e.type == \"focusin\" ||\n target.closest(this.element).length ||\n target.closest(this.container).length ||\n target.closest('.calendar-table').length\n ) return;\n this.hide();\n this.element.trigger('outsideClick.daterangepicker', this);\n },\n\n showCalendars: function() {\n this.container.addClass('show-calendar');\n this.move();\n this.element.trigger('showCalendar.daterangepicker', this);\n },\n\n hideCalendars: function() {\n this.container.removeClass('show-calendar');\n this.element.trigger('hideCalendar.daterangepicker', this);\n },\n\n hoverRange: function(e) {\n\n //ignore mouse movements while an above-calendar text input has focus\n if (this.container.find('input[name=daterangepicker_start]').is(\":focus\") || this.container.find('input[name=daterangepicker_end]').is(\":focus\"))\n return;\n\n var label = e.target.getAttribute('data-range-key');\n\n if (label == this.locale.customRangeLabel) {\n this.updateView();\n } else {\n var dates = this.ranges[label];\n this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.locale.format));\n this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.locale.format));\n }\n\n },\n\n clickRange: function(e) {\n var label = e.target.getAttribute('data-range-key');\n this.chosenLabel = label;\n if (label == this.locale.customRangeLabel) {\n this.showCalendars();\n } else {\n var dates = this.ranges[label];\n this.startDate = dates[0];\n this.endDate = dates[1];\n\n if (!this.timePicker) {\n this.startDate.startOf('day');\n this.endDate.endOf('day');\n }\n\n if (!this.alwaysShowCalendars)\n this.hideCalendars();\n this.clickApply();\n }\n },\n\n clickPrev: function(e) {\n var cal = $(e.target).parents('.calendar');\n if (cal.hasClass('left')) {\n this.leftCalendar.month.subtract(1, 'month');\n if (this.linkedCalendars)\n this.rightCalendar.month.subtract(1, 'month');\n } else {\n this.rightCalendar.month.subtract(1, 'month');\n }\n this.updateCalendars();\n },\n\n clickNext: function(e) {\n var cal = $(e.target).parents('.calendar');\n if (cal.hasClass('left')) {\n this.leftCalendar.month.add(1, 'month');\n } else {\n this.rightCalendar.month.add(1, 'month');\n if (this.linkedCalendars)\n this.leftCalendar.month.add(1, 'month');\n }\n this.updateCalendars();\n },\n\n hoverDate: function(e) {\n\n //ignore mouse movements while an above-calendar text input has focus\n //if (this.container.find('input[name=daterangepicker_start]').is(\":focus\") || this.container.find('input[name=daterangepicker_end]').is(\":focus\"))\n // return;\n\n //ignore dates that can't be selected\n if (!$(e.target).hasClass('available')) return;\n\n //have the text inputs above calendars reflect the date being hovered over\n var title = $(e.target).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(e.target).parents('.calendar');\n var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];\n\n if (this.endDate && !this.container.find('input[name=daterangepicker_start]').is(\":focus\")) {\n this.container.find('input[name=daterangepicker_start]').val(date.format(this.locale.format));\n } else if (!this.endDate && !this.container.find('input[name=daterangepicker_end]').is(\":focus\")) {\n this.container.find('input[name=daterangepicker_end]').val(date.format(this.locale.format));\n }\n\n //highlight the dates between the start date and the date being hovered as a potential end date\n var leftCalendar = this.leftCalendar;\n var rightCalendar = this.rightCalendar;\n var startDate = this.startDate;\n if (!this.endDate) {\n this.container.find('.calendar td').each(function(index, el) {\n\n //skip week numbers, only look at dates\n if ($(el).hasClass('week')) return;\n\n var title = $(el).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(el).parents('.calendar');\n var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col];\n\n if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) {\n $(el).addClass('in-range');\n } else {\n $(el).removeClass('in-range');\n }\n\n });\n }\n\n },\n\n clickDate: function(e) {\n\n if (!$(e.target).hasClass('available')) return;\n\n var title = $(e.target).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(e.target).parents('.calendar');\n var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];\n\n //\n // this function needs to do a few things:\n // * alternate between selecting a start and end date for the range,\n // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date\n // * if autoapply is enabled, and an end date was chosen, apply the selection\n // * if single date picker mode, and time picker isn't enabled, apply the selection immediately\n // * if one of the inputs above the calendars was focused, cancel that manual input\n //\n\n if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start\n if (this.timePicker) {\n var hour = parseInt(this.container.find('.left .hourselect').val(), 10);\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.left .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n var minute = parseInt(this.container.find('.left .minuteselect').val(), 10);\n var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;\n date = date.clone().hour(hour).minute(minute).second(second);\n }\n this.endDate = null;\n this.setStartDate(date.clone());\n } else if (!this.endDate && date.isBefore(this.startDate)) {\n //special case: clicking the same date for start/end,\n //but the time of the end date is before the start date\n this.setEndDate(this.startDate.clone());\n } else { // picking end\n if (this.timePicker) {\n var hour = parseInt(this.container.find('.right .hourselect').val(), 10);\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.right .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n var minute = parseInt(this.container.find('.right .minuteselect').val(), 10);\n var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;\n date = date.clone().hour(hour).minute(minute).second(second);\n }\n this.setEndDate(date.clone());\n if (this.autoApply) {\n this.calculateChosenLabel();\n this.clickApply();\n }\n }\n\n if (this.singleDatePicker) {\n this.setEndDate(this.startDate);\n if (!this.timePicker)\n this.clickApply();\n }\n\n this.updateView();\n\n //This is to cancel the blur event handler if the mouse was in one of the inputs\n e.stopPropagation();\n\n },\n\n calculateChosenLabel: function() {\n var customRange = true;\n var i = 0;\n for (var range in this.ranges) {\n if (this.timePicker) {\n if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {\n customRange = false;\n this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();\n break;\n }\n } else {\n //ignore times when comparing dates if time picker is not enabled\n if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {\n customRange = false;\n this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();\n break;\n }\n }\n i++;\n }\n if (customRange && this.showCustomRangeLabel) {\n this.chosenLabel = this.container.find('.ranges li:last').addClass('active').html();\n this.showCalendars();\n }\n },\n\n clickApply: function(e) {\n this.hide();\n this.element.trigger('apply.daterangepicker', this);\n },\n\n clickCancel: function(e) {\n this.startDate = this.oldStartDate;\n this.endDate = this.oldEndDate;\n this.hide();\n this.element.trigger('cancel.daterangepicker', this);\n },\n\n monthOrYearChanged: function(e) {\n var isLeft = $(e.target).closest('.calendar').hasClass('left'),\n leftOrRight = isLeft ? 'left' : 'right',\n cal = this.container.find('.calendar.'+leftOrRight);\n\n // Month must be Number for new moment versions\n var month = parseInt(cal.find('.monthselect').val(), 10);\n var year = cal.find('.yearselect').val();\n\n if (!isLeft) {\n if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) {\n month = this.startDate.month();\n year = this.startDate.year();\n }\n }\n\n if (this.minDate) {\n if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) {\n month = this.minDate.month();\n year = this.minDate.year();\n }\n }\n\n if (this.maxDate) {\n if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) {\n month = this.maxDate.month();\n year = this.maxDate.year();\n }\n }\n\n if (isLeft) {\n this.leftCalendar.month.month(month).year(year);\n if (this.linkedCalendars)\n this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month');\n } else {\n this.rightCalendar.month.month(month).year(year);\n if (this.linkedCalendars)\n this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month');\n }\n this.updateCalendars();\n },\n\n timeChanged: function(e) {\n\n var cal = $(e.target).closest('.calendar'),\n isLeft = cal.hasClass('left');\n\n var hour = parseInt(cal.find('.hourselect').val(), 10);\n var minute = parseInt(cal.find('.minuteselect').val(), 10);\n var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0;\n\n if (!this.timePicker24Hour) {\n var ampm = cal.find('.ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n\n if (isLeft) {\n var start = this.startDate.clone();\n start.hour(hour);\n start.minute(minute);\n start.second(second);\n this.setStartDate(start);\n if (this.singleDatePicker) {\n this.endDate = this.startDate.clone();\n } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) {\n this.setEndDate(start.clone());\n }\n } else if (this.endDate) {\n var end = this.endDate.clone();\n end.hour(hour);\n end.minute(minute);\n end.second(second);\n this.setEndDate(end);\n }\n\n //update the calendars so all clickable dates reflect the new time component\n this.updateCalendars();\n\n //update the form inputs above the calendars with the new time\n this.updateFormInputs();\n\n //re-render the time pickers because changing one selection can affect what's enabled in another\n this.renderTimePicker('left');\n this.renderTimePicker('right');\n\n },\n\n formInputsChanged: function(e) {\n var isRight = $(e.target).closest('.calendar').hasClass('right');\n var start = moment(this.container.find('input[name=\"daterangepicker_start\"]').val(), this.locale.format);\n var end = moment(this.container.find('input[name=\"daterangepicker_end\"]').val(), this.locale.format);\n\n if (start.isValid() && end.isValid()) {\n\n if (isRight && end.isBefore(start))\n start = end.clone();\n\n this.setStartDate(start);\n this.setEndDate(end);\n\n if (isRight) {\n this.container.find('input[name=\"daterangepicker_start\"]').val(this.startDate.format(this.locale.format));\n } else {\n this.container.find('input[name=\"daterangepicker_end\"]').val(this.endDate.format(this.locale.format));\n }\n\n }\n\n this.updateView();\n },\n\n formInputsFocused: function(e) {\n\n // Highlight the focused input\n this.container.find('input[name=\"daterangepicker_start\"], input[name=\"daterangepicker_end\"]').removeClass('active');\n $(e.target).addClass('active');\n\n // Set the state such that if the user goes back to using a mouse, \n // the calendars are aware we're selecting the end of the range, not\n // the start. This allows someone to edit the end of a date range without\n // re-selecting the beginning, by clicking on the end date input then\n // using the calendar.\n var isRight = $(e.target).closest('.calendar').hasClass('right');\n if (isRight) {\n this.endDate = null;\n this.setStartDate(this.startDate.clone());\n this.updateView();\n }\n\n },\n\n formInputsBlurred: function(e) {\n\n // this function has one purpose right now: if you tab from the first\n // text input to the second in the UI, the endDate is nulled so that\n // you can click another, but if you tab out without clicking anything\n // or changing the input value, the old endDate should be retained\n\n if (!this.endDate) {\n var val = this.container.find('input[name=\"daterangepicker_end\"]').val();\n var end = moment(val, this.locale.format);\n if (end.isValid()) {\n this.setEndDate(end);\n this.updateView();\n }\n }\n\n },\n\n elementChanged: function() {\n if (!this.element.is('input')) return;\n if (!this.element.val().length) return;\n if (this.element.val().length < this.locale.format.length) return;\n\n var dateString = this.element.val().split(this.locale.separator),\n start = null,\n end = null;\n\n if (dateString.length === 2) {\n start = moment(dateString[0], this.locale.format);\n end = moment(dateString[1], this.locale.format);\n }\n\n if (this.singleDatePicker || start === null || end === null) {\n start = moment(this.element.val(), this.locale.format);\n end = start;\n }\n\n if (!start.isValid() || !end.isValid()) return;\n\n this.setStartDate(start);\n this.setEndDate(end);\n this.updateView();\n },\n\n keydown: function(e) {\n //hide on tab or enter\n if ((e.keyCode === 9) || (e.keyCode === 13)) {\n this.hide();\n }\n },\n\n updateElement: function() {\n if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));\n this.element.trigger('change');\n } else if (this.element.is('input') && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format));\n this.element.trigger('change');\n }\n },\n\n remove: function() {\n this.container.remove();\n this.element.off('.daterangepicker');\n this.element.removeData();\n }\n\n };\n\n $.fn.daterangepicker = function(options, callback) {\n this.each(function() {\n var el = $(this);\n if (el.data('daterangepicker'))\n el.data('daterangepicker').remove();\n el.data('daterangepicker', new DateRangePicker(el, options, callback));\n });\n return this;\n };\n\n return DateRangePicker;\n\n}));\n"]} \ No newline at end of file +{"version":3,"sources":["daterangepicker.js"],"names":["root","factory","define","amd","moment","jquery","daterangepicker","module","exports","jQuery","window","undefined","require","fn","this","$","DateRangePicker","element","options","cb","parentEl","startDate","startOf","endDate","endOf","minDate","maxDate","dateLimit","autoApply","singleDatePicker","showDropdowns","showWeekNumbers","showISOWeekNumbers","showCustomRangeLabel","timePicker","timePicker24Hour","timePickerIncrement","timePickerSeconds","linkedCalendars","autoUpdateInput","alwaysShowCalendars","ranges","opens","hasClass","drops","buttonClasses","applyClass","cancelClass","locale","direction","format","localeData","longDateFormat","separator","applyLabel","cancelLabel","weekLabel","customRangeLabel","daysOfWeek","weekdaysMin","monthNames","monthsShort","firstDay","firstDayOfWeek","callback","isShowing","leftCalendar","rightCalendar","extend","data","template","length","container","appendTo","slice","elem","document","createElement","innerHTML","rangeHtml","value","addClass","isBefore","clone","isAfter","join","isInvalidDate","isCustomDate","iterator","push","shift","start","end","range","is","val","split","setStartDate","setEndDate","add","timepicker","list","find","prepend","hide","show","prependTo","parent","html","on","proxy","clickPrev","clickNext","clickDate","hoverDate","updateFormInputs","monthOrYearChanged","timeChanged","showCalendars","formInputsFocused","formInputsBlurred","formInputsChanged","clickApply","clickCancel","clickRange","hoverRange","click.daterangepicker","focus.daterangepicker","keyup.daterangepicker","elementChanged","keydown.daterangepicker","keydown","toggle","trigger","prototype","constructor","minute","Math","round","floor","updateElement","updateMonthsInView","previousRightTime","updateView","renderTimePicker","removeAttr","removeClass","attr","updateCalendars","month","date","year","subtract","hour","second","parseInt","ampm","renderCalendar","calculateChosenLabel","side","calendar","daysInMonth","lastDay","lastMonth","lastYear","daysInLastMonth","dayOfWeek","day","i","startDay","col","row","curDate","arrow","left","right","dateHtml","currentMonth","currentYear","maxYear","minYear","inMinYear","inMaxYear","monthHtml","m","yearHtml","y","each","index","maxLimit","week","isoWeek","classes","isSame","Date","isoWeekday","isCustom","Array","apply","cname","disabled","replace","selected","timeSelector","i_in_24","time","padded","am_html","pm_html","move","containerTop","parentOffset","top","parentRightEdge","width","offset","scrollTop","scrollLeft","clientWidth","outerHeight","css","outerWidth","e","_outsideClickProxy","outsideClick","oldStartDate","oldEndDate","chosenLabel","off","target","type","closest","hideCalendars","label","getAttribute","dates","cal","parents","title","substr","el","dt","stopPropagation","customRange","isLeft","leftOrRight","isRight","isValid","dateString","keyCode","remove","removeData"],"mappings":"CAQA,SAAAA,EAAAC,GACA,GAAA,kBAAAC,SAAAA,OAAAC,IAEAD,QAAA,SAAA,UAAA,SAAAE,EAAAC,GACA,MAAAL,GAAAM,gBAAAL,EAAAG,EAAAC,SAEA,IAAA,gBAAAE,SAAAA,OAAAC,QAAA,CAGA,GAAAC,GAAA,mBAAAC,QAAAA,OAAAD,OAAAE,MACAF,KACAA,EAAAG,QAAA,UACAH,EAAAI,KAAAJ,EAAAI,QAEAN,OAAAC,QAAAP,EAAAW,QAAA,UAAAH,OAGAT,GAAAM,gBAAAL,EAAAD,EAAAI,OAAAJ,EAAAS,SAEAK,KAAA,SAAAV,EAAAW,GACA,GAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAyGA,GAtGAL,KAAAM,SAAA,OACAN,KAAAG,QAAAF,EAAAE,GACAH,KAAAO,UAAAj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AA3K,KAAA,oBACA2K,EAAA3K,KAAA,mBAAAqL,SACAV,EAAA3K,KAAA,kBAAA,GAAArD,GAAAgO,EAAA9N,EAAA8C,MAEAlD,MAGAE","file":"daterangepicker.min.js","sourcesContent":["/**\n* @version: 2.1.25\n* @author: Dan Grossman http://www.dangrossman.info/\n* @copyright: Copyright (c) 2012-2017 Dan Grossman. All rights reserved.\n* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php\n* @website: https://www.daterangepicker.com/\n*/\n// Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Make globaly available as well\n define(['moment', 'jquery'], function (moment, jquery) {\n return (root.daterangepicker = factory(moment, jquery));\n });\n } else if (typeof module === 'object' && module.exports) {\n // Node / Browserify\n //isomorphic issue\n var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined;\n if (!jQuery) {\n jQuery = require('jquery');\n if (!jQuery.fn) jQuery.fn = {};\n }\n module.exports = factory(require('moment'), jQuery);\n } else {\n // Browser globals\n root.daterangepicker = factory(root.moment, root.jQuery);\n }\n}(this, function(moment, $) {\n var DateRangePicker = function(element, options, cb) {\n\n //default settings for options\n this.parentEl = 'body';\n this.element = $(element);\n this.startDate = moment().startOf('day');\n this.endDate = moment().endOf('day');\n this.minDate = false;\n this.maxDate = false;\n this.dateLimit = false;\n this.autoApply = false;\n this.singleDatePicker = false;\n this.showDropdowns = false;\n this.showWeekNumbers = false;\n this.showISOWeekNumbers = false;\n this.showCustomRangeLabel = true;\n this.timePicker = false;\n this.timePicker24Hour = false;\n this.timePickerIncrement = 1;\n this.timePickerSeconds = false;\n this.linkedCalendars = true;\n this.autoUpdateInput = true;\n this.alwaysShowCalendars = false;\n this.ranges = {};\n\n this.opens = 'right';\n if (this.element.hasClass('pull-right'))\n this.opens = 'left';\n\n this.drops = 'down';\n if (this.element.hasClass('dropup'))\n this.drops = 'up';\n\n this.buttonClasses = 'btn btn-sm';\n this.applyClass = 'btn-success';\n this.cancelClass = 'btn-default';\n\n this.locale = {\n direction: 'ltr',\n format: moment.localeData().longDateFormat('L'),\n separator: ' - ',\n applyLabel: 'Apply',\n cancelLabel: 'Cancel',\n weekLabel: 'W',\n customRangeLabel: 'Custom Range',\n daysOfWeek: moment.weekdaysMin(),\n monthNames: moment.monthsShort(),\n firstDay: moment.localeData().firstDayOfWeek()\n };\n\n this.callback = function() { };\n\n //some state information\n this.isShowing = false;\n this.leftCalendar = {};\n this.rightCalendar = {};\n\n //custom options from user\n if (typeof options !== 'object' || options === null)\n options = {};\n\n //allow setting options with data attributes\n //data-api options will be overwritten with custom javascript options\n options = $.extend(this.element.data(), options);\n\n //html template for the picker UI\n if (typeof options.template !== 'string' && !(options.template instanceof $))\n options.template = '
' +\n '
' +\n '
' +\n '' +\n '' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '' +\n '' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n ' ' +\n '' +\n '
' +\n '
' +\n '
';\n\n this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl);\n this.container = $(options.template).appendTo(this.parentEl);\n\n //\n // handle all the possible options overriding defaults\n //\n\n if (typeof options.locale === 'object') {\n\n if (typeof options.locale.direction === 'string')\n this.locale.direction = options.locale.direction;\n\n if (typeof options.locale.format === 'string')\n this.locale.format = options.locale.format;\n\n if (typeof options.locale.separator === 'string')\n this.locale.separator = options.locale.separator;\n\n if (typeof options.locale.daysOfWeek === 'object')\n this.locale.daysOfWeek = options.locale.daysOfWeek.slice();\n\n if (typeof options.locale.monthNames === 'object')\n this.locale.monthNames = options.locale.monthNames.slice();\n\n if (typeof options.locale.firstDay === 'number')\n this.locale.firstDay = options.locale.firstDay;\n\n if (typeof options.locale.applyLabel === 'string')\n this.locale.applyLabel = options.locale.applyLabel;\n\n if (typeof options.locale.cancelLabel === 'string')\n this.locale.cancelLabel = options.locale.cancelLabel;\n\n if (typeof options.locale.weekLabel === 'string')\n this.locale.weekLabel = options.locale.weekLabel;\n\n if (typeof options.locale.customRangeLabel === 'string'){\n //Support unicode chars in the custom range name.\n var elem = document.createElement('textarea');\n elem.innerHTML = options.locale.customRangeLabel;\n var rangeHtml = elem.value;\n this.locale.customRangeLabel = rangeHtml;\n }\n }\n this.container.addClass(this.locale.direction);\n\n if (typeof options.startDate === 'string')\n this.startDate = moment(options.startDate, this.locale.format);\n\n if (typeof options.endDate === 'string')\n this.endDate = moment(options.endDate, this.locale.format);\n\n if (typeof options.minDate === 'string')\n this.minDate = moment(options.minDate, this.locale.format);\n\n if (typeof options.maxDate === 'string')\n this.maxDate = moment(options.maxDate, this.locale.format);\n\n if (typeof options.startDate === 'object')\n this.startDate = moment(options.startDate);\n\n if (typeof options.endDate === 'object')\n this.endDate = moment(options.endDate);\n\n if (typeof options.minDate === 'object')\n this.minDate = moment(options.minDate);\n\n if (typeof options.maxDate === 'object')\n this.maxDate = moment(options.maxDate);\n\n // sanity check for bad options\n if (this.minDate && this.startDate.isBefore(this.minDate))\n this.startDate = this.minDate.clone();\n\n // sanity check for bad options\n if (this.maxDate && this.endDate.isAfter(this.maxDate))\n this.endDate = this.maxDate.clone();\n\n if (typeof options.applyClass === 'string')\n this.applyClass = options.applyClass;\n\n if (typeof options.cancelClass === 'string')\n this.cancelClass = options.cancelClass;\n\n if (typeof options.dateLimit === 'object')\n this.dateLimit = options.dateLimit;\n\n if (typeof options.opens === 'string')\n this.opens = options.opens;\n\n if (typeof options.drops === 'string')\n this.drops = options.drops;\n\n if (typeof options.showWeekNumbers === 'boolean')\n this.showWeekNumbers = options.showWeekNumbers;\n\n if (typeof options.showISOWeekNumbers === 'boolean')\n this.showISOWeekNumbers = options.showISOWeekNumbers;\n\n if (typeof options.buttonClasses === 'string')\n this.buttonClasses = options.buttonClasses;\n\n if (typeof options.buttonClasses === 'object')\n this.buttonClasses = options.buttonClasses.join(' ');\n\n if (typeof options.showDropdowns === 'boolean')\n this.showDropdowns = options.showDropdowns;\n\n if (typeof options.showCustomRangeLabel === 'boolean')\n this.showCustomRangeLabel = options.showCustomRangeLabel;\n\n if (typeof options.singleDatePicker === 'boolean') {\n this.singleDatePicker = options.singleDatePicker;\n if (this.singleDatePicker)\n this.endDate = this.startDate.clone();\n }\n\n if (typeof options.timePicker === 'boolean')\n this.timePicker = options.timePicker;\n\n if (typeof options.timePickerSeconds === 'boolean')\n this.timePickerSeconds = options.timePickerSeconds;\n\n if (typeof options.timePickerIncrement === 'number')\n this.timePickerIncrement = options.timePickerIncrement;\n\n if (typeof options.timePicker24Hour === 'boolean')\n this.timePicker24Hour = options.timePicker24Hour;\n\n if (typeof options.autoApply === 'boolean')\n this.autoApply = options.autoApply;\n\n if (typeof options.autoUpdateInput === 'boolean')\n this.autoUpdateInput = options.autoUpdateInput;\n\n if (typeof options.linkedCalendars === 'boolean')\n this.linkedCalendars = options.linkedCalendars;\n\n if (typeof options.isInvalidDate === 'function')\n this.isInvalidDate = options.isInvalidDate;\n\n if (typeof options.isCustomDate === 'function')\n this.isCustomDate = options.isCustomDate;\n\n if (typeof options.alwaysShowCalendars === 'boolean')\n this.alwaysShowCalendars = options.alwaysShowCalendars;\n\n // update day names order to firstDay\n if (this.locale.firstDay != 0) {\n var iterator = this.locale.firstDay;\n while (iterator > 0) {\n this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());\n iterator--;\n }\n }\n\n var start, end, range;\n\n //if no start/end dates set, check if an input element contains initial values\n if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {\n if ($(this.element).is('input[type=text]')) {\n var val = $(this.element).val(),\n split = val.split(this.locale.separator);\n\n start = end = null;\n\n if (split.length == 2) {\n start = moment(split[0], this.locale.format);\n end = moment(split[1], this.locale.format);\n } else if (this.singleDatePicker && val !== \"\") {\n start = moment(val, this.locale.format);\n end = moment(val, this.locale.format);\n }\n if (start !== null && end !== null) {\n this.setStartDate(start);\n this.setEndDate(end);\n }\n }\n }\n\n if (typeof options.ranges === 'object') {\n for (range in options.ranges) {\n\n if (typeof options.ranges[range][0] === 'string')\n start = moment(options.ranges[range][0], this.locale.format);\n else\n start = moment(options.ranges[range][0]);\n\n if (typeof options.ranges[range][1] === 'string')\n end = moment(options.ranges[range][1], this.locale.format);\n else\n end = moment(options.ranges[range][1]);\n\n // If the start or end date exceed those allowed by the minDate or dateLimit\n // options, shorten the range to the allowable period.\n if (this.minDate && start.isBefore(this.minDate))\n start = this.minDate.clone();\n\n var maxDate = this.maxDate;\n if (this.dateLimit && maxDate && start.clone().add(this.dateLimit).isAfter(maxDate))\n maxDate = start.clone().add(this.dateLimit);\n if (maxDate && end.isAfter(maxDate))\n end = maxDate.clone();\n\n // If the end of the range is before the minimum or the start of the range is\n // after the maximum, don't display this range option at all.\n if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day')) \n || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day')))\n continue;\n\n //Support unicode chars in the range names.\n var elem = document.createElement('textarea');\n elem.innerHTML = range;\n var rangeHtml = elem.value;\n\n this.ranges[rangeHtml] = [start, end];\n }\n\n var list = '
    ';\n for (range in this.ranges) {\n list += '
  • ' + range + '
  • ';\n }\n if (this.showCustomRangeLabel) {\n list += '
  • ' + this.locale.customRangeLabel + '
  • ';\n }\n list += '
';\n this.container.find('.ranges').prepend(list);\n }\n\n if (typeof cb === 'function') {\n this.callback = cb;\n }\n\n if (!this.timePicker) {\n this.startDate = this.startDate.startOf('day');\n this.endDate = this.endDate.endOf('day');\n this.container.find('.calendar-time').hide();\n }\n\n //can't be used together for now\n if (this.timePicker && this.autoApply)\n this.autoApply = false;\n\n if (this.autoApply && typeof options.ranges !== 'object') {\n this.container.find('.ranges').hide();\n } else if (this.autoApply) {\n this.container.find('.applyBtn, .cancelBtn').addClass('hide');\n }\n\n if (this.singleDatePicker) {\n this.container.addClass('single');\n this.container.find('.calendar.left').addClass('single');\n this.container.find('.calendar.left').show();\n this.container.find('.calendar.right').hide();\n this.container.find('.daterangepicker_input input, .daterangepicker_input > i').hide();\n if (this.timePicker) {\n this.container.find('.ranges ul').hide();\n } else {\n this.container.find('.ranges').hide();\n }\n }\n\n if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) {\n this.container.addClass('show-calendar');\n }\n\n this.container.addClass('opens' + this.opens);\n\n //swap the position of the predefined ranges if opens right\n if (typeof options.ranges !== 'undefined' && this.opens == 'right') {\n this.container.find('.ranges').prependTo( this.container.find('.calendar.left').parent() );\n }\n\n //apply CSS classes and labels to buttons\n this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses);\n if (this.applyClass.length)\n this.container.find('.applyBtn').addClass(this.applyClass);\n if (this.cancelClass.length)\n this.container.find('.cancelBtn').addClass(this.cancelClass);\n this.container.find('.applyBtn').html(this.locale.applyLabel);\n this.container.find('.cancelBtn').html(this.locale.cancelLabel);\n\n //\n // event listeners\n //\n\n this.container.find('.calendar')\n .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))\n .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))\n .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this))\n .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))\n .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this))\n .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this))\n .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this))\n .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this))\n .on('click.daterangepicker', '.daterangepicker_input input', $.proxy(this.showCalendars, this))\n .on('focus.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsFocused, this))\n .on('blur.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsBlurred, this))\n .on('change.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsChanged, this));\n\n this.container.find('.ranges')\n .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))\n .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))\n .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))\n .on('mouseenter.daterangepicker', 'li', $.proxy(this.hoverRange, this))\n .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));\n\n if (this.element.is('input') || this.element.is('button')) {\n this.element.on({\n 'click.daterangepicker': $.proxy(this.show, this),\n 'focus.daterangepicker': $.proxy(this.show, this),\n 'keyup.daterangepicker': $.proxy(this.elementChanged, this),\n 'keydown.daterangepicker': $.proxy(this.keydown, this)\n });\n } else {\n this.element.on('click.daterangepicker', $.proxy(this.toggle, this));\n }\n\n //\n // if attached to a text input, set the initial value\n //\n\n if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));\n this.element.trigger('change');\n } else if (this.element.is('input') && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format));\n this.element.trigger('change');\n }\n\n };\n\n DateRangePicker.prototype = {\n\n constructor: DateRangePicker,\n\n setStartDate: function(startDate) {\n if (typeof startDate === 'string')\n this.startDate = moment(startDate, this.locale.format);\n\n if (typeof startDate === 'object')\n this.startDate = moment(startDate);\n\n if (!this.timePicker)\n this.startDate = this.startDate.startOf('day');\n\n if (this.timePicker && this.timePickerIncrement)\n this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n\n if (this.minDate && this.startDate.isBefore(this.minDate)) {\n this.startDate = this.minDate.clone();\n if (this.timePicker && this.timePickerIncrement)\n this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n }\n\n if (this.maxDate && this.startDate.isAfter(this.maxDate)) {\n this.startDate = this.maxDate.clone();\n if (this.timePicker && this.timePickerIncrement)\n this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n }\n\n if (!this.isShowing)\n this.updateElement();\n\n this.updateMonthsInView();\n },\n\n setEndDate: function(endDate) {\n if (typeof endDate === 'string')\n this.endDate = moment(endDate, this.locale.format);\n\n if (typeof endDate === 'object')\n this.endDate = moment(endDate);\n\n if (!this.timePicker)\n this.endDate = this.endDate.endOf('day');\n\n if (this.timePicker && this.timePickerIncrement)\n this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);\n\n if (this.endDate.isBefore(this.startDate))\n this.endDate = this.startDate.clone();\n\n if (this.maxDate && this.endDate.isAfter(this.maxDate))\n this.endDate = this.maxDate.clone();\n\n if (this.dateLimit && this.startDate.clone().add(this.dateLimit).isBefore(this.endDate))\n this.endDate = this.startDate.clone().add(this.dateLimit);\n\n this.previousRightTime = this.endDate.clone();\n\n if (!this.isShowing)\n this.updateElement();\n\n this.updateMonthsInView();\n },\n\n isInvalidDate: function() {\n return false;\n },\n\n isCustomDate: function() {\n return false;\n },\n\n updateView: function() {\n if (this.timePicker) {\n this.renderTimePicker('left');\n this.renderTimePicker('right');\n if (!this.endDate) {\n this.container.find('.right .calendar-time select').attr('disabled', 'disabled').addClass('disabled');\n } else {\n this.container.find('.right .calendar-time select').removeAttr('disabled').removeClass('disabled');\n }\n }\n if (this.endDate) {\n this.container.find('input[name=\"daterangepicker_end\"]').removeClass('active');\n this.container.find('input[name=\"daterangepicker_start\"]').addClass('active');\n } else {\n this.container.find('input[name=\"daterangepicker_end\"]').addClass('active');\n this.container.find('input[name=\"daterangepicker_start\"]').removeClass('active');\n }\n this.updateMonthsInView();\n this.updateCalendars();\n this.updateFormInputs();\n },\n\n updateMonthsInView: function() {\n if (this.endDate) {\n\n //if both dates are visible already, do nothing\n if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month &&\n (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))\n &&\n (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))\n ) {\n return;\n }\n\n this.leftCalendar.month = this.startDate.clone().date(2);\n if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) {\n this.rightCalendar.month = this.endDate.clone().date(2);\n } else {\n this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');\n }\n\n } else {\n if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) {\n this.leftCalendar.month = this.startDate.clone().date(2);\n this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');\n }\n }\n if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) {\n this.rightCalendar.month = this.maxDate.clone().date(2);\n this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');\n }\n },\n\n updateCalendars: function() {\n\n if (this.timePicker) {\n var hour, minute, second;\n if (this.endDate) {\n hour = parseInt(this.container.find('.left .hourselect').val(), 10);\n minute = parseInt(this.container.find('.left .minuteselect').val(), 10);\n second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.left .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n } else {\n hour = parseInt(this.container.find('.right .hourselect').val(), 10);\n minute = parseInt(this.container.find('.right .minuteselect').val(), 10);\n second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.right .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n }\n this.leftCalendar.month.hour(hour).minute(minute).second(second);\n this.rightCalendar.month.hour(hour).minute(minute).second(second);\n }\n\n this.renderCalendar('left');\n this.renderCalendar('right');\n\n //highlight any predefined range matching the current start and end dates\n this.container.find('.ranges li').removeClass('active');\n if (this.endDate == null) return;\n\n this.calculateChosenLabel();\n },\n\n renderCalendar: function(side) {\n\n //\n // Build the matrix of dates that will populate the calendar\n //\n\n var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar;\n var month = calendar.month.month();\n var year = calendar.month.year();\n var hour = calendar.month.hour();\n var minute = calendar.month.minute();\n var second = calendar.month.second();\n var daysInMonth = moment([year, month]).daysInMonth();\n var firstDay = moment([year, month, 1]);\n var lastDay = moment([year, month, daysInMonth]);\n var lastMonth = moment(firstDay).subtract(1, 'month').month();\n var lastYear = moment(firstDay).subtract(1, 'month').year();\n var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();\n var dayOfWeek = firstDay.day();\n\n //initialize a 6 rows x 7 columns array for the calendar\n var calendar = [];\n calendar.firstDay = firstDay;\n calendar.lastDay = lastDay;\n\n for (var i = 0; i < 6; i++) {\n calendar[i] = [];\n }\n\n //populate the calendar with date objects\n var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;\n if (startDay > daysInLastMonth)\n startDay -= 7;\n\n if (dayOfWeek == this.locale.firstDay)\n startDay = daysInLastMonth - 6;\n\n var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]);\n\n var col, row;\n for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) {\n if (i > 0 && col % 7 === 0) {\n col = 0;\n row++;\n }\n calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second);\n curDate.hour(12);\n\n if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') {\n calendar[row][col] = this.minDate.clone();\n }\n\n if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') {\n calendar[row][col] = this.maxDate.clone();\n }\n\n }\n\n //make the calendar object available to hoverDate/clickDate\n if (side == 'left') {\n this.leftCalendar.calendar = calendar;\n } else {\n this.rightCalendar.calendar = calendar;\n }\n\n //\n // Display the calendar\n //\n\n var minDate = side == 'left' ? this.minDate : this.startDate;\n var maxDate = this.maxDate;\n var selected = side == 'left' ? this.startDate : this.endDate;\n var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'};\n\n var html = '';\n html += '';\n html += '';\n\n // add empty cell for week number\n if (this.showWeekNumbers || this.showISOWeekNumbers)\n html += '';\n\n if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) {\n html += '';\n } else {\n html += '';\n }\n\n var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(\" YYYY\");\n\n if (this.showDropdowns) {\n var currentMonth = calendar[1][1].month();\n var currentYear = calendar[1][1].year();\n var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);\n var minYear = (minDate && minDate.year()) || (currentYear - 50);\n var inMinYear = currentYear == minYear;\n var inMaxYear = currentYear == maxYear;\n\n var monthHtml = '\";\n\n var yearHtml = '';\n\n dateHtml = monthHtml + yearHtml;\n }\n\n html += '';\n if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) {\n html += '';\n } else {\n html += '';\n }\n\n html += '';\n html += '';\n\n // add week number label\n if (this.showWeekNumbers || this.showISOWeekNumbers)\n html += '';\n\n $.each(this.locale.daysOfWeek, function(index, dayOfWeek) {\n html += '';\n });\n\n html += '';\n html += '';\n html += '';\n\n //adjust maxDate to reflect the dateLimit setting in order to\n //grey out end dates beyond the dateLimit\n if (this.endDate == null && this.dateLimit) {\n var maxLimit = this.startDate.clone().add(this.dateLimit).endOf('day');\n if (!maxDate || maxLimit.isBefore(maxDate)) {\n maxDate = maxLimit;\n }\n }\n\n for (var row = 0; row < 6; row++) {\n html += '';\n\n // add week number\n if (this.showWeekNumbers)\n html += '';\n else if (this.showISOWeekNumbers)\n html += '';\n\n for (var col = 0; col < 7; col++) {\n\n var classes = [];\n\n //highlight today's date\n if (calendar[row][col].isSame(new Date(), \"day\"))\n classes.push('today');\n\n //highlight weekends\n if (calendar[row][col].isoWeekday() > 5)\n classes.push('weekend');\n\n //grey out the dates in other months displayed at beginning and end of this calendar\n if (calendar[row][col].month() != calendar[1][1].month())\n classes.push('off');\n\n //don't allow selection of dates before the minimum date\n if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day'))\n classes.push('off', 'disabled');\n\n //don't allow selection of dates after the maximum date\n if (maxDate && calendar[row][col].isAfter(maxDate, 'day'))\n classes.push('off', 'disabled');\n\n //don't allow selection of date if a custom function decides it's invalid\n if (this.isInvalidDate(calendar[row][col]))\n classes.push('off', 'disabled');\n\n //highlight the currently selected start date\n if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD'))\n classes.push('active', 'start-date');\n\n //highlight the currently selected end date\n if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD'))\n classes.push('active', 'end-date');\n\n //highlight dates in-between the selected dates\n if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate)\n classes.push('in-range');\n\n //apply custom classes for this date\n var isCustom = this.isCustomDate(calendar[row][col]);\n if (isCustom !== false) {\n if (typeof isCustom === 'string')\n classes.push(isCustom);\n else\n Array.prototype.push.apply(classes, isCustom);\n }\n\n var cname = '', disabled = false;\n for (var i = 0; i < classes.length; i++) {\n cname += classes[i] + ' ';\n if (classes[i] == 'disabled')\n disabled = true;\n }\n if (!disabled)\n cname += 'available';\n\n html += '';\n\n }\n html += '';\n }\n\n html += '';\n html += '
' + dateHtml + '
' + this.locale.weekLabel + '' + dayOfWeek + '
' + calendar[row][0].week() + '' + calendar[row][0].isoWeek() + '' + calendar[row][col].date() + '
';\n\n this.container.find('.calendar.' + side + ' .calendar-table').html(html);\n\n },\n\n renderTimePicker: function(side) {\n\n // Don't bother updating the time picker if it's currently disabled\n // because an end date hasn't been clicked yet\n if (side == 'right' && !this.endDate) return;\n\n var html, selected, minDate, maxDate = this.maxDate;\n\n if (this.dateLimit && (!this.maxDate || this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)))\n maxDate = this.startDate.clone().add(this.dateLimit);\n\n if (side == 'left') {\n selected = this.startDate.clone();\n minDate = this.minDate;\n } else if (side == 'right') {\n selected = this.endDate.clone();\n minDate = this.startDate;\n\n //Preserve the time already selected\n var timeSelector = this.container.find('.calendar.right .calendar-time div');\n if (timeSelector.html() != '') {\n\n selected.hour(timeSelector.find('.hourselect option:selected').val() || selected.hour());\n selected.minute(timeSelector.find('.minuteselect option:selected').val() || selected.minute());\n selected.second(timeSelector.find('.secondselect option:selected').val() || selected.second());\n\n if (!this.timePicker24Hour) {\n var ampm = timeSelector.find('.ampmselect option:selected').val();\n if (ampm === 'PM' && selected.hour() < 12)\n selected.hour(selected.hour() + 12);\n if (ampm === 'AM' && selected.hour() === 12)\n selected.hour(0);\n }\n\n }\n\n if (selected.isBefore(this.startDate))\n selected = this.startDate.clone();\n\n if (maxDate && selected.isAfter(maxDate))\n selected = maxDate.clone();\n\n }\n\n //\n // hours\n //\n\n html = ' ';\n\n //\n // minutes\n //\n\n html += ': ';\n\n //\n // seconds\n //\n\n if (this.timePickerSeconds) {\n html += ': ';\n }\n\n //\n // AM/PM\n //\n\n if (!this.timePicker24Hour) {\n html += '';\n }\n\n this.container.find('.calendar.' + side + ' .calendar-time div').html(html);\n\n },\n\n updateFormInputs: function() {\n\n //ignore mouse movements while an above-calendar text input has focus\n if (this.container.find('input[name=daterangepicker_start]').is(\":focus\") || this.container.find('input[name=daterangepicker_end]').is(\":focus\"))\n return;\n\n this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.locale.format));\n if (this.endDate)\n this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.locale.format));\n\n if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) {\n this.container.find('button.applyBtn').removeAttr('disabled');\n } else {\n this.container.find('button.applyBtn').attr('disabled', 'disabled');\n }\n\n },\n\n move: function() {\n var parentOffset = { top: 0, left: 0 },\n containerTop;\n var parentRightEdge = $(window).width();\n if (!this.parentEl.is('body')) {\n parentOffset = {\n top: this.parentEl.offset().top - this.parentEl.scrollTop(),\n left: this.parentEl.offset().left - this.parentEl.scrollLeft()\n };\n parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left;\n }\n\n if (this.drops == 'up')\n containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top;\n else\n containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top;\n this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('dropup');\n\n if (this.opens == 'left') {\n this.container.css({\n top: containerTop,\n right: parentRightEdge - this.element.offset().left - this.element.outerWidth(),\n left: 'auto'\n });\n if (this.container.offset().left < 0) {\n this.container.css({\n right: 'auto',\n left: 9\n });\n }\n } else if (this.opens == 'center') {\n this.container.css({\n top: containerTop,\n left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2\n - this.container.outerWidth() / 2,\n right: 'auto'\n });\n if (this.container.offset().left < 0) {\n this.container.css({\n right: 'auto',\n left: 9\n });\n }\n } else {\n this.container.css({\n top: containerTop,\n left: this.element.offset().left - parentOffset.left,\n right: 'auto'\n });\n if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {\n this.container.css({\n left: 'auto',\n right: 0\n });\n }\n }\n },\n\n show: function(e) {\n if (this.isShowing) return;\n\n // Create a click proxy that is private to this instance of datepicker, for unbinding\n this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this);\n\n // Bind global datepicker mousedown for hiding and\n $(document)\n .on('mousedown.daterangepicker', this._outsideClickProxy)\n // also support mobile devices\n .on('touchend.daterangepicker', this._outsideClickProxy)\n // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them\n .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)\n // and also close when focus changes to outside the picker (eg. tabbing between controls)\n .on('focusin.daterangepicker', this._outsideClickProxy);\n\n // Reposition the picker if the window is resized while it's open\n $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this));\n\n this.oldStartDate = this.startDate.clone();\n this.oldEndDate = this.endDate.clone();\n this.previousRightTime = this.endDate.clone();\n\n this.updateView();\n this.container.show();\n this.move();\n this.element.trigger('show.daterangepicker', this);\n this.isShowing = true;\n },\n\n hide: function(e) {\n if (!this.isShowing) return;\n\n //incomplete date selection, revert to last values\n if (!this.endDate) {\n this.startDate = this.oldStartDate.clone();\n this.endDate = this.oldEndDate.clone();\n }\n\n //if a new date range was selected, invoke the user callback function\n if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))\n this.callback(this.startDate, this.endDate, this.chosenLabel);\n\n //if picker is attached to a text input, update it\n this.updateElement();\n\n $(document).off('.daterangepicker');\n $(window).off('.daterangepicker');\n this.container.hide();\n this.element.trigger('hide.daterangepicker', this);\n this.isShowing = false;\n },\n\n toggle: function(e) {\n if (this.isShowing) {\n this.hide();\n } else {\n this.show();\n }\n },\n\n outsideClick: function(e) {\n var target = $(e.target);\n // if the page is clicked anywhere except within the daterangerpicker/button\n // itself then call this.hide()\n if (\n // ie modal dialog fix\n e.type == \"focusin\" ||\n target.closest(this.element).length ||\n target.closest(this.container).length ||\n target.closest('.calendar-table').length\n ) return;\n this.hide();\n this.element.trigger('outsideClick.daterangepicker', this);\n },\n\n showCalendars: function() {\n this.container.addClass('show-calendar');\n this.move();\n this.element.trigger('showCalendar.daterangepicker', this);\n },\n\n hideCalendars: function() {\n this.container.removeClass('show-calendar');\n this.element.trigger('hideCalendar.daterangepicker', this);\n },\n\n hoverRange: function(e) {\n\n //ignore mouse movements while an above-calendar text input has focus\n if (this.container.find('input[name=daterangepicker_start]').is(\":focus\") || this.container.find('input[name=daterangepicker_end]').is(\":focus\"))\n return;\n\n var label = e.target.getAttribute('data-range-key');\n\n if (label == this.locale.customRangeLabel) {\n this.updateView();\n } else {\n var dates = this.ranges[label];\n this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.locale.format));\n this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.locale.format));\n }\n\n },\n\n clickRange: function(e) {\n var label = e.target.getAttribute('data-range-key');\n this.chosenLabel = label;\n if (label == this.locale.customRangeLabel) {\n this.showCalendars();\n } else {\n var dates = this.ranges[label];\n this.startDate = dates[0];\n this.endDate = dates[1];\n\n if (!this.timePicker) {\n this.startDate.startOf('day');\n this.endDate.endOf('day');\n }\n\n if (!this.alwaysShowCalendars)\n this.hideCalendars();\n this.clickApply();\n }\n },\n\n clickPrev: function(e) {\n var cal = $(e.target).parents('.calendar');\n if (cal.hasClass('left')) {\n this.leftCalendar.month.subtract(1, 'month');\n if (this.linkedCalendars)\n this.rightCalendar.month.subtract(1, 'month');\n } else {\n this.rightCalendar.month.subtract(1, 'month');\n }\n this.updateCalendars();\n },\n\n clickNext: function(e) {\n var cal = $(e.target).parents('.calendar');\n if (cal.hasClass('left')) {\n this.leftCalendar.month.add(1, 'month');\n } else {\n this.rightCalendar.month.add(1, 'month');\n if (this.linkedCalendars)\n this.leftCalendar.month.add(1, 'month');\n }\n this.updateCalendars();\n },\n\n hoverDate: function(e) {\n\n //ignore mouse movements while an above-calendar text input has focus\n //if (this.container.find('input[name=daterangepicker_start]').is(\":focus\") || this.container.find('input[name=daterangepicker_end]').is(\":focus\"))\n // return;\n\n //ignore dates that can't be selected\n if (!$(e.target).hasClass('available')) return;\n\n //have the text inputs above calendars reflect the date being hovered over\n var title = $(e.target).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(e.target).parents('.calendar');\n var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];\n\n if (this.endDate && !this.container.find('input[name=daterangepicker_start]').is(\":focus\")) {\n this.container.find('input[name=daterangepicker_start]').val(date.format(this.locale.format));\n } else if (!this.endDate && !this.container.find('input[name=daterangepicker_end]').is(\":focus\")) {\n this.container.find('input[name=daterangepicker_end]').val(date.format(this.locale.format));\n }\n\n //highlight the dates between the start date and the date being hovered as a potential end date\n var leftCalendar = this.leftCalendar;\n var rightCalendar = this.rightCalendar;\n var startDate = this.startDate;\n if (!this.endDate) {\n this.container.find('.calendar tbody td').each(function(index, el) {\n\n //skip week numbers, only look at dates\n if ($(el).hasClass('week')) return;\n\n var title = $(el).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(el).parents('.calendar');\n var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col];\n\n if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) {\n $(el).addClass('in-range');\n } else {\n $(el).removeClass('in-range');\n }\n\n });\n }\n\n },\n\n clickDate: function(e) {\n\n if (!$(e.target).hasClass('available')) return;\n\n var title = $(e.target).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(e.target).parents('.calendar');\n var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col];\n\n //\n // this function needs to do a few things:\n // * alternate between selecting a start and end date for the range,\n // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date\n // * if autoapply is enabled, and an end date was chosen, apply the selection\n // * if single date picker mode, and time picker isn't enabled, apply the selection immediately\n // * if one of the inputs above the calendars was focused, cancel that manual input\n //\n\n if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start\n if (this.timePicker) {\n var hour = parseInt(this.container.find('.left .hourselect').val(), 10);\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.left .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n var minute = parseInt(this.container.find('.left .minuteselect').val(), 10);\n var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0;\n date = date.clone().hour(hour).minute(minute).second(second);\n }\n this.endDate = null;\n this.setStartDate(date.clone());\n } else if (!this.endDate && date.isBefore(this.startDate)) {\n //special case: clicking the same date for start/end,\n //but the time of the end date is before the start date\n this.setEndDate(this.startDate.clone());\n } else { // picking end\n if (this.timePicker) {\n var hour = parseInt(this.container.find('.right .hourselect').val(), 10);\n if (!this.timePicker24Hour) {\n var ampm = this.container.find('.right .ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n var minute = parseInt(this.container.find('.right .minuteselect').val(), 10);\n var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0;\n date = date.clone().hour(hour).minute(minute).second(second);\n }\n this.setEndDate(date.clone());\n if (this.autoApply) {\n this.calculateChosenLabel();\n this.clickApply();\n }\n }\n\n if (this.singleDatePicker) {\n this.setEndDate(this.startDate);\n if (!this.timePicker)\n this.clickApply();\n }\n\n this.updateView();\n\n //This is to cancel the blur event handler if the mouse was in one of the inputs\n e.stopPropagation();\n\n },\n\n calculateChosenLabel: function () {\n var customRange = true;\n var i = 0;\n for (var range in this.ranges) {\n if (this.timePicker) {\n if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {\n customRange = false;\n this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();\n break;\n }\n } else {\n //ignore times when comparing dates if time picker is not enabled\n if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {\n customRange = false;\n this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').html();\n break;\n }\n }\n i++;\n }\n if (customRange) {\n if (this.showCustomRangeLabel) {\n this.chosenLabel = this.container.find('.ranges li:last').addClass('active').html();\n } else {\n this.chosenLabel = null;\n }\n this.showCalendars();\n }\n },\n\n clickApply: function(e) {\n this.hide();\n this.element.trigger('apply.daterangepicker', this);\n },\n\n clickCancel: function(e) {\n this.startDate = this.oldStartDate;\n this.endDate = this.oldEndDate;\n this.hide();\n this.element.trigger('cancel.daterangepicker', this);\n },\n\n monthOrYearChanged: function(e) {\n var isLeft = $(e.target).closest('.calendar').hasClass('left'),\n leftOrRight = isLeft ? 'left' : 'right',\n cal = this.container.find('.calendar.'+leftOrRight);\n\n // Month must be Number for new moment versions\n var month = parseInt(cal.find('.monthselect').val(), 10);\n var year = cal.find('.yearselect').val();\n\n if (!isLeft) {\n if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) {\n month = this.startDate.month();\n year = this.startDate.year();\n }\n }\n\n if (this.minDate) {\n if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) {\n month = this.minDate.month();\n year = this.minDate.year();\n }\n }\n\n if (this.maxDate) {\n if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) {\n month = this.maxDate.month();\n year = this.maxDate.year();\n }\n }\n\n if (isLeft) {\n this.leftCalendar.month.month(month).year(year);\n if (this.linkedCalendars)\n this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month');\n } else {\n this.rightCalendar.month.month(month).year(year);\n if (this.linkedCalendars)\n this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month');\n }\n this.updateCalendars();\n },\n\n timeChanged: function(e) {\n\n var cal = $(e.target).closest('.calendar'),\n isLeft = cal.hasClass('left');\n\n var hour = parseInt(cal.find('.hourselect').val(), 10);\n var minute = parseInt(cal.find('.minuteselect').val(), 10);\n var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0;\n\n if (!this.timePicker24Hour) {\n var ampm = cal.find('.ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n\n if (isLeft) {\n var start = this.startDate.clone();\n start.hour(hour);\n start.minute(minute);\n start.second(second);\n this.setStartDate(start);\n if (this.singleDatePicker) {\n this.endDate = this.startDate.clone();\n } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) {\n this.setEndDate(start.clone());\n }\n } else if (this.endDate) {\n var end = this.endDate.clone();\n end.hour(hour);\n end.minute(minute);\n end.second(second);\n this.setEndDate(end);\n }\n\n //update the calendars so all clickable dates reflect the new time component\n this.updateCalendars();\n\n //update the form inputs above the calendars with the new time\n this.updateFormInputs();\n\n //re-render the time pickers because changing one selection can affect what's enabled in another\n this.renderTimePicker('left');\n this.renderTimePicker('right');\n\n },\n\n formInputsChanged: function(e) {\n var isRight = $(e.target).closest('.calendar').hasClass('right');\n var start = moment(this.container.find('input[name=\"daterangepicker_start\"]').val(), this.locale.format);\n var end = moment(this.container.find('input[name=\"daterangepicker_end\"]').val(), this.locale.format);\n\n if (start.isValid() && end.isValid()) {\n\n if (isRight && end.isBefore(start))\n start = end.clone();\n\n this.setStartDate(start);\n this.setEndDate(end);\n\n if (isRight) {\n this.container.find('input[name=\"daterangepicker_start\"]').val(this.startDate.format(this.locale.format));\n } else {\n this.container.find('input[name=\"daterangepicker_end\"]').val(this.endDate.format(this.locale.format));\n }\n\n }\n\n this.updateView();\n },\n\n formInputsFocused: function(e) {\n\n // Highlight the focused input\n this.container.find('input[name=\"daterangepicker_start\"], input[name=\"daterangepicker_end\"]').removeClass('active');\n $(e.target).addClass('active');\n\n // Set the state such that if the user goes back to using a mouse, \n // the calendars are aware we're selecting the end of the range, not\n // the start. This allows someone to edit the end of a date range without\n // re-selecting the beginning, by clicking on the end date input then\n // using the calendar.\n var isRight = $(e.target).closest('.calendar').hasClass('right');\n if (isRight) {\n this.endDate = null;\n this.setStartDate(this.startDate.clone());\n this.updateView();\n }\n\n },\n\n formInputsBlurred: function(e) {\n\n // this function has one purpose right now: if you tab from the first\n // text input to the second in the UI, the endDate is nulled so that\n // you can click another, but if you tab out without clicking anything\n // or changing the input value, the old endDate should be retained\n\n if (!this.endDate) {\n var val = this.container.find('input[name=\"daterangepicker_end\"]').val();\n var end = moment(val, this.locale.format);\n if (end.isValid()) {\n this.setEndDate(end);\n this.updateView();\n }\n }\n\n },\n\n elementChanged: function() {\n if (!this.element.is('input')) return;\n if (!this.element.val().length) return;\n if (this.element.val().length < this.locale.format.length) return;\n\n var dateString = this.element.val().split(this.locale.separator),\n start = null,\n end = null;\n\n if (dateString.length === 2) {\n start = moment(dateString[0], this.locale.format);\n end = moment(dateString[1], this.locale.format);\n }\n\n if (this.singleDatePicker || start === null || end === null) {\n start = moment(this.element.val(), this.locale.format);\n end = start;\n }\n\n if (!start.isValid() || !end.isValid()) return;\n\n this.setStartDate(start);\n this.setEndDate(end);\n this.updateView();\n },\n\n keydown: function(e) {\n //hide on tab or enter\n if ((e.keyCode === 9) || (e.keyCode === 13)) {\n this.hide();\n }\n },\n\n updateElement: function() {\n if (this.element.is('input') && !this.singleDatePicker && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));\n this.element.trigger('change');\n } else if (this.element.is('input') && this.autoUpdateInput) {\n this.element.val(this.startDate.format(this.locale.format));\n this.element.trigger('change');\n }\n },\n\n remove: function() {\n this.container.remove();\n this.element.off('.daterangepicker');\n this.element.removeData();\n }\n\n };\n\n $.fn.daterangepicker = function(options, callback) {\n this.each(function() {\n var el = $(this);\n if (el.data('daterangepicker'))\n el.data('daterangepicker').remove();\n el.data('daterangepicker', new DateRangePicker(el, options, callback));\n });\n return this;\n };\n\n return DateRangePicker;\n\n}));\n"]} \ No newline at end of file