Index: arms/detail.html =================================================================== diff -u -r37841a34ca3a53420ebf88620e99d407c2a39ddd -r7195fdbbd3ed57697e38ae5a601d5477e5483548 --- arms/detail.html (.../detail.html) (revision 37841a34ca3a53420ebf88620e99d407c2a39ddd) +++ arms/detail.html (.../detail.html) (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -95,946 +95,165 @@ - - + - - + + + - - - - + + + + + + + + + + + - - + + + + - - + + + - - - - - + + - - - + + + + + + + - - - - - - - -
-

- - - -

-
-
-
-
-
- - - -
-
-
-
- - - - - -
-
-
-
- -
- - 담당 이슈 현황 -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
- - 담당 이슈 현황 -
-
-
-
-
- -
-
- -
-
-
- - - - -
-
- -
-

요구사항 상세정보

-

요구사항의 상세정보를 확인할 수 있습니다.

-
-
-
-
- - - 요구사항 상세정보 - -
-
-
- -
-
-
-
-
-
- -
-
    -
  • -
    - 제품(서비스) : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 아이디 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 제목 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 연관 버전 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 작성일 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 작성자 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 제품(서비스) 리뷰어 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - -
    -
    -
    -
    - -
    -
    -
  • -
- -
- -
-
    -
  • -
    - 요구사항 내용 -
    -
  • -
-
-
- - - - -
- -
-
-
-

-

-
-
-
-
-
-
-
-
- - -
-
- -
-

버전별 상세정보

-

제품(서비스)의 버전별 상세 정보를 확인할 수 있습니다.

-
- -
- -
-
-
-
- - - 버전 목록 - -
-
-
-
- 제품(서비스) :  -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-
-
- - - 버전 상세정보 - -
-
-
-
- 선택한 버전 :  -
-
-
-
-
-
-
-
    - -
  • -
    - 버전 구현 시작일 : -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    - 버전 구현 종료일 : -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    - 버전 내용 -
    -
    -
    - -
    - -
    -
  • -
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-
-

요구사항 전체 목록

-

제품(서비스)의 요구사항 전체 목록을 확인할 수 있습니다.

-
- -
- -
-
-
-
- - - 요구사항 전체 목록 - -
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- - -
-
-
-
- - - 선택한 요구사항 상세정보 - -
-
-
- -
-
-
-
-
-
-
-
    - -
  • -
    - 요구사항 연관 버전 : -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    - 요구사항 아이디 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 제목 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 작성자 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 요구사항 최근 작성일 : -
    -
    -
    -
    - -
    -
    -
  • -
  • -
    - 제품(서비스) 리뷰어 : -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    -
    -
    -
    -
    - -
    -
    -
  • - -
  • -
    -
    -
    -
    -
    - -
    -
    -
  • - - -
  • -
    - 요구사항 내용 -
    -
    -
    - - - -
    -
  • -
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
- -
-

제품 기획서

-

제품(서비스)관련 이미지, 문서, 기타 파일 등을 확인할 수 있습니다.

-
- -
-
-
    -
  • All
  • -
  • Image
  • -
  • Document
  • -
  • Etc
  • -
-
-
- -
-
- -
-
- - -
-
-
-

Q & A

-

제품(서비스)에 대한 질문 및 답변을 확인할 수 있습니다.

-
-
-
-
- - - 질문 목록 - -
-
-
-
-
-
-
-
-
-
-
    -
-
- -
-
- - -
-
-
- -
-
- -
-
- - - - - -
- - -
- - - 어플리케이션 API Data를 가져오는 중입니다... - +
+ 맨위로
- - - - - - + + - - + + - \ No newline at end of file + Index: arms/html/detail/page-sidebar.html =================================================================== diff -u --- arms/html/detail/page-sidebar.html (revision 0) +++ arms/html/detail/page-sidebar.html (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,226 @@ + + + + + + + + + Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/.gitattributes =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/.gitattributes (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/.gitattributes (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,8 @@ +# Auto detect text files and perform LF normalization +* text=auto eol=lf + +# Don't diff or textually merge source maps +*.map binary + +# Avoid unreadable diffs for generated text files, eg: *.min.js +*.min.* binary Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/.gitignore =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/.gitignore (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/.gitignore (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,4 @@ +.idea +node_modules/ +bower_components/ +*.log Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/CHANGELOG.md =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/CHANGELOG.md (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/CHANGELOG.md (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,24 @@ + +### 0.0.8 + +* support week numbers +* support to select forward/backward +* support mobile browsers +* fix many bugs and style issues + +### 0.0.7 + +* add hovering effect on day elements +* add sticky month mode +* add single month mode +* enable adding elements on each day element +* available to hide the top bar +* no longer support IE6,7 +* fix many bugs and style issues + +### 0.0.5 + +* enable control by script +* enable batch mode ( select week or month by one click ) +* fixed some position issues +* fixed some time related bugs Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/LICENSE.txt =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/LICENSE.txt (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/LICENSE.txt (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Chunlong + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/README.md =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/README.md (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/README.md (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,53 @@ +# jQuery Date Range Picker Plugin + +[![CDNJS](https://img.shields.io/cdnjs/v/jquery-date-range-picker.svg)](https://cdnjs.com/libraries/jquery-date-range-picker) +[![Bower Version](https://img.shields.io/bower/v/jquery-date-range-picker.svg?maxAge=3600)]() +[![License](https://img.shields.io/github/license/longbill/jquery-date-range-picker.svg?maxAge=2592000)]() + +jQuery Date Range Picker is a jQuery plugin that allows a user to select a date range. + +* Requires jQuery 1.7+, Moment 2.8.1+ +* Supports IE7+, Firefox, Chrome, Safari and other standard HTML5 browsers +* Supports multi-language +* Fully CSS styled + +## Documentation & Demo +Documentation and demonstrations can be found here: https://longbill.github.io/jquery-date-range-picker + +![screenshot](https://raw.github.com/longbill/jquery-date-range-picker/master/preview.jpg) + +## Setup on development machine +* Install node.js [Ubuntu/Mac](https://github.com/creationix/nvm) , [Windows](https://nodejs.org/en/download/) +* Update npm to latest version +``` +npm install -g npm +``` +* Install gulp v3.9.1 (global install) +``` +npm install -g gulp@3.9.1 +``` +* Clone this project +``` +git clone https://github.com/longbill/jquery-date-range-picker.git +cd jquery-date-range-picker +``` +* Install local dependencies +``` +npm install +``` +* Generate new minified (dist) files by reading from the `src` folder +``` +gulp +``` + +* Build and tag a new version using [`npm version` command](https://docs.npmjs.com/cli/version) according to [Semantic Versioning](https://semver.org) best practices. + +``` +npm version +``` + +## Change log +* See [changelog](CHANGELOG.md) + +## License +This date range picker plugin is under MIT LICENSE Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/bower.json =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/bower.json (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/bower.json (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,43 @@ +{ + "name": "jquery-date-range-picker", + "homepage": "https://github.com/longbill/jquery-date-range-picker", + "authors": [ + "" + ], + "description": "jQuery Date Range Picker is a jQuery plugin that allows user to select a date range.", + "main": [ + "./src/jquery.daterangepicker.js", + "./src/daterangepicker.css" + ], + "moduleType": [ + "amd", + "globals" + ], + "keywords": [ + "jquery", + "date", + "daterange", + "date", + "picker", + "range" + ], + "repository": { + "type": "git", + "url": "git://github.com/longbill/jquery-date-range-picker.git" + }, + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "preview.jpg", + "CHANGELOG.md", + "gulpfile.js" + ], + "dependencies": { + "moment": ">=2.8.1", + "jquery": ">=1.3.2" + } +} Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/demo.js =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/demo.js (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/demo.js (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,518 @@ +$(function() +{ + + if (!window['console']) + { + window.console = {}; + window.console.log = function(){}; + } + + /** + * Assign an id to each of the demo elements for easy reference. + */ + $('li.demo').each(function(index) { + $(this).attr('id', 'demo' + (index + 1)); + }); + + /* + define a new language named "custom" + */ + + $.dateRangePickerLanguages['custom'] = + { + 'selected': 'Choosed:', + 'days': 'Days', + 'apply': 'Close', + 'week-1' : 'Mon', + 'week-2' : 'Tue', + 'week-3' : 'Wed', + 'week-4' : 'Thu', + 'week-5' : 'Fri', + 'week-6' : 'Sat', + 'week-7' : 'Sun', + 'month-name': ['January','February','March','April','May','June','July','August','September','October','November','December'], + 'shortcuts' : 'Shortcuts', + 'past': 'Past', + '7days' : '7days', + '14days' : '14days', + '30days' : '30days', + 'previous' : 'Previous', + 'prev-week' : 'Week', + 'prev-month' : 'Month', + 'prev-quarter' : 'Quarter', + 'prev-year' : 'Year', + 'less-than' : 'Date range should longer than %d days', + 'more-than' : 'Date range should less than %d days', + 'default-more' : 'Please select a date range longer than %d days', + 'default-less' : 'Please select a date range less than %d days', + 'default-range' : 'Please select a date range between %d and %d days', + 'default-default': 'This is costom language' + }; + + $('#date-range0').dateRangePicker( + { + }).on('datepicker-first-date-selected', function(event, obj) + { + /* This event will be triggered when first date is selected */ + console.log('first-date-selected',obj); + // obj will be something like this: + // { + // date1: (Date object of the earlier date) + // } + }) + .on('datepicker-change',function(event,obj) + { + /* This event will be triggered when second date is selected */ + console.log('change',obj); + // obj will be something like this: + // { + // date1: (Date object of the earlier date), + // date2: (Date object of the later date), + // value: "2013-06-05 to 2013-06-07" + // } + }) + .on('datepicker-apply',function(event,obj) + { + /* This event will be triggered when user clicks on the apply button */ + console.log('apply',obj); + }) + .on('datepicker-close',function() + { + /* This event will be triggered before date range picker close animation */ + console.log('before close'); + }) + .on('datepicker-closed',function() + { + /* This event will be triggered after date range picker close animation */ + console.log('after close'); + }) + .on('datepicker-open',function() + { + /* This event will be triggered before date range picker open animation */ + console.log('before open'); + }) + .on('datepicker-opened',function() + { + /* This event will be triggered after date range picker open animation */ + console.log('after open'); + }); + + + + $('#date-range1').dateRangePicker( + { + startOfWeek: 'monday', + separator : ' ~ ', + format: 'DD.MM.YYYY HH:mm', + autoClose: false, + time: { + enabled: true + } + }); + $('#date-range1-1').dateRangePicker( + { + startOfWeek: 'monday', + separator : ' ~ ', + format: 'DD.MM.YYYY HH:mm', + autoClose: false, + time: { + enabled: true + }, + defaultTime: moment().startOf('day').toDate(), + defaultEndTime: moment().endOf('day').toDate() + }); + $('#date-range2').dateRangePicker(); + + $('#date-range3').dateRangePicker( + { + language:'cn' + }); + + $('#date-range4').dateRangePicker( + { + language:'en' + }); + + $('#date-range105').dateRangePicker( + { + showCustomValues: true, + customValueLabel: 'Dynamic Ranges', + customValues: + [ + { + name: 'MTD', + value: 'Month To Date' + }, + { + name: 'YTD', + value: 'Year To Date' + } + ] + }) + + $('#date-range100').dateRangePicker( + { + shortcuts : null, + startOfWeek: 'sunday', + language:'en', + showShortcuts: true, + customShortcuts: + [ + //if return an array of two dates, it will select the date range between the two dates + { + name: 'this week', + dates : function() + { + var start = moment().day(0).toDate(); + var end = moment().day(6).toDate(); + // start.setDate(1); + // end.setDate(30); + return [start,end]; + } + }, + //if only return an array of one date, it will display the month which containing the date. and it will not select any date range + { + name: 'Oct 2014', + dates : function() + { + //move calendars to show this date's month and next month + var movetodate = moment('2014-10','YYYY-MM').toDate(); + return [movetodate]; + } + } + ] + }).on('datepicker-apply',function(event,obj) + { + console.log(obj); + }); + + $('#date-range101').dateRangePicker( + { + showShortcuts: true, + shortcuts : + { + 'next-days': [3,5,7], + 'next': ['week','month','year'] + } + }); + + $('#date-range102').dateRangePicker( + { + showShortcuts: true, + shortcuts : + { + 'prev-days': [3,5,7], + 'prev': ['week','month','year'], + 'next-days':null, + 'next':null + } + }); + + $('#date-range103').dateRangePicker( + { + autoClose: true + }); + + $('#date-range4-1').dateRangePicker( + { + language: 'custom' + }); + + $('#date-range5').dateRangePicker( + { + startDate: '2014-11-20' + }); + + $('#date-range6').dateRangePicker( + { + startDate: '2013-01-10', + endDate: '2013-02-10' + }); + + $('#date-range7').dateRangePicker( + { + minDays: 3, + maxDays: 7 + }); + + $('#date-range8').dateRangePicker( + { + startOfWeek: 'monday' + }); + + $('#date-range9').dateRangePicker( + { + getValue: function() + { + return this.innerHTML; + }, + setValue: function(s) + { + this.innerHTML = s; + } + }); + + $('#two-inputs').dateRangePicker( + { + separator : ' to ', + getValue: function() + { + if ($('#date-range200').val() && $('#date-range201').val() ) + return $('#date-range200').val() + ' to ' + $('#date-range201').val(); + else + return ''; + }, + setValue: function(s,s1,s2) + { + $('#date-range200').val(s1); + $('#date-range201').val(s2); + } + }); + + $('#date-range10').dateRangePicker( + { + format: 'dddd MMM Do, YYYY' //more formats at http://momentjs.com/docs/#/displaying/format/ + }); + + $('#date-range12').dateRangePicker( + { + inline:true, + container: '#date-range12-container', + alwaysOpen:true + }); + + $('#date-range13').dateRangePicker( + { + autoClose: true, + singleDate : true, + showShortcuts: false + }); + + $('#date-range13-2').dateRangePicker( + { + autoClose: true, + singleDate : true, + showShortcuts: false, + singleMonth: true + }); + + $('#date-range14').dateRangePicker( + { + batchMode: 'week', + showShortcuts: false + }); + + $('#date-range14-2').dateRangePicker( + { + batchMode: 'week-range', + showShortcuts: false + }); + + $('#date-range15').dateRangePicker( + { + showShortcuts: false, + beforeShowDay: function(t) + { + var valid = !(t.getDay() == 0 || t.getDay() == 6); //disable saturday and sunday + var _class = ''; + var _tooltip = valid ? '' : 'weekends are disabled'; + return [valid,_class,_tooltip]; + } + }); + + $('#date-range16').dateRangePicker( + { + showShortcuts: false, + format: 'YYYY-MM-DD' + }).on('datepicker-change', function(evt, obj) { + alert('date1: ' + obj.date1 + ' / date2: ' + obj.date2); + }); + + $('#date-range16-open').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').open(); + }); + + $('#date-range16-close').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').close(); + }); + + $('#date-range16-set').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').setDateRange('2013-11-20','2014-08-25'); + }); + + $('#date-range16-set-silent').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').setDateRange('2014-11-03','2015-02-12', true); + }); + + $('#date-range16-clear').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').clear(); + }); + + $('#date-range16-destroy').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').destroy(); + }); + + $('#date-range16-reset').click(function(evt) + { + evt.stopPropagation(); + $('#date-range16').data('dateRangePicker').resetMonthsView(); + }); + + $('#date-range17').dateRangePicker( + { + stickyMonths: true, + showShortcuts: false + }); + + $('#date-range18').dateRangePicker( + { + customTopBar: 'Foo Bar' + }); + + $('#date-range19').dateRangePicker( + { + extraClass: 'date-range-picker19' + }); + + $('#date-range20').dateRangePicker( + { + hoveringTooltip: false + }); + + $('#date-range21').dateRangePicker( + { + hoveringTooltip: function(days) + { + var D = ['','Please select another date','Two', 'Three','Four','Five']; + return D[days] ? D[days] : days+' days'; + } + }); + + $('#date-range22').dateRangePicker( + { + showDateFilter: function(time, date) + { + return '
\ + '+date+'\ +
$'+Math.round(Math.random()*999)+'
\ +
'; + } + }); + + $('#date-range23').dateRangePicker( + { + singleMonth: true, + showShortcuts: false, + showTopbar: false + }); + + $('#date-range5-2').dateRangePicker( + { + minDays:3, + maxDays:7 + }); + + $('#date-range24').dateRangePicker( + { + showWeekNumbers: true + }); + + $('#date-range24-2').dateRangePicker( + { + showWeekNumbers: true, + startOfWeek:'monday' + }); + + $('#date-range24-3').dateRangePicker( + { + showWeekNumbers: true, + getWeekNumber: function(day) + { + var fiscalYearStart = moment('2015-08-16','YYYY-MM-DD'); + var daysOffset = parseInt(fiscalYearStart.format('DDD'),10); + return moment(day).add( -1*daysOffset, 'days').format('W'); + } + }); + + $('#date-range25').dateRangePicker( + { + selectForward: true + }); + + $('#date-range26').dateRangePicker( + { + selectBackward: true + }); + + $('#hotel-booking').dateRangePicker( + { + startDate: new Date(), + selectForward: true, + beforeShowDay: function(t) + { + var valid = !(t.getDay() == 0 || t.getDay() == 6); //disable saturday and sunday + var _class = ''; + var _tooltip = valid ? '' : 'sold out'; + return [valid,_class,_tooltip]; + } + }); + + + $('#date-range50').dateRangePicker( + { + customOpenAnimation: function(cb) + { + $(this).fadeIn(300, cb); + }, + customCloseAnimation: function(cb) + { + $(this).fadeOut(300, cb); + } + }); + + $('#date-range51').dateRangePicker( + { + customArrowPrevSymbol: '', + customArrowNextSymbol: '' + }); + + $('#date-range52').dateRangePicker( + { + monthSelect: true, + yearSelect: true + }); + + $('#date-range53').dateRangePicker( + { + monthSelect: true, + yearSelect: [1900, moment().get('year')] + }); + + $('#date-range54').dateRangePicker( + { + monthSelect: true, + yearSelect: function(current) { + return [current - 10, current + 10]; + } + }); + + $('#date-range55').dateRangePicker( + { + monthSelect: true, + yearSelect: true, + startDate: moment().subtract(3, 'months').format('YYYY-MM-DD'), + endDate: moment().endOf('day').format('YYYY-MM-DD'), + }); +}); Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/daterangepicker.css =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/daterangepicker.css (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/daterangepicker.css (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,460 @@ +.date-picker { + width: 170px; + height: 25px; + padding: 0; + border: 0; + line-height: 25px; + padding-left: 10px; + font-size: 12px; + font-family: Arial, sans-serif; + font-weight: bold; + cursor: pointer; + color: #303030; + position: relative; + z-index: 2; +} + +.date-picker-wrapper { + position: absolute; + z-index: 1; + border: 1px solid #bfbfbf; + background-color: #efefef; + padding: 5px 12px; + font-size: 12px; + line-height: 20px; + color: #aaa; + font-family: Arial, sans-serif; + -webkit-box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5); + box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5); + -webkit-box-sizing: initial; + box-sizing: initial; +} + +.dp-clearfix { + clear: both; + height: 0; + font-size: 0; +} + +.date-picker-wrapper.inline-wrapper { + position: relative; + -webkit-box-shadow: none; + box-shadow: none; + display: inline-block; +} + +.date-picker-wrapper.single-date { + width: auto; +} + +.date-picker-wrapper.no-shortcuts { + padding-bottom: 12px; +} + +.date-picker-wrapper.no-topbar { + padding-top: 12px; +} + +.date-picker-wrapper .footer { + font-size: 11px; + padding-top: 3px; +} + +.date-picker-wrapper b { + color: #666; + font-weight: 700; +} + +.date-picker-wrapper a { + color: #6bb4d6; + text-decoration: underline; +} + +.date-picker-wrapper .month-name { + text-transform: uppercase; +} + +.date-picker-wrapper .select-wrapper { + position: relative; + overflow: hidden; + display: inline-block; + vertical-align: middle; +} + +.date-picker-wrapper .select-wrapper:hover { + text-decoration: underline; +} + +.date-picker-wrapper .month-element { + display: inline-block; + vertical-align: middle; +} + +.date-picker-wrapper .select-wrapper select { + position: absolute; + margin: 0; + padding: 0; + left: 0; + top: -1px; + font-size: inherit; + font-style: inherit; + font-weight: inherit; + text-transform: inherit; + color: inherit; + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: transparent; + border: 0; + outline: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; + filter: alpha(opacity=1); + opacity: 0.01; +} + +.date-picker-wrapper .month-wrapper { + border: 1px solid #bfbfbf; + border-radius: 3px; + background-color: #fff; + padding: 5px; + cursor: default; + position: relative; + _overflow: hidden; +} + +.date-picker-wrapper .month-wrapper table { + width: 190px; + float: left; +} + +.date-picker-wrapper .month-wrapper table.month2 { + width: 190px; + float: left; +} + +.date-picker-wrapper .month-wrapper table th, .date-picker-wrapper .month-wrapper table td { + vertical-align: middle; + text-align: center; + line-height: 14px; + margin: 0px; + padding: 0px; +} + +.date-picker-wrapper .month-wrapper table .day { + padding: 5px 0; + line-height: 1; + font-size: 12px; + margin-bottom: 1px; + color: #ccc; + cursor: default; +} + +.date-picker-wrapper .month-wrapper table div.day.lastMonth, .date-picker-wrapper .month-wrapper table div.day.nextMonth { + color: #999; + cursor: default; +} + +.date-picker-wrapper .month-wrapper table .day.checked { + background-color: #9cdbf7; +} + +.date-picker-wrapper .month-wrapper table .week-name { + height: 20px; + line-height: 20px; + font-weight: 100; + text-transform: uppercase; +} + +.date-picker-wrapper .month-wrapper table .day.has-tooltip { + cursor: help !important; +} + +.date-picker-wrapper .month-wrapper table .day.has-tooltip .tooltip { + white-space: nowrap; +} + +.date-picker-wrapper .time label { + white-space: nowrap; +} + +.date-picker-wrapper .month-wrapper table .day.toMonth.valid { + color: #333; + cursor: pointer; +} + +.date-picker-wrapper .month-wrapper table .day.toMonth.hovering { + background-color: #cdecfa; +} + +.date-picker-wrapper .month-wrapper table .day.nextMonth, .date-picker-wrapper .month-wrapper table .day.lastMonth { + display: none; +} + +.date-picker-wrapper .month-wrapper table .day.real-today { + background-color: #ffe684; +} + +.date-picker-wrapper .month-wrapper table .day.real-today.checked, .date-picker-wrapper .month-wrapper table .day.real-today.hovering { + background-color: #70ccd5; +} + +.date-picker-wrapper table .caption { + height: 40px; +} + +.date-picker-wrapper table .caption > th:first-of-type, .date-picker-wrapper table .caption > th:last-of-type { + width: 27px; +} + +.date-picker-wrapper table .caption .next, .date-picker-wrapper table .caption .prev { + padding: 0 5px; + cursor: pointer; +} + +.date-picker-wrapper table .caption .next:hover, .date-picker-wrapper table .caption .prev:hover { + background-color: #ccc; + color: white; +} + +.date-picker-wrapper .gap { + position: relative; + z-index: 1; + width: 15px; + height: 100%; + background-color: red; + font-size: 0; + line-height: 0; + float: left; + top: -5px; + margin: 0 10px -10px; + visibility: hidden; + height: 0; +} + +.date-picker-wrapper .gap .gap-lines { + height: 100%; + overflow: hidden; +} + +.date-picker-wrapper .gap .gap-line { + height: 15px; + width: 15px; + position: relative; +} + +.date-picker-wrapper .gap .gap-line .gap-1 { + z-index: 1; + height: 0; + border-left: 8px solid white; + border-top: 8px solid #eee; + border-bottom: 8px solid #eee; +} + +.date-picker-wrapper .gap .gap-line .gap-2 { + position: absolute; + right: 0; + top: 0px; + z-index: 2; + height: 0; + border-left: 8px solid transparent; + border-top: 8px solid white; +} + +.date-picker-wrapper .gap .gap-line .gap-3 { + position: absolute; + right: 0; + top: 8px; + z-index: 2; + height: 0; + border-left: 8px solid transparent; + border-bottom: 8px solid white; +} + +.date-picker-wrapper .gap .gap-top-mask { + width: 6px; + height: 1px; + position: absolute; + top: -1px; + left: 1px; + background-color: #eee; + z-index: 3; +} + +.date-picker-wrapper .gap .gap-bottom-mask { + width: 6px; + height: 1px; + position: absolute; + bottom: -1px; + left: 7px; + background-color: #eee; + z-index: 3; +} + +.date-picker-wrapper .selected-days { + display: none; +} + +.date-picker-wrapper .drp_top-bar { + line-height: 1.4; + position: relative; + padding: 10px 40px 10px 0; +} + +.date-picker-wrapper .drp_top-bar .error-top, .date-picker-wrapper .drp_top-bar .normal-top { + display: none; +} + +.date-picker-wrapper .drp_top-bar .default-top { + display: block; +} + +.date-picker-wrapper .drp_top-bar.error .default-top { + display: none; +} + +.date-picker-wrapper .drp_top-bar.error .error-top { + display: block; + color: red; +} + +.date-picker-wrapper .drp_top-bar.normal .default-top { + display: none; +} + +.date-picker-wrapper .drp_top-bar.normal .normal-top { + display: block; +} + +.date-picker-wrapper .drp_top-bar.normal .normal-top .selection-top { + color: #333; +} + +.date-picker-wrapper .drp_top-bar .apply-btn { + position: absolute; + right: 0px; + top: 6px; + padding: 3px 5px; + margin: 0; + font-size: 12px; + border-radius: 4px; + cursor: pointer; + color: #d9eef7; + border: solid 1px #0076a3; + background: #0095cd; + background: -moz-linear-gradient(top, #00adee, #0078a5); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5'); + color: white; + line-height: initial; +} + +.date-picker-wrapper .drp_top-bar .apply-btn.disabled { + cursor: pointer; + color: #606060; + border: solid 1px #b7b7b7; + background: #fff; + background: -moz-linear-gradient(top, #fff, #ededed); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed'); +} + +.date-picker-wrapper .time { + position: relative; +} + +.date-picker-wrapper.single-month .time { + display: block; +} + +.date-picker-wrapper .time input[type=range] { + vertical-align: middle; + width: 129px; + padding: 0; + margin: 0; + height: 20px; +} + +.date-picker-wrapper .time1 { + width: 180px; + padding: 0 5px; + text-align: center; +} + +/*time styling*/ +.time2 { + width: 180px; + padding: 0 5px; + text-align: center; +} + +.date-picker-wrapper .time1 { + float: left; +} + +.date-picker-wrapper .time2 { + float: right; +} + +.date-picker-wrapper .hour { + text-align: right; +} + +.minute { + text-align: right; +} + +.date-picker-wrapper .hide { + display: none; +} + +.date-picker-wrapper .first-date-selected, .date-picker-wrapper .last-date-selected { + background-color: #49e !important; + color: white !important; +} + +.date-picker-wrapper .date-range-length-tip { + position: absolute; + margin-top: -4px; + margin-left: -8px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); + display: none; + background-color: yellow; + padding: 0 6px; + border-radius: 2px; + font-size: 12px; + line-height: 16px; + -webkit-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + -moz-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + -ms-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + -o-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); +} + +.date-picker-wrapper .date-range-length-tip:after { + content: ''; + position: absolute; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid yellow; + left: 50%; + margin-left: -4px; + bottom: -4px; +} + +.date-picker-wrapper.two-months.no-gap .month1 .next, .date-picker-wrapper.two-months.no-gap .month2 .prev { + display: none; +} + +.date-picker-wrapper .week-number { + padding: 5px 0; + line-height: 1; + font-size: 12px; + margin-bottom: 1px; + color: #999; + cursor: pointer; +} + +.date-picker-wrapper .week-number.week-number-selected { + color: #49e; + font-weight: bold; +} Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/daterangepicker.min.css =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/daterangepicker.min.css (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/daterangepicker.min.css (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1 @@ +.date-picker{width:170px;height:25px;padding:0;border:0;line-height:25px;padding-left:10px;font-size:12px;font-family:Arial,sans-serif;font-weight:700;cursor:pointer;color:#303030;position:relative;z-index:2}.date-picker-wrapper{position:absolute;z-index:1;border:1px solid #bfbfbf;background-color:#efefef;padding:5px 12px;font-size:12px;line-height:20px;color:#aaa;font-family:Arial,sans-serif;-webkit-box-shadow:3px 3px 10px rgba(0,0,0,.5);box-shadow:3px 3px 10px rgba(0,0,0,.5);-webkit-box-sizing:initial;box-sizing:initial}.dp-clearfix{clear:both;height:0;font-size:0}.date-picker-wrapper.inline-wrapper{position:relative;-webkit-box-shadow:none;box-shadow:none;display:inline-block}.date-picker-wrapper.single-date{width:auto}.date-picker-wrapper.no-shortcuts{padding-bottom:12px}.date-picker-wrapper.no-topbar{padding-top:12px}.date-picker-wrapper .footer{font-size:11px;padding-top:3px}.date-picker-wrapper b{color:#666;font-weight:700}.date-picker-wrapper a{color:#6bb4d6;text-decoration:underline}.date-picker-wrapper .month-name{text-transform:uppercase}.date-picker-wrapper .select-wrapper{position:relative;overflow:hidden;display:inline-block;vertical-align:middle}.date-picker-wrapper .select-wrapper:hover{text-decoration:underline}.date-picker-wrapper .month-element{display:inline-block;vertical-align:middle}.date-picker-wrapper .select-wrapper select{position:absolute;margin:0;padding:0;left:0;top:-1px;font-size:inherit;font-style:inherit;font-weight:inherit;text-transform:inherit;color:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;outline:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)";filter:alpha(opacity=1);opacity:.01}.date-picker-wrapper .month-wrapper{border:1px solid #bfbfbf;border-radius:3px;background-color:#fff;padding:5px;cursor:default;position:relative;_overflow:hidden}.date-picker-wrapper .month-wrapper table{width:190px;float:left}.date-picker-wrapper .month-wrapper table.month2{width:190px;float:left}.date-picker-wrapper .month-wrapper table td,.date-picker-wrapper .month-wrapper table th{vertical-align:middle;text-align:center;line-height:14px;margin:0;padding:0}.date-picker-wrapper .month-wrapper table .day{padding:5px 0;line-height:1;font-size:12px;margin-bottom:1px;color:#ccc;cursor:default}.date-picker-wrapper .month-wrapper table div.day.lastMonth,.date-picker-wrapper .month-wrapper table div.day.nextMonth{color:#999;cursor:default}.date-picker-wrapper .month-wrapper table .day.checked{background-color:#9cdbf7}.date-picker-wrapper .month-wrapper table .week-name{height:20px;line-height:20px;font-weight:100;text-transform:uppercase}.date-picker-wrapper .month-wrapper table .day.has-tooltip{cursor:help!important}.date-picker-wrapper .month-wrapper table .day.has-tooltip .tooltip{white-space:nowrap}.date-picker-wrapper .time label{white-space:nowrap}.date-picker-wrapper .month-wrapper table .day.toMonth.valid{color:#333;cursor:pointer}.date-picker-wrapper .month-wrapper table .day.toMonth.hovering{background-color:#cdecfa}.date-picker-wrapper .month-wrapper table .day.lastMonth,.date-picker-wrapper .month-wrapper table .day.nextMonth{display:none}.date-picker-wrapper .month-wrapper table .day.real-today{background-color:#ffe684}.date-picker-wrapper .month-wrapper table .day.real-today.checked,.date-picker-wrapper .month-wrapper table .day.real-today.hovering{background-color:#70ccd5}.date-picker-wrapper table .caption{height:40px}.date-picker-wrapper table .caption>th:first-of-type,.date-picker-wrapper table .caption>th:last-of-type{width:27px}.date-picker-wrapper table .caption .next,.date-picker-wrapper table .caption .prev{padding:0 5px;cursor:pointer}.date-picker-wrapper table .caption .next:hover,.date-picker-wrapper table .caption .prev:hover{background-color:#ccc;color:#fff}.date-picker-wrapper .gap{position:relative;z-index:1;width:15px;height:100%;background-color:red;font-size:0;line-height:0;float:left;top:-5px;margin:0 10px -10px;visibility:hidden;height:0}.date-picker-wrapper .gap .gap-lines{height:100%;overflow:hidden}.date-picker-wrapper .gap .gap-line{height:15px;width:15px;position:relative}.date-picker-wrapper .gap .gap-line .gap-1{z-index:1;height:0;border-left:8px solid #fff;border-top:8px solid #eee;border-bottom:8px solid #eee}.date-picker-wrapper .gap .gap-line .gap-2{position:absolute;right:0;top:0;z-index:2;height:0;border-left:8px solid transparent;border-top:8px solid #fff}.date-picker-wrapper .gap .gap-line .gap-3{position:absolute;right:0;top:8px;z-index:2;height:0;border-left:8px solid transparent;border-bottom:8px solid #fff}.date-picker-wrapper .gap .gap-top-mask{width:6px;height:1px;position:absolute;top:-1px;left:1px;background-color:#eee;z-index:3}.date-picker-wrapper .gap .gap-bottom-mask{width:6px;height:1px;position:absolute;bottom:-1px;left:7px;background-color:#eee;z-index:3}.date-picker-wrapper .selected-days{display:none}.date-picker-wrapper .drp_top-bar{line-height:1.4;position:relative;padding:10px 40px 10px 0}.date-picker-wrapper .drp_top-bar .error-top,.date-picker-wrapper .drp_top-bar .normal-top{display:none}.date-picker-wrapper .drp_top-bar .default-top{display:block}.date-picker-wrapper .drp_top-bar.error .default-top{display:none}.date-picker-wrapper .drp_top-bar.error .error-top{display:block;color:red}.date-picker-wrapper .drp_top-bar.normal .default-top{display:none}.date-picker-wrapper .drp_top-bar.normal .normal-top{display:block}.date-picker-wrapper .drp_top-bar.normal .normal-top .selection-top{color:#333}.date-picker-wrapper .drp_top-bar .apply-btn{position:absolute;right:0;top:6px;padding:3px 5px;margin:0;font-size:12px;border-radius:4px;cursor:pointer;color:#d9eef7;border:solid 1px #0076a3;background:#0095cd;background:-moz-linear-gradient(top,#00adee,#0078a5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');color:#fff;line-height:initial}.date-picker-wrapper .drp_top-bar .apply-btn.disabled{cursor:pointer;color:#606060;border:solid 1px #b7b7b7;background:#fff;background:-moz-linear-gradient(top,#fff,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed')}.date-picker-wrapper .time{position:relative}.date-picker-wrapper.single-month .time{display:block}.date-picker-wrapper .time input[type=range]{vertical-align:middle;width:129px;padding:0;margin:0;height:20px}.date-picker-wrapper .time1{width:180px;padding:0 5px;text-align:center}.time2{width:180px;padding:0 5px;text-align:center}.date-picker-wrapper .time1{float:left}.date-picker-wrapper .time2{float:right}.date-picker-wrapper .hour{text-align:right}.minute{text-align:right}.date-picker-wrapper .hide{display:none}.date-picker-wrapper .first-date-selected,.date-picker-wrapper .last-date-selected{background-color:#49e!important;color:#fff!important}.date-picker-wrapper .date-range-length-tip{position:absolute;margin-top:-4px;margin-left:-8px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.3);box-shadow:0 0 3px rgba(0,0,0,.3);display:none;background-color:#ff0;padding:0 6px;border-radius:2px;font-size:12px;line-height:16px;-webkit-filter:drop-shadow(0 0 3px rgba(0, 0, 0, .3));-moz-filter:drop-shadow(0 0 3px rgba(0, 0, 0, .3));-ms-filter:drop-shadow(0 0 3px rgba(0, 0, 0, .3));-o-filter:drop-shadow(0 0 3px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 3px rgba(0, 0, 0, .3))}.date-picker-wrapper .date-range-length-tip:after{content:'';position:absolute;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ff0;left:50%;margin-left:-4px;bottom:-4px}.date-picker-wrapper.two-months.no-gap .month1 .next,.date-picker-wrapper.two-months.no-gap .month2 .prev{display:none}.date-picker-wrapper .week-number{padding:5px 0;line-height:1;font-size:12px;margin-bottom:1px;color:#999;cursor:pointer}.date-picker-wrapper .week-number.week-number-selected{color:#49e;font-weight:700} \ No newline at end of file Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/jquery.daterangepicker.min.js =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/jquery.daterangepicker.min.js (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/dist/jquery.daterangepicker.min.js (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,7 @@ +/** + * jquery-date-range-picker + * @version v0.21.1 + * @link https://github.com/longbill/jquery-date-range-picker + * @license MIT + */ +!function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(U,Q){"use strict";U.dateRangePickerLanguages={default:{selected:"Selected:",day:"Day",days:"Days",apply:"Close","week-1":"mo","week-2":"tu","week-3":"we","week-4":"th","week-5":"fr","week-6":"sa","week-7":"su","week-number":"W","month-name":["january","february","march","april","may","june","july","august","september","october","november","december"],shortcuts:"Shortcuts","custom-values":"Custom Values",past:"Past",following:"Following",previous:"Previous","prev-week":"Week","prev-month":"Month","prev-year":"Year",next:"Next","next-week":"Week","next-month":"Month","next-year":"Year","less-than":"Date range should not be more than %d days","more-than":"Date range should not be less than %d days","default-more":"Please select a date range longer than %d days","default-single":"Please select a date","default-less":"Please select a date range less than %d days","default-range":"Please select a date range between %d and %d days","default-default":"Please select a date range",time:"Time",hour:"Hour",minute:"Minute"},id:{selected:"Terpilih:",day:"Hari",days:"Hari",apply:"Tutup","week-1":"sen","week-2":"sel","week-3":"rab","week-4":"kam","week-5":"jum","week-6":"sab","week-7":"min","week-number":"W","month-name":["januari","februari","maret","april","mei","juni","juli","agustus","september","oktober","november","desember"],shortcuts:"Pintas","custom-values":"Nilai yang ditentukan",past:"Yang Lalu",following:"Mengikuti",previous:"Sebelumnya","prev-week":"Minggu","prev-month":"Bulan","prev-year":"Tahun",next:"Selanjutnya","next-week":"Minggu","next-month":"Bulan","next-year":"Tahun","less-than":"Tanggal harus lebih dari %d hari","more-than":"Tanggal harus kurang dari %d hari","default-more":"Jarak tanggal harus lebih lama dari %d hari","default-single":"Silakan pilih tanggal","default-less":"Jarak rentang tanggal tidak boleh lebih lama dari %d hari","default-range":"Rentang tanggal harus antara %d dan %d hari","default-default":"Silakan pilih rentang tanggal",time:"Waktu",hour:"Jam",minute:"Menit"},az:{selected:"Seçildi:",day:" gün",days:" gün",apply:"tətbiq","week-1":"1","week-2":"2","week-3":"3","week-4":"4","week-5":"5","week-6":"6","week-7":"7","month-name":["yanvar","fevral","mart","aprel","may","iyun","iyul","avqust","sentyabr","oktyabr","noyabr","dekabr"],shortcuts:"Qısayollar",past:"Keçmiş",following:"Növbəti",previous:"   ","prev-week":"Öncəki həftə","prev-month":"Öncəki ay","prev-year":"Öncəki il",next:"   ","next-week":"Növbəti həftə","next-month":"Növbəti ay","next-year":"Növbəti il","less-than":"Tarix aralığı %d gündən çox olmamalıdır","more-than":"Tarix aralığı %d gündən az olmamalıdır","default-more":"%d gündən çox bir tarix seçin","default-single":"Tarix seçin","default-less":"%d gündən az bir tarix seçin","default-range":"%d və %d gün aralığında tarixlər seçin","default-default":"Tarix aralığı seçin"},bg:{selected:"Избрано:",day:"Ден",days:"Дни",apply:"Затвори","week-1":"пн","week-2":"вт","week-3":"ср","week-4":"чт","week-5":"пт","week-6":"сб","week-7":"нд","week-number":"С","month-name":["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"],shortcuts:"Преки пътища","custom-values":"Персонализирани стойности",past:"Минал",following:"Следващ",previous:"Предишен","prev-week":"Седмица","prev-month":"Месец","prev-year":"Година",next:"Следващ","next-week":"Седмица","next-month":"Месец","next-year":"Година","less-than":"Периодът от време не трябва да е повече от %d дни","more-than":"Периодът от време не трябва да е по-малко от %d дни","default-more":"Моля изберете период по-дълъг от %d дни","default-single":"Моля изберете дата","default-less":"Моля изберете период по-къс от %d дни","default-range":"Моля изберете период между %d и %d дни","default-default":"Моля изберете период",time:"Време",hour:"Час",minute:"Минута"},cn:{selected:"已选择:",day:"天",days:"天",apply:"确定","week-1":"一","week-2":"二","week-3":"三","week-4":"四","week-5":"五","week-6":"六","week-7":"日","week-number":"周","month-name":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortcuts:"快捷选择",past:"过去",following:"将来",previous:"   ","prev-week":"上周","prev-month":"上个月","prev-year":"去年",next:"   ","next-week":"下周","next-month":"下个月","next-year":"明年","less-than":"所选日期范围不能大于%d天","more-than":"所选日期范围不能小于%d天","default-more":"请选择大于%d天的日期范围","default-less":"请选择小于%d天的日期范围","default-range":"请选择%d天到%d天的日期范围","default-single":"请选择一个日期","default-default":"请选择一个日期范围",time:"时间",hour:"小时",minute:"分钟"},cz:{selected:"Vybráno:",day:"Den",days:"Dny",apply:"Zavřít","week-1":"po","week-2":"út","week-3":"st","week-4":"čt","week-5":"pá","week-6":"so","week-7":"ne","month-name":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],shortcuts:"Zkratky",past:"po",following:"následující",previous:"předchozí","prev-week":"týden","prev-month":"měsíc","prev-year":"rok",next:"další","next-week":"týden","next-month":"měsíc","next-year":"rok","less-than":"Rozsah data by neměl být větší než %d dnů","more-than":"Rozsah data by neměl být menší než %d dnů","default-more":"Prosím zvolte rozsah data větší než %d dnů","default-single":"Prosím zvolte datum","default-less":"Prosím zvolte rozsah data menší než %d dnů","default-range":"Prosím zvolte rozsah data mezi %d a %d dny","default-default":"Prosím zvolte rozsah data"},de:{selected:"Auswahl:",day:"Tag",days:"Tage",apply:"Schließen","week-1":"mo","week-2":"di","week-3":"mi","week-4":"do","week-5":"fr","week-6":"sa","week-7":"so","month-name":["januar","februar","märz","april","mai","juni","juli","august","september","oktober","november","dezember"],shortcuts:"Schnellwahl",past:"Vorherige",following:"Folgende",previous:"Vorherige","prev-week":"Woche","prev-month":"Monat","prev-year":"Jahr",next:"Nächste","next-week":"Woche","next-month":"Monat","next-year":"Jahr","less-than":"Datumsbereich darf nicht größer sein als %d Tage","more-than":"Datumsbereich darf nicht kleiner sein als %d Tage","default-more":"Bitte mindestens %d Tage auswählen","default-single":"Bitte ein Datum auswählen","default-less":"Bitte weniger als %d Tage auswählen","default-range":"Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen","default-default":"Bitte ein Start- und Enddatum auswählen",Time:"Zeit",hour:"Stunde",minute:"Minute"},es:{selected:"Seleccionado:",day:"Día",days:"Días",apply:"Cerrar","week-1":"lu","week-2":"ma","week-3":"mi","week-4":"ju","week-5":"vi","week-6":"sa","week-7":"do","month-name":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortcuts:"Accesos directos",past:"Pasado",following:"Siguiente",previous:"Anterior","prev-week":"Semana","prev-month":"Mes","prev-year":"Año",next:"Siguiente","next-week":"Semana","next-month":"Mes","next-year":"Año","less-than":"El rango no debería ser mayor de %d días","more-than":"El rango no debería ser menor de %d días","default-more":"Por favor selecciona un rango mayor a %d días","default-single":"Por favor selecciona un día","default-less":"Por favor selecciona un rango menor a %d días","default-range":"Por favor selecciona un rango entre %d y %d días","default-default":"Por favor selecciona un rango de fechas."},fr:{selected:"Sélection:",day:"Jour",days:"Jours",apply:"Fermer","week-1":"lu","week-2":"ma","week-3":"me","week-4":"je","week-5":"ve","week-6":"sa","week-7":"di","month-name":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortcuts:"Raccourcis",past:"Passé",following:"Suivant",previous:"Précédent","prev-week":"Semaine","prev-month":"Mois","prev-year":"Année",next:"Suivant","next-week":"Semaine","next-month":"Mois","next-year":"Année","less-than":"L'intervalle ne doit pas être supérieure à %d jours","more-than":"L'intervalle ne doit pas être inférieure à %d jours","default-more":"Merci de choisir une intervalle supérieure à %d jours","default-single":"Merci de choisir une date","default-less":"Merci de choisir une intervalle inférieure %d jours","default-range":"Merci de choisir une intervalle comprise entre %d et %d jours","default-default":"Merci de choisir une date"},hu:{selected:"Kiválasztva:",day:"Nap",days:"Nap",apply:"Ok","week-1":"h","week-2":"k","week-3":"sz","week-4":"cs","week-5":"p","week-6":"sz","week-7":"v","month-name":["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],shortcuts:"Gyorsválasztó",past:"Múlt",following:"Következő",previous:"Előző","prev-week":"Hét","prev-month":"Hónap","prev-year":"Év",next:"Következő","next-week":"Hét","next-month":"Hónap","next-year":"Év","less-than":"A kiválasztás nem lehet több %d napnál","more-than":"A kiválasztás nem lehet több %d napnál","default-more":"Válassz ki egy időszakot ami hosszabb mint %d nap","default-single":"Válassz egy napot","default-less":"Válassz ki egy időszakot ami rövidebb mint %d nap","default-range":"Válassz ki egy %d - %d nap hosszú időszakot","default-default":"Válassz ki egy időszakot"},it:{selected:"Selezionati:",day:"Giorno",days:"Giorni",apply:"Chiudi","week-1":"lu","week-2":"ma","week-3":"me","week-4":"gi","week-5":"ve","week-6":"sa","week-7":"do","month-name":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],shortcuts:"Scorciatoie",past:"Scorso",following:"Successivo",previous:"Precedente","prev-week":"Settimana","prev-month":"Mese","prev-year":"Anno",next:"Prossimo","next-week":"Settimana","next-month":"Mese","next-year":"Anno","less-than":"L'intervallo non dev'essere maggiore di %d giorni","more-than":"L'intervallo non dev'essere minore di %d giorni","default-more":"Seleziona un intervallo maggiore di %d giorni","default-single":"Seleziona una data","default-less":"Seleziona un intervallo minore di %d giorni","default-range":"Seleziona un intervallo compreso tra i %d e i %d giorni","default-default":"Seleziona un intervallo di date"},ko:{selected:"기간:",day:"일",days:"일간",apply:"닫기","week-1":"월","week-2":"화","week-3":"수","week-4":"목","week-5":"금","week-6":"토","week-7":"일","week-number":"주","month-name":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortcuts:"단축키들",past:"지난(오늘기준)",following:"이후(오늘기준)",previous:"이전","prev-week":"1주","prev-month":"1달","prev-year":"1년",next:"다음","next-week":"1주","next-month":"1달","next-year":"1년","less-than":"날짜 범위는 %d 일보다 많을 수 없습니다","more-than":"날짜 범위는 %d 일보다 작을 수 없습니다","default-more":"날짜 범위를 %d 일보다 길게 선택해 주세요","default-single":"날짜를 선택해 주세요","default-less":"%d 일보다 작은 날짜를 선택해 주세요","default-range":"%d와 %d 일 사이의 날짜 범위를 선택해 주세요","default-default":"날짜 범위를 선택해 주세요",time:"시각",hour:"시",minute:"분"},no:{selected:"Valgt:",day:"Dag",days:"Dager",apply:"Lukk","week-1":"ma","week-2":"ti","week-3":"on","week-4":"to","week-5":"fr","week-6":"lø","week-7":"sø","month-name":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],shortcuts:"Snarveier","custom-values":"Egendefinerte Verdier",past:"Over",following:"Følger",previous:"Forrige","prev-week":"Uke","prev-month":"Måned","prev-year":"År",next:"Neste","next-week":"Uke","next-month":"Måned","next-year":"År","less-than":"Datoperioden skal ikkje være lengre enn %d dager","more-than":"Datoperioden skal ikkje være kortere enn %d dager","default-more":"Vennligst velg ein datoperiode lengre enn %d dager","default-single":"Vennligst velg ein dato","default-less":"Vennligst velg ein datoperiode mindre enn %d dager","default-range":"Vennligst velg ein datoperiode mellom %d og %d dager","default-default":"Vennligst velg ein datoperiode",time:"Tid",hour:"Time",minute:"Minutter"},nl:{selected:"Geselecteerd:",day:"Dag",days:"Dagen",apply:"Ok","week-1":"ma","week-2":"di","week-3":"wo","week-4":"do","week-5":"vr","week-6":"za","week-7":"zo","month-name":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortcuts:"Snelkoppelingen","custom-values":"Aangepaste waarden",past:"Verleden",following:"Komend",previous:"Vorige","prev-week":"Week","prev-month":"Maand","prev-year":"Jaar",next:"Volgende","next-week":"Week","next-month":"Maand","next-year":"Jaar","less-than":"Interval moet langer dan %d dagen zijn","more-than":"Interval mag niet minder dan %d dagen zijn","default-more":"Selecteer een interval langer dan %dagen","default-single":"Selecteer een datum","default-less":"Selecteer een interval minder dan %d dagen","default-range":"Selecteer een interval tussen %d en %d dagen","default-default":"Selecteer een interval",time:"Tijd",hour:"Uur",minute:"Minuut"},ru:{selected:"Выбрано:",day:"День",days:"Дней",apply:"Применить","week-1":"пн","week-2":"вт","week-3":"ср","week-4":"чт","week-5":"пт","week-6":"сб","week-7":"вс","month-name":["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"],shortcuts:"Быстрый выбор","custom-values":"Пользовательские значения",past:"Прошедшие",following:"Следующие",previous:"   ","prev-week":"Неделя","prev-month":"Месяц","prev-year":"Год",next:"   ","next-week":"Неделя","next-month":"Месяц","next-year":"Год","less-than":"Диапазон не может быть больше %d дней","more-than":"Диапазон не может быть меньше %d дней","default-more":"Пожалуйста выберите диапазон больше %d дней","default-single":"Пожалуйста выберите дату","default-less":"Пожалуйста выберите диапазон меньше %d дней","default-range":"Пожалуйста выберите диапазон между %d и %d днями","default-default":"Пожалуйста выберите диапазон",time:"Время",hour:"Часы",minute:"Минуты"},uk:{selected:"Вибрано:",day:"День",days:"Днів",apply:"Застосувати","week-1":"пн","week-2":"вт","week-3":"ср","week-4":"чт","week-5":"пт","week-6":"сб","week-7":"нд","month-name":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"],shortcuts:"Швидкий вибір","custom-values":"Значення користувача",past:"Минулі",following:"Наступні",previous:"   ","prev-week":"Тиждень","prev-month":"Місяць","prev-year":"Рік",next:"   ","next-week":"Тиждень","next-month":"Місяць","next-year":"Рік","less-than":"Діапазон не може бути більш ніж %d днів","more-than":"Діапазон не може бути меньш ніж %d днів","default-more":"Будь ласка виберіть діапазон більше %d днів","default-single":"Будь ласка виберіть дату","default-less":"Будь ласка виберіть діапазон менше %d днів","default-range":"Будь ласка виберіть діапазон між %d та %d днями","default-default":"Будь ласка виберіть діапазон",time:"Час",hour:"Години",minute:"Хвилини"},pl:{selected:"Wybrany:",day:"Dzień",days:"Dni",apply:"Zamknij","week-1":"pon","week-2":"wt","week-3":"śr","week-4":"czw","week-5":"pt","week-6":"so","week-7":"nd","month-name":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],shortcuts:"Skróty","custom-values":"Niestandardowe wartości",past:"Przeszłe",following:"Następne",previous:"Poprzednie","prev-week":"tydzień","prev-month":"miesiąc","prev-year":"rok",next:"Następny","next-week":"tydzień","next-month":"miesiąc","next-year":"rok","less-than":"Okres nie powinien być dłuższy niż %d dni","more-than":"Okres nie powinien być krótszy niż %d ni","default-more":"Wybierz okres dłuższy niż %d dni","default-single":"Wybierz datę","default-less":"Wybierz okres krótszy niż %d dni","default-range":"Wybierz okres trwający od %d do %d dni","default-default":"Wybierz okres",time:"Czas",hour:"Godzina",minute:"Minuta"},se:{selected:"Vald:",day:"dag",days:"dagar",apply:"godkänn","week-1":"ma","week-2":"ti","week-3":"on","week-4":"to","week-5":"fr","week-6":"lö","week-7":"sö","month-name":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],shortcuts:"genvägar","custom-values":"Anpassade värden",past:"över",following:"följande",previous:"förra","prev-week":"vecka","prev-month":"månad","prev-year":"år",next:"nästa","next-week":"vecka","next-month":"måned","next-year":"år","less-than":"Datumintervall bör inte vara mindre än %d dagar","more-than":"Datumintervall bör inte vara mer än %d dagar","default-more":"Välj ett datumintervall längre än %d dagar","default-single":"Välj ett datum","default-less":"Välj ett datumintervall mindre än %d dagar","default-range":"Välj ett datumintervall mellan %d och %d dagar","default-default":"Välj ett datumintervall",time:"tid",hour:"timme",minute:"minut"},pt:{selected:"Selecionado:",day:"Dia",days:"Dias",apply:"Fechar","week-1":"seg","week-2":"ter","week-3":"qua","week-4":"qui","week-5":"sex","week-6":"sab","week-7":"dom","week-number":"N","month-name":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],shortcuts:"Atalhos","custom-values":"Valores Personalizados",past:"Passado",following:"Seguinte",previous:"Anterior","prev-week":"Semana","prev-month":"Mês","prev-year":"Ano",next:"Próximo","next-week":"Próxima Semana","next-month":"Próximo Mês","next-year":"Próximo Ano","less-than":"O período selecionado não deve ser maior que %d dias","more-than":"O período selecionado não deve ser menor que %d dias","default-more":"Selecione um período superior a %d dias","default-single":"Selecione uma data","default-less":"Selecione um período inferior a %d dias","default-range":"Selecione um período de %d a %d dias","default-default":"Selecione um período",time:"Tempo",hour:"Hora",minute:"Minuto"},tc:{selected:"已選擇:",day:"天",days:"天",apply:"確定","week-1":"一","week-2":"二","week-3":"三","week-4":"四","week-5":"五","week-6":"六","week-7":"日","week-number":"週","month-name":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortcuts:"快速選擇",past:"過去",following:"將來",previous:"   ","prev-week":"上週","prev-month":"上個月","prev-year":"去年",next:"   ","next-week":"下週","next-month":"下個月","next-year":"明年","less-than":"所選日期範圍不能大於%d天","more-than":"所選日期範圍不能小於%d天","default-more":"請選擇大於%d天的日期範圍","default-less":"請選擇少於%d天的日期範圍","default-range":"請選擇%d天到%d天的日期範圍","default-single":"請選擇一個日期","default-default":"請選擇一個日期範圍",time:"日期",hour:"小時",minute:"分鐘"},ja:{selected:"選択しました:",day:"日",days:"日",apply:"確定","week-1":"月","week-2":"火","week-3":"水","week-4":"木","week-5":"金","week-6":"土","week-7":"日","month-name":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],shortcuts:"クイック選択",past:"過去",following:"将来",previous:"   ","prev-week":"先週","prev-month":"先月","prev-year":"昨年",next:"   ","next-week":"来週","next-month":"来月","next-year":"来年","less-than":"日付の範囲は%d日以上にすべきではありません","more-than":"日付の範囲は%d日を下回ってはいけません","default-more":"%d日よりも長い期間を選択してください","default-less":"%d日未満の期間を選択してください","default-range":"%d日と%d日の間の日付範囲を選択してください","default-single":"日付を選択してください","default-default":"日付範囲を選択してください",time:"時間",hour:"時間",minute:"分"},da:{selected:"Valgt:",day:"Dag",days:"Dage",apply:"Luk","week-1":"ma","week-2":"ti","week-3":"on","week-4":"to","week-5":"fr","week-6":"lø","week-7":"sø","month-name":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],shortcuts:"genveje","custom-values":"Brugerdefinerede værdier",past:"Forbi",following:"Følgende",previous:"Forrige","prev-week":"uge","prev-month":"måned","prev-year":"år",next:"Næste","next-week":"uge","next-month":"måned","next-year":"år","less-than":"Dato interval bør ikke være med end %d dage","more-than":"Dato interval bør ikke være mindre end %d dage","default-more":"Vælg datointerval længere end %d dage","default-single":"Vælg dato","default-less":"Vælg datointerval mindre end %d dage","default-range":"Vælg datointerval mellem %d og %d dage","default-default":"Vælg datointerval",time:"tid",hour:"time",minute:"minut"},fi:{selected:"Valittu:",day:"Päivä",days:"Päivää",apply:"Sulje","week-1":"ma","week-2":"ti","week-3":"ke","week-4":"to","week-5":"pe","week-6":"la","week-7":"su","week-number":"V","month-name":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortcuts:"Pikavalinnat","custom-values":"Mukautetut Arvot",past:"Menneet",following:"Tulevat",previous:"Edellinen","prev-week":"Viikko","prev-month":"Kuukausi","prev-year":"Vuosi",next:"Seuraava","next-week":"Viikko","next-month":"Kuukausi","next-year":"Vuosi","less-than":"Aikajakson tulisi olla vähemmän kuin %d päivää","more-than":"Aikajakson ei tulisi olla vähempää kuin %d päivää","default-more":"Valitse pidempi aikajakso kuin %d päivää","default-single":"Valitse päivä","default-less":"Valitse lyhyempi aikajakso kuin %d päivää","default-range":"Valitse aikajakso %d ja %d päivän väliltä","default-default":"Valitse aikajakso",time:"Aika",hour:"Tunti",minute:"Minuutti"},cat:{selected:"Seleccionats:",day:"Dia",days:"Dies",apply:"Tanca","week-1":"Dl","week-2":"Dm","week-3":"Dc","week-4":"Dj","week-5":"Dv","week-6":"Ds","week-7":"Dg","week-number":"S","month-name":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],shortcuts:"Dreçeres","custom-values":"Valors personalitzats",past:"Passat",following:"Futur",previous:"Anterior","prev-week":"Setmana","prev-month":"Mes","prev-year":"Any",next:"Següent","next-week":"Setmana","next-month":"Mes","next-year":"Any","less-than":"El període no hauria de ser de més de %d dies","more-than":"El període no hauria de ser de menys de %d dies","default-more":"Perfavor selecciona un període més gran de %d dies","default-single":"Perfavor selecciona una data","default-less":"Perfavor selecciona un període de menys de %d dies","default-range":"Perfavor selecciona un període d'entre %d i %d dies","default-default":"Perfavor selecciona un període",time:"Temps",hour:"Hora",minute:"Minut"},sk:{selected:"Vybrané:",day:"Deň",days:"Dni",apply:"Zavrieť","week-1":"po","week-2":"út","week-3":"st","week-4":"št","week-5":"pi","week-6":"so","week-7":"ne","week-number":"T","month-name":["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"],shortcuts:"Skratky","custom-values":"Vlastné hodnoty",past:"po",following:"nasledujúci",previous:"predchádzajúci","prev-week":"týždeň","prev-month":"mesiac","prev-year":"rok",next:"ďalší","next-week":"týždeň","next-month":"mesiac","next-year":"rok","less-than":"Rozsah dátumu by nemal byť väčší ako %d dní","more-than":"Rozsah dátumu by nemal byť menší ako %d dní","default-more":"Prosím zvoľte rozsah dlhší ako %d dní","default-single":"Prosím zvoľte dátum","default-less":"Prosím zvoľte rozsah menší ako %d dní","default-range":"Prosím zvoľte rozsah medzi %d a %d dňami","default-default":"Prosím zvoľte rozsah",time:"Čas",hour:"Hodina",minute:"Minúta"}},U.fn.dateRangePicker=function(f){f||(f={}),(f=U.extend(!0,{autoClose:!1,format:"YYYY-MM-DD",separator:" to ",language:"auto",startOfWeek:"sunday",getValue:function(){return U(this).val()},setValue:function(e){U(this).attr("readonly")||U(this).is(":disabled")||e==U(this).val()||U(this).val(e)},startDate:!1,endDate:!1,time:{enabled:!1},minDays:0,maxDays:0,showShortcuts:!1,shortcuts:{},customShortcuts:[],inline:!1,container:"body",alwaysOpen:!1,singleDate:!1,lookBehind:!1,batchMode:!1,duration:200,stickyMonths:!1,dayDivAttrs:[],dayTdAttrs:[],selectForward:!1,selectBackward:!1,applyBtnClass:"",singleMonth:"auto",hoveringTooltip:function(e,t,a){return 1'+f.customTopBar+"
"):(t+='
'+K("selected")+' ...',f.singleDate||(t+=' '+f.separator+' ... (3 '+K("days")+")"),t+="
",t+='
error
default
'),t+='',t+="");var a=f.showWeekNumbers?6:5,n="<";f.customArrowPrevSymbol&&(n=f.customArrowPrevSymbol);var r=">";if(f.customArrowNextSymbol&&(r=f.customArrowNextSymbol),t+='
'+E()+"
'+n+' '+(f.singleDate||!f.stickyMonths?''+r+"":"")+'
",f.singleMonth||(t+='
'+function(){for(var e=['
'],t=0;t<20;t++)e.push('
');return e.push("
"),e.join("")}()+'
'+E()+"
'+(f.stickyMonths?"":''+n+"")+' '+r+'
"),t+='
',f.singleDate||(t+='
'),t+='
',t+='")}().hide()).append('
'),U(f.container).append(m),f.inline?m.addClass("inline-wrapper"):i();f.alwaysOpen&&m.find(".apply-btn").hide();var e=_();if(G(e),f.time.enabled)if(f.startDate&&f.endDate||f.start&&f.end)Y(Q(f.start||f.startDate).toDate(),"time1"),Y(Q(f.end||f.endDate).toDate(),"time2");else{var a=f.defaultEndTime?f.defaultEndTime:e;Y(e,"time1"),Y(a,"time2")}var n="";n=f.singleDate?K("default-single"):f.minDays&&f.maxDays?K("default-range"):f.minDays?K("default-more"):f.maxDays?K("default-less"):K("default-default");m.find(".default-top").html(n.replace(/\%d/,f.minDays).replace(/\%d/,f.maxDays)),f.singleMonth?m.addClass("single-month"):m.addClass("two-months");setTimeout(function(){l(),s=!0},0),m.on("click",function(e){e.stopPropagation()}),U(document).on("click.datepicker",Z),m.find(".next").on("click",function(){f.stickyMonths?function(e){var t=F(f.month1),a=F(f.month2);if(q(a))return;if(!f.singleDate&&0<=L(t,a))return;O(t,"month1"),O(a,"month2"),C()}():function(e){var t=U(e).parents("table").hasClass("month2"),a=t?f.month2:f.month1;if(a=F(a),!f.singleMonth&&!f.singleDate&&!t&&0<=L(a,f.month2)||q(a))return;O(a,t?"month2":"month1"),I()}(this)}),m.find(".prev").on("click",function(){f.stickyMonths?function(e){var t=R(f.month1),a=R(f.month2);if(q(t))return;if(!f.singleDate&&L(a,t)<=0)return;O(a,"month2"),O(t,"month1"),C()}():function(e){var t=U(e).parents("table").hasClass("month2"),a=t?f.month2:f.month1;if(a=R(a),t&&L(a,f.month1)<=0||q(a))return;O(a,t?"month2":"month1"),I()}(this)}),m.attr("unselectable","on").css("user-select","none").on("selectstart",function(e){return e.preventDefault(),!1}),m.find(".apply-btn").on("click",function(){B();var e=W(new Date(f.start))+f.separator+W(new Date(f.end));U(t).trigger("datepicker-apply",{value:e,date1:new Date(f.start),date2:new Date(f.end)})}),m.find("[custom]").on("click",function(){var e=U(this).attr("custom");f.start=!1,f.end=!1,m.find(".day.checked").removeClass("checked"),f.setValue.call(o,e),M(),S(!0),C(),f.autoClose&&B()}),m.find("[shortcut]").on("click",function(){var e,t=U(this).attr("shortcut"),a=new Date,n=!1;if(-1!=t.indexOf("day")){var r=parseInt(t.split(",",2)[1],10);n=new Date((new Date).getTime()+864e5*r),a=new Date(a.getTime()+864e5*(0f.end){var a=f.end;f.end=v(f.start),f.start=p(a),f.time.enabled&&f.swapTime&&(u("time1",f.start),u("time2",f.end))}f.start=parseInt(f.start),f.end=parseInt(f.end),b(),f.start&&!f.end&&(U(n).trigger("datepicker-first-date-selected",{date1:new Date(f.start)}),y(e)),w(),M(),S(),C(),x()}}function g(e){if(e=parseInt(e,10),f.startDate&&H(e,f.startDate)<0)return!1;if(f.endDate&&0f.maxDays)return!1;if(0f.start)return!1;if(f.beforeShowDay&&"function"==typeof f.beforeShowDay){for(var t=!0,a=e;1f.start&&(a-=864e5),a'+e.attr("data-tooltip")+"";else if(!e.hasClass("invalid"))if(f.singleDate)m.find(".day.hovering").removeClass("hovering"),e.addClass("hovering");else if(m.find(".day").each(function(){var e=parseInt(U(this).attr("time"));f.start,f.end;e==t?U(this).addClass("hovering"):U(this).removeClass("hovering"),f.start&&!f.end&&(f.starte&&t<=e)?U(this).addClass("hovering"):U(this).removeClass("hovering")}),f.start&&!f.end){var n=z(t,f.start);f.hoveringTooltip&&("function"==typeof f.hoveringTooltip?a=f.hoveringTooltip(n,f.start,t):!0===f.hoveringTooltip&&1f.maxDays?(f.start=!1,f.end=!1,m.find(".day").removeClass("checked"),m.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(K("less-than").replace("%d",f.maxDays))):f.minDays&&et.getTime()){var n=t;t=e,e=n,n=null}var r=!0;if(f.startDate&&H(e,f.startDate)<0&&(r=!1),f.endDate&&0'+A(a)+"";if(!f.monthSelect)return n;var r=!!f.startDate&&Q(f.startDate).add(f.singleMonth||"month2"!==t?0:1,"month"),s=!!f.endDate&&Q(f.endDate).add(f.singleMonth||"month1"!==t?0:-1,"month"),o=r&&e.isSame(r,"year")?r.get("month"):0,i=s&&e.isSame(s,"year")?s.get("month"):11,d=Math.min(o,a),l=Math.max(i,a);if(d===l)return n;return P("month",V({minSelectable:o,maxSelectable:i,minVisible:d,maxVisible:l},a,function(e){return A(e)}))}(e=Q(e).toDate(),t),n=function(e,t){var a=(e=Q(e)).get("year"),n='
'+a+"
";if(!f.yearSelect)return n;var r=f.yearSelect&&"function"==typeof f.yearSelect,s=!!f.startDate&&Q(f.startDate).add(f.singleMonth||"month2"!==t?0:1,"month"),o=!!f.endDate&&Q(f.endDate).add(f.singleMonth||"month1"!==t?0:-1,"month"),i=r?f.yearSelect(a):f.yearSelect.slice(),d=s?Math.max(i[0],s.get("year")):Math.min(i[0],a),l=o?Math.min(i[1],o.get("year")):Math.max(i[1],a),u=Math.min(d,a),m=Math.max(l,a);if(u===m)return n;return P("year",V({minSelectable:d,maxSelectable:l,minVisible:u,maxVisible:m},a))}(e,t);m.find("."+t+" .month-name").html(a+" "+n),m.find("."+t+" tbody").html(function(e){var t=[];e.setDate(1);new Date(e.getTime()-864e5);var a,n,r=new Date,s=e.getDay();0===s&&"monday"===f.startOfWeek&&(s=7);if(0");for(var i=0;i<7;i++){var m="monday"==f.startOfWeek?i+1:i;a=t[7*u+m];var h=Q(a.time).format("L")==Q(r).format("L");if(a.extraClass="",a.tooltip="",a.valid&&f.beforeShowDay&&"function"==typeof f.beforeShowDay){var c=f.beforeShowDay(Q(a.time).toDate());a.valid=c[0],a.extraClass=c[1]||"",a.tooltip=c[2]||"",""!==a.tooltip&&(a.extraClass+=" has-tooltip ")}var p={time:a.time,"data-tooltip":a.tooltip,class:"day "+a.type+" "+a.extraClass+" "+(a.valid?"valid":"invalid")+" "+(h?"real-today":"")};0===i&&f.showWeekNumbers&&l.push('
'+f.getWeekNumber(a.date)+"
"),l.push("
"+J(a.time,a.day)+"
")}l.push("")}return l.join("")}(e)),f[t]=e,w(),m.find(".day").off("click").on("click",function(e){k(U(this))}),m.find(".day").off("mouseenter").on("mouseenter",function(e){y(U(this))}),m.find(".day").off("mouseleave").on("mouseleave",function(e){m.find(".date-range-length-tip").hide(),f.singleDate&&b()}),m.find(".week-number").off("click").on("click",function(e){var t,a,n,r;t=U(this),r=parseInt(t.attr("data-start-time"),10),f.startWeek?(m.find(".week-number-selected").removeClass("week-number-selected"),a=new Date(re.maxSelectable});return n}function P(e,t){for(var a,n='
"+a+"
"}function Y(e,t){m.find("."+t).append("
"+K("Time")+': 00:00
'),u(t,e)}function A(e){return K("month-name")[e]}function W(e){return Q(e).format(f.format)}function I(){C();var e=parseInt(Q(f.month1).format("YYYYMM")),t=parseInt(Q(f.month2).format("YYYYMM")),a=Math.abs(e-t);1"+K("week-number")+"":"";return"monday"==f.startOfWeek?e+""+K("week-1")+""+K("week-2")+""+K("week-3")+""+K("week-4")+""+K("week-5")+""+K("week-6")+""+K("week-7")+"":e+""+K("week-7")+""+K("week-1")+""+K("week-2")+""+K("week-3")+""+K("week-4")+""+K("week-5")+""+K("week-6")+""}function q(e){return e=Q(e),!(!f.startDate||!e.endOf("month").isBefore(f.startDate))||!(!f.endDate||!e.startOf("month").isAfter(f.endDate))}function $(e,t,r){var s=U.extend(!0,{},e);U.each(t,function(e,t){var a=t(r);for(var n in a)s.hasOwnProperty(n)?s[n]+=a[n]:s[n]=a[n]});var a="";for(var n in s)s.hasOwnProperty(n)&&(a+=n+'="'+s[n]+'" ');return a}function J(e,t){return f.showDateFilter&&"function"==typeof f.showDateFilter?f.showDateFilter(e,t):t}function K(e){var t=e.toLowerCase(),a=e in r?r[e]:t in r?r[t]:null,n=U.dateRangePickerLanguages.default;return null==a&&(a=e in n?n[e]:t in n?n[t]:""),a}function _(){var e=f.defaultTime?f.defaultTime:new Date;return f.lookBehind?(f.startDate&&L(e,f.startDate)<0&&(e=F(Q(f.startDate).toDate())),f.endDate&&0', + ' * @version v<%= pkg.version %>', + ' * @link <%= pkg.homepage %>', + ' * @license <%= pkg.license %>', + ' */', + ''].join('\n'); + + gulp.task('beautify', function() { + gulp.src(['./src/*.css', './src/*.js']) + .pipe(beautify()) + .pipe(gulp.dest('./src')); + }); + + gulp.task('dist:clean', function () { + del.sync('./dist', {force: true}); + del.sync('./src/*.css', {force: true}); + }); + + gulp.task('dist:sass', ['dist:clean'], function() { + return gulp + .src(['./src/*.scss']) + .pipe(sass({outputStyle: 'expanded'})) + .pipe(autoprefixer({browsers: ['last 2 versions', 'ie 8']})) + .pipe(gulp.dest('./dist')); + }); + + gulp.task('dist:styles', ['dist:clean', 'dist:sass'], function () { + return gulp.src('./dist/*.css') + .pipe(cleanCSS({ compatibility: 'ie8' })) + .pipe(rename('daterangepicker.min.css')) + .pipe(gulp.dest('./dist')) + .on('error', gutil.log) + }); + + gulp.task('dist:script', ['dist:clean'], function () { + return gulp.src('./src/*.js') + .pipe(uglify()) + .pipe(rename('jquery.daterangepicker.min.js')) + .pipe(header(banner, {pkg: pkg})) + .pipe(gulp.dest('./dist')) + .on('error', gutil.log) + }); + + gulp.task('dev:serve', ['dist:clean', 'dist:sass', 'dist:styles'], function() { + browserSync.init({ + port: 3000, + server: "./" + }); + gulp.watch('./src/*.scss', ['simple-sass']); + gulp.watch('./*.html').on('change', browserSync.reload); + }); + + gulp.task('default', ['dist:clean', 'dist:sass', 'dist:styles', 'dist:script'], function (cb) { + gutil.log('Info :', gutil.colors.green('Distribution files v.' + pkg.version + ' are ready!')); + cb(null) + }); + + gulp.task('dev', ['dist:clean', 'dist:sass', 'dist:styles', 'dist:script', 'dev:serve'], function (cb) { + gutil.log('Info :', gutil.colors.green('Build complete!')); + gutil.log('Info :', gutil.colors.green('Opening browser on http://localhost:3000/')); + cb(null) + }); + +})(); \ No newline at end of file Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/index.html =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/index.html (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/index.html (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,1032 @@ + + + + + + jQuery Date Range Picker Demo + + + + + + +
+

jQuery Date Range Picker

+ +

+ jQuery Date Range Picker is a jQuery plugin that allows user to select a date range. +

+

+ Requires jQuery 1.7+ (MIT LICENSE), + Moment 2.8.1+ (MIT LICENSE). +

+

+ Supports IE8+, Firefox, Chrome, Safari and other standard HTML5 browsers. +

+

+ Supports multi-language, you can choose a defined language or set it to auto-detect mode.
+ You can also define new languages for it. +

+

+ The HTML DOMs generated is fully CSS styled, you can change the skin by editting the CSS file easily. +

+ +

+ I accept further customization job if you require more functions. My personal blog is + http://jszen.com +

+ +

Fork me on Github + https://github.com/longbill/jquery-date-range-picker +

+ +
+

Installation

+ +
<link rel="stylesheet" href="dist/daterangepicker.min.css">
+<script type="text/javascript" src="moment.min.js"></script>
+<script type="text/javascript" src="jquery.min.js"></script>
+<script type="text/javascript" src="dist/jquery.daterangepicker.min.js"></script>
+			
+
+
+

Demonstrations

+
    +
  1. + Default settings: + Show Config +
    +{}
    +
  2. + +
  3. + Default settings with time enabled: + Show Config +
    +{
    +	startOfWeek: 'monday',
    +	separator : ' ~ ',
    +	format: 'DD.MM.YYYY HH:mm',
    +	autoClose: false,
    +	time: {
    +		enabled: true
    +	}
    +}
    +
  4. + + +
  5. + Default settings with default start/end time value: + Show Config +
    +{
    +	startOfWeek: 'monday',
    +	separator : ' ~ ',
    +	format: 'DD.MM.YYYY HH:mm',
    +	autoClose: false,
    +	time: {
    +		enabled: true
    +	},
    +	defaultTime: moment().startOf('day').toDate(),
    +	defaultEndTime: moment().endOf('day').toDate()
    +}
    +
  6. + +
  7. + Default settings with default value: + Show Config +
    +{}
    +
  8. + +
  9. + Force to Chinese: + Show Config +
    +{
    +	language:'cn'
    +}
    +
  10. + +
  11. + Force to English: + Show Config +
    +{
    +	language:'en'
    +}				
    +
  12. + +
  13. + Use custom language: + Show Config +
    +{
    +	language: 'custom'
    +}			
    +
  14. + +
  15. + Select a date range after 2014-11-20: + Show Config +
    +{
    +	startDate: '2014-11-20'
    +}				
    +
  16. + +
  17. + Limit date range selected between 3 days to 7 days: + Show Config +
    +{
    +	maxDays: 7,
    +	minDays: 3
    +}				
    +
  18. + +
  19. + Select a date range between 2013-01-10 to 2013-02-10: + Show Config +
    +{
    +	startDate: '2013-01-10',
    +	endDate: '2013-02-10'
    +}				
    +
  20. + +
  21. + Select a date range between 3 days and 7 days: + Show Config +
    +{
    +	minDays: 3,
    +	maxDays: 7
    +}			
    +
  22. + +
  23. + Set start of week to Monday: + Show Config +
    +{
    +	startOfWeek: 'monday'
    +}			
    +
  24. + +
  25. + Use SPAN instead of INPUT: + select + Show Config +
    +{
    +	getValue: function()
    +	{
    +		return this.innerHTML;
    +	},
    +	setValue: function(s)
    +	{
    +		this.innerHTML = s;
    +	}
    +}				
    +
  26. + +
  27. + Use two inputs: + to + Show Config +
    +{
    +	separator : ' to ',
    +	getValue: function()
    +	{
    +		if ($('#date-range200').val() && $('#date-range201').val() )
    +			return $('#date-range200').val() + ' to ' + $('#date-range201').val();
    +		else
    +			return '';
    +	},
    +	setValue: function(s,s1,s2)
    +	{
    +		$('#date-range200').val(s1);
    +		$('#date-range201').val(s2);
    +	}
    +}				
    +
  28. + +
  29. + Use another date format: + Show Config +
    +{
    +	format: 'dddd MMM Do, YYYY'  //more formats at http://momentjs.com/docs/#/displaying/format/
    +}				
    +
  30. + +
  31. + Use future date shortcuts: + Show Config +
    +{
    +	showShortcuts: true,
    +	shortcuts :
    +	{
    +		'next-days': [3,5,7],
    +		'next': ['week','month','year']
    +	}
    +}				
    +
  32. + +
  33. + Use past date shortcuts: + Show Config +
    +{
    +	showShortcuts: true,
    +	shortcuts :
    +	{
    +		'prev-days': [3,5,7],
    +		'prev': ['week','month','year'],
    +		'next-days':null,
    +		'next':null
    +	}
    +}				
    +
  34. + +
  35. + Use custom shortcuts: + Show Config +
    +{
    +	showShortcuts: true,
    +	shortcuts : null,
    +	startOfWeek: 'sunday',
    +	language:'en',
    +	customShortcuts:
    +	[
    +		//if return an array of two dates, it will select the date range between the two dates
    +		{
    +			name: 'this week',
    +			dates : function()
    +			{
    +				var start = moment().day(0).toDate();
    +				var end = moment().day(6).toDate();
    +				return [start,end];
    +			}
    +		},
    +		//if only return an array of one date, it will display the month which containing the date. and it will not select any date range
    +		{
    +			name: 'Oct 2014',
    +			dates : function()
    +			{
    +				//move calendars to show this date's month and next month
    +				var movetodate = moment('2014-10','YYYY-MM').toDate();
    +				return [movetodate];
    +			}
    +		}
    +	]
    +}				
    +
  36. + +
  37. + Use custom values: + Show Config +
    +{
    +	language:'en',
    +	customValueLabel: 'Dynamic Ranges',
    +	showCustomValues: true,
    +	customValues:
    +		//if return an array of two dates, it will select the date range between the two dates
    +		[
    +			{
    +				name: 'MTD',
    +				value: 'Month To Date'
    +			},
    +			{
    +				name: 'YTD',
    +				value: 'Year To Date'
    +			}
    +		]
    +}				
    +
  38. + + +
  39. + Auto-close after selection: + Show Config +
    +{
    +	autoClose: true
    +}				
    +
  40. + +
  41. + In-line mode: + Show Config +
    +{
    +	inline:true,
    +	container: '#date-range12-container',
    +	alwaysOpen:true
    +}				
    +
    +
  42. + + +
  43. + Single Date mode: + Show Config +
    +{
    +	autoClose: true,
    +	singleDate : true,
    +	showShortcuts: false
    +}				
    +
  44. + + +
  45. + Single Date mode with single month: + Show Config +
    +{
    +	autoClose: true,
    +	singleDate : true,
    +	showShortcuts: false,
    +	singleMonth: true
    +}				
    +
  46. + + +
  47. + Batch mode ( week ): + Show Config +
    +{
    +	batchMode: 'week',
    +	showShortcuts: false
    +}				
    +
  48. + +
  49. + Batch mode ( week-range ): + Show Config +
    +{
    +	batchMode: 'week-range',
    +	showShortcuts: false
    +}				
    +
  50. + + +
  51. + Disable some dates: + Show Config +
    +{
    +	showShortcuts: false,
    +	beforeShowDay: function(t)
    +	{
    +		var valid = !(t.getDay() == 0 || t.getDay() == 6);  //disable saturday and sunday
    +		var _class = '';
    +		var _tooltip = valid ? '' : 'weekends are disabled';
    +		return [valid,_class,_tooltip];
    +	}
    +}				
    +
  52. + +
  53. + Control by script: + + + + + + + +
    + + + Show Config +
    +$('#date-range16').dateRangePicker(
    +{
    +	showShortcuts: false,
    +	format: 'YYYY-MM-DD'
    +}).bind('datepicker-change', function(evt, obj) {
    +	alert('date1: ' + obj.date1 + ' / date2: ' + obj.date2);
    +});
    +
    +$('#date-range16-open').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker').open();
    +});
    +
    +$('#date-range16-close').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker').close();
    +});
    +
    +$('#date-range16-set').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker').setDateRange('2013-11-20','2014-08-25');
    +});
    +
    +$('#date-range16-set-silent').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker').setDateRange('2014-11-03','2015-02-12', true);
    +});
    +
    +$('#date-range16-clear').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker').clear();
    +});
    +
    +$('#date-range16-destroy').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker');
    +});
    +
    +$('#date-range16-reset').click(function(evt)
    +{
    +	evt.stopPropagation();
    +	$('#date-range16').data('dateRangePicker').resetMonthsView();
    +});
    +				
    +
  54. + +
  55. + Sticky months: + Show Config +
    +{
    +	stickyMonths: true,
    +	startDate: '2013-01-10',
    +	endDate: '2013-05-10'
    +}				
    +
  56. + + +
  57. + Use custom top bar: + Show Config +
    +{
    +	customTopBar: 'Foo Bar'
    +}
    +
  58. + +
  59. + Different class names of first and second selected dates: + Show Config +
    +{
    +	extraClass: 'date-range-picker19'
    +}
    +.date-picker-wrapper.date-range-picker19 .day.first-date-selected { background-color: red !important; }
    +.date-picker-wrapper.date-range-picker19 .day.last-date-selected { background-color: orange !important; }
    +
  60. + +
  61. + Hide hovering tooltip: + Show Config +
    +{
    +	hoveringTooltip: false
    +}
    +
  62. + +
  63. + Customize hovering tooltip: + Show Config +
    +{
    +	hoveringTooltip: function(days)
    +	{
    +		var D = ['One','Two', 'Three','Four','Five'];
    +		return D[days] ? D[days] : days;
    +	}
    +}
    +
  64. + +
  65. + Extra content on calendar: + Show Config +
    +{
    +	showDateFilter: function(time, date)
    +	{
    +		return '<div style="padding:0 5px;">\
    +					<span style="font-weight:bold">'+date+'</span>\
    +					<div style="opacity:0.3;">$'+Math.round(Math.random()*999)+'</div>\
    +				</div>';
    +	}
    +}
    +
  66. + +
  67. + Single Month Mode: + Show Config +
    +{
    +	singleMonth: true,
    +	showShortcuts: false,
    +	showTopbar: false
    +}
    +
  68. + +
  69. + Show Week Numbers: + Show Config +
    +{
    +	showWeekNumbers: true
    +}
    +
  70. + +
  71. + Show Week Numbers (start from monday): + Show Config +
    +{
    +	showWeekNumbers: true,
    +	startOfWeek: 'monday'
    +}
    +
  72. + +
  73. + Show Week Numbers ( support fiscal year, start from 2015-08-16): + + Show Config +
    +{
    +	showWeekNumbers: true,
    +	getWeekNumber: function(day)
    +	{
    +		var fiscalYearStart = moment('2015-08-16','YYYY-MM-DD');
    +		var daysOffset = parseInt(fiscalYearStart.format('DDD'),10);
    +		return moment(day).add( -1*daysOffset, 'days').format('W');
    +	}
    +}
    +
  74. + +
  75. + Select forward: + Show Config +
    +{
    +	selectForward: true
    +}
    +
  76. + +
  77. + Select backward: + Show Config +
    +{
    +	selectBackward: true
    +}
    +
  78. + +
  79. + Typical usage, hotel booking: + Show Config +
    +{
    +	startDate: new Date(),
    +	selectForward: true,
    +	showDateFilter: function(time, date)
    +	{
    +		return '<div style="padding:0 5px;">\
    +					<span style="font-weight:bold">'+date+'</span>\
    +					<div style="opacity:0.3;">$'+Math.round(Math.random()*999)+'</div>\
    +				</div>';
    +	},
    +	beforeShowDay: function(t)
    +	{
    +		var valid = !(t.getDay() == 0 || t.getDay() == 6);  //disable saturday and sunday
    +		var _class = '';
    +		var _tooltip = valid ? '' : 'sold out';
    +		return [valid,_class,_tooltip];
    +	}
    +}				
    +
  80. + +
  81. + Custom open/close animation: + Show Config +
    +{
    +	customOpenAnimation: function(cb)
    +	{
    +		$(this).fadeIn(300, cb);
    +	},
    +	customCloseAnimation: function(cb)
    +	{
    +		$(this).fadeOut(300, cb);
    +	}
    +}
    +
  82. + +
  83. + Custom arrow symbol: + Show Config +
    +// To make this demo work completely, the FontAwesome stylesheets are required
    +{
    +    customArrowPrevSymbol: '<i class="fa fa-arrow-circle-left"></i>',
    +    customArrowNextSymbol: '<i class="fa fa-arrow-circle-right"></i>'
    +}
    +				
    +
  84. + +
  85. + Month and year select: + Show Config +
    +{
    +    monthSelect: true,
    +    yearSelect: true
    +}
    +				
    +
  86. + +
  87. + Month and year select with year range by array: + Show Config +
    +{
    +    monthSelect: true,
    +    yearSelect: [1900, moment().get('year')]
    +}
    +				
    +
  88. + +
  89. + Month and year select with year range by function: + Show Config +
    +{
    +    monthSelect: true,
    +    yearSelect: function(current) {
    +        return [current - 10, current + 10];
    +    }
    +}
    +                
    +
  90. + +
  91. + Month and year select min and max dates: + Show Config +
    +{
    +    monthSelect: true,
    +    yearSelect: true,
    +    startDate: moment().subtract(3, 'months').format('YYYY-MM-DD'),
    +    endDate: moment().endOf('day').format('YYYY-MM-DD'),
    +}
    +				
    +
  92. +
+
+
+

Configuration

+
Usage: $('#dom-id').dateRangePicker(configObject);
+

The default configuration object is:

+
{
+	autoClose: false,
+	format: 'YYYY-MM-DD',
+	separator: ' to ',
+	language: 'auto',
+	startOfWeek: 'sunday',// or monday
+	getValue: function()
+	{
+		return $(this).val();
+	},
+	setValue: function(s)
+	{
+		if(!$(this).attr('readonly') && !$(this).is(':disabled') && s != $(this).val())
+		{
+			$(this).val(s);
+		}
+	},
+	startDate: false,
+	endDate: false,
+	time: {
+		enabled: false
+	},
+	minDays: 0,
+	maxDays: 0,
+	showShortcuts: false,
+	shortcuts:
+	{
+		//'prev-days': [1,3,5,7],
+		//'next-days': [3,5,7],
+		//'prev' : ['week','month','year'],
+		//'next' : ['week','month','year']
+	},
+	customShortcuts : [],
+	inline:false,
+	container:'body',
+	alwaysOpen:false,
+	singleDate:false,
+	lookBehind: false,
+	batchMode: false,
+	duration: 200,
+	stickyMonths: false,
+	dayDivAttrs: [],
+	dayTdAttrs: [],
+	applyBtnClass: '',
+	singleMonth: 'auto',
+	hoveringTooltip: function(days, startTime, hoveringTime)
+	{
+		return days > 1 ? days + ' ' + lang('days') : '';
+	},
+	showTopbar: true,
+	swapTime: false,
+	selectForward: false,
+	selectBackward: false,
+	showWeekNumbers: false,
+	getWeekNumber: function(date) //date will be the first day of a week
+	{
+		return moment(date).format('w');
+	},
+	monthSelect: false,
+	yearSelect: false
+}
+

You can use the following keys in the configObject to overwrite the default configuration:

+ +
+format (String)
+	The date format string used for Moment.
+	click here to see Moment documentation
+
+separator (String)
+	The separator string used between date strings
+
+language (String)
+	pre-defined languages are "en" and "cn", you can define your own
+ 	language then set this to the name of new language.
+	You can also set this to "auto" to make it auto detect browser language.
+
+startOfWeek (String)
+	"sunday" or "monday"
+
+getValue (Function)
+	This function is called when get date range string from DOM
+	When it is called, the context of this function is set to the datepicker DOM
+
+setValue (Function)
+	This function is called when set date range string to DOM
+
+startDate (String or false)
+	This string defines the earliest date which is allowed for the user, same format as `format`
+
+endDate (String or false)
+	This string defines the latest date which is allowed for the user, same format as `format`
+
+minDays (Number)
+	This number defines the minimum days of the selected range
+	if this is 0, means do not limit minimum days
+
+maxDays (Number)
+	This number defines the maximum days of the selected range
+	if this is 0, means do not limit maximum days
+
+showShortcuts (Boolean)
+	hide or show shortcuts area
+
+shortcuts (Object)
+	define the shortcuts buttons. there are some built in shortcuts, see source code
+
+time (Object)
+	If enabled adds time selection controls.
+
+customShortcuts (Array)
+	define custom shortcut buttons. see demo.js
+
+inline (Boolean)
+	whether to render the date range picker dom in inline mode instead of overlay mode,
+	if set to true, please set `container` too
+
+container (String, CSS selector || DOM Object)
+	where should the date range picker dom should be renderred to
+
+alwaysOpen (Boolean)
+	if you use inline mode, you may want the date range picker widget to be renderred when the page loads
+	set this to true will also hide the "close" button
+	
+
+singleDate (Boolean)
+	choose a single date instead of a date range. If `singleMonth` option is set to true it will show
+	only one month instead of two months.
+	
+
+batchMode (false / 'week' / 'month')
+	 auto batch select mode 
+	 false (default), week, month, week-range, month-range
+
+beforeShowDay (Function)
+	A function that takes a date as a parameter and must return an array with:
+	[0]: true/false indicating whether or not this date is selectable
+	[1]: a CSS class name to add to the date's cell or "" for the default presentation
+	[2]: an optional popup tooltip for this date
+	The function is called for each day in the datepicker before it is displayed.
+
+stickyMonths (Boolean)
+	If true, there will only be one previous and one next button. Clicking them will change
+	both the months. This setting will have no effect if singleDate option is set to true
+
+singleMonth (Boolean || 'auto') Default value: 'auto'
+	If true, it will show only one month instead of two months. You can select date range
+	in the one month view. If this is set to 'auto', it will be changed to true if the screen width
+	is lower than 480.
+
+showDateFilter ( Function(Int time, Int date) )
+	This is a callback function when creating each date element in the calendar. First paramter will
+	be the timestamp of that day. Second parameter will be the date of that month.
+
+customTopBar ( Function || String)
+	If you set this parameter, it will use this value in the top bar.
+
+extraClass (String)
+	Set extra class name to the date range picker dom.
+
+customArrowPrevSymbol (String / String HTML)
+	Set custom previous symbol, you can use html snippet too.
+
+customArrowNextSymbol (String / String HTML)
+	Set custom next symbol, you can use html snippet too.
+
+showTopbar (Boolean)
+	If show the top bar.
+
+swapTime (Boolean)
+	If true and if time is enabled, on choosing first enddate and than startdate, endtime and starttime will be swapped.
+        If this configkey is false, only date will be swapped, time will stay constant.
+        If time is disabled, this config key is not used.
+
+selectForward (Boolean) Default: false
+	If this is true, you can only select second date after the first selected date.
+
+selectBackward (Boolean) Default: false
+	If this is true, you can only select second date before the first selected date.
+
+showWeekNumbers (Boolean) Default: false
+	If this is true, it will show week number of the year in the calendar.
+
+getWeekNumber (Function( Date object ) )
+	the function called to generate the week number. the first parameter will be the first day of a week
+
+monthSelect (Boolean) Default: false
+	If this is true, you can quickly change month by clicking on month name
+
+yearSelect (Boolean || Array || Function) Default: false
+	If this is true, you can quickly change year by clicking on year number.
+        By default select will contain years from "current year - 5" to "current year + 5" but you can change this.
+        You can set year range by array like this [1900, 2017].
+        And if you want more control you can set function which get selected year and should return array. For example:
+            function(current) {
+                return [current - 10, current + 10];
+            }
+
+
+
+

Events

+

events will be triggerred on the date range picker DOM

+
$('#dom-id')
+.dateRangePicker()
+.bind('datepicker-first-date-selected', function(event, obj)
+{
+	/* This event will be triggered when first date is selected */
+	console.log(obj);
+	// obj will be something like this:
+	// {
+	// 		date1: (Date object of the earlier date)
+	// }
+})
+.bind('datepicker-change',function(event,obj)
+{
+	/* This event will be triggered when second date is selected */
+	console.log(obj);
+	// obj will be something like this:
+	// {
+	// 		date1: (Date object of the earlier date),
+	// 		date2: (Date object of the later date),
+	//	 	value: "2013-06-05 to 2013-06-07"
+	// }
+})
+.bind('datepicker-apply',function(event,obj)
+{
+	/* This event will be triggered when user clicks on the apply button */
+	console.log(obj);
+})
+.bind('datepicker-close',function()
+{
+	/* This event will be triggered before date range picker close animation */
+	console.log('before close');
+})
+.bind('datepicker-closed',function()
+{
+	/* This event will be triggered after date range picker close animation */
+	console.log('after close');
+})
+.bind('datepicker-open',function()
+{
+	/* This event will be triggered before date range picker open animation */
+	console.log('before open');
+})
+.bind('datepicker-opened',function()
+{
+	/* This event will be triggered after date range picker open animation */
+	console.log('after open');
+})
+
+ +
+
+
+

APIs

+

+
//after you called  $(dom).dateRangePicker();
+
+$(dom).data('dateRangePicker')
+    //set date range, two date strings should follow the `format` in config object,
+    //set the third argument to be `true` if you don't want this method to trigger a `datepicker-change` event.
+	.setDateRange('2013-11-20','2013-11-25');
+	//set the start date to the specified date
+	.setStart('2013-11-20');
+	//set the end date to the specified date
+	//set the second argument to `true` if you don't want this method to trigger a `datepicker-change` event.
+	.setEnd('2013-11-25');
+	.clear();		// clear date range
+	.close();		// close date range picker overlay
+	.open();		// open date range picker overlay
+	.resetMonthsView();	// reset to default months
+	.destroy();		// destroy all date range picker related things
+
+
+
+

License

+

+ This date range picker plugin is under MIT LICENSE. +

+
+ + + + + + + +
+ + Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/package.json =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/package.json (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/package.json (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,55 @@ +{ + "name": "jquery-date-range-picker", + "description": "jQuery Date Range Picker is a jQuery plugin that allows user to select a date range.", + "version": "0.21.1", + "license": "MIT", + "main": "src/jquery.daterangepicker.js", + "keywords": [ + "jquery", + "date", + "daterange", + "date", + "picker", + "range" + ], + "repository": { + "type": "git", + "url": "git://github.com/longbill/jquery-date-range-picker.git" + }, + "bugs": { + "url": "https://github.com/longbill/jquery-date-range-picker/issues" + }, + "homepage": "https://github.com/longbill/jquery-date-range-picker", + "maintainers": [], + "scripts": { + "dist": "gulp", + "dev": "gulp dev", + "test": "echo \"Error: no test specified\" && exit 1", + "version": "gulp && git add -A dist", + "postversion": "git push && git push --tags" + }, + "engines": { + "node": ">=4.9.1" + }, + "author": "longbill", + "contributors": [], + "dependencies": { + "jquery": ">=1.7", + "moment": ">=2.8.1" + }, + "devDependencies": { + "browser-sync": "^2.18.12", + "del": "^3.0.0", + "gulp": "^3.9.1", + "gulp-autoprefixer": "^4.0.0", + "gulp-clean-css": "^3.5.0", + "gulp-header": "^1.8.8", + "gulp-jsbeautifier": "^2.1.1", + "gulp-rename": "^1.2.2", + "gulp-sass": "^3.1.0", + "gulp-uglify": "^3.0.0", + "gulp-util": "^3.0.8", + "gulp-watch": "^4.3.11" + }, + "optionalDependencies": {} +} Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/preview.jpg =================================================================== diff -u Binary files differ Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/src/daterangepicker.scss =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/src/daterangepicker.scss (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/src/daterangepicker.scss (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,417 @@ +.date-picker { + width: 170px; + height: 25px; + padding: 0; + border: 0; + line-height: 25px; + padding-left: 10px; + font-size: 12px; + font-family: Arial, sans-serif; + font-weight: bold; + cursor: pointer; + color: #303030; + position: relative; + z-index: 2; +} + +.date-picker-wrapper { + position: absolute; + z-index: 1; + border: 1px solid #bfbfbf; + background-color: #efefef; + padding: 5px 12px; + font-size: 12px; + line-height: 20px; + color: #aaa; + font-family: Arial, sans-serif; + box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5); + box-sizing: initial; +} + +.dp-clearfix { + clear: both; + height: 0; + font-size: 0; +} + +.date-picker-wrapper { + &.inline-wrapper { + position: relative; + box-shadow: none; + display: inline-block; + } + &.single-date { + width: auto; + } + &.no-shortcuts { + padding-bottom: 12px; + } + &.no-topbar { + padding-top: 12px; + } + .footer { + font-size: 11px; + padding-top: 3px; + } + b { + color: #666; + font-weight: 700; + } + a { + color: rgb(107, 180, 214); + text-decoration: underline; + } + .month-name { + text-transform: uppercase; + } + .select-wrapper { + position: relative; + overflow: hidden; + display: inline-block; + vertical-align: middle; + &:hover { + text-decoration: underline; + } + } + .month-element { + display: inline-block; + vertical-align: middle; + } + .select-wrapper select { + position: absolute; + margin: 0; + padding: 0; + left: 0; + top: -1px; + font-size: inherit; + font-style: inherit; + font-weight: inherit; + text-transform: inherit; + color: inherit; + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: transparent; + border: 0; + outline: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; + filter: alpha(opacity=1); + opacity: 0.01; + } + .month-wrapper { + border: 1px solid #bfbfbf; + border-radius: 3px; + background-color: #fff; + padding: 5px; + cursor: default; + position: relative; + _overflow: hidden; + table { + width: 190px; + float: left; + &.month2 { + width: 190px; + float: left; + } + th, td { + vertical-align: middle; + text-align: center; + line-height: 14px; + margin: 0px; + padding: 0px; + } + .day { + padding: 5px 0; + line-height: 1; + font-size: 12px; + margin-bottom: 1px; + color: #ccc; + cursor: default; + } + div.day { + &.lastMonth, &.nextMonth { + color: #999; + cursor: default; + } + } + .day.checked { + background-color: rgb(156, 219, 247); + } + .week-name { + height: 20px; + line-height: 20px; + font-weight: 100; + text-transform: uppercase; + } + .day.has-tooltip { + cursor: help !important; + .tooltip { + white-space: nowrap; + } + } + } + } + .time label { + white-space: nowrap; + } + .month-wrapper table .day { + &.toMonth { + &.valid { + color: #333; + cursor: pointer; + } + &.hovering { + background-color: #cdecfa; + } + } + &.nextMonth, &.lastMonth { + display: none; + } + &.real-today { + background-color: rgb(255, 230, 132); + &.checked, &.hovering { + background-color: rgb(112, 204, 213); + } + } + } + table .caption { + height: 40px; + > th { + &:first-of-type, &:last-of-type { + width: 27px; + } + } + .next, .prev { + padding: 0 5px; + cursor: pointer; + } + .next:hover, .prev:hover { + background-color: #ccc; + color: white; + } + } + .gap { + position: relative; + z-index: 1; + width: 15px; + height: 100%; + background-color: red; + font-size: 0; + line-height: 0; + float: left; + top: -5px; + margin: 0 10px -10px; + visibility: hidden; + height: 0; + .gap-lines { + height: 100%; + overflow: hidden; + } + .gap-line { + height: 15px; + width: 15px; + position: relative; + .gap-1 { + z-index: 1; + height: 0; + border-left: 8px solid white; + border-top: 8px solid #eee; + border-bottom: 8px solid #eee; + } + .gap-2 { + position: absolute; + right: 0; + top: 0px; + z-index: 2; + height: 0; + border-left: 8px solid transparent; + border-top: 8px solid white; + } + .gap-3 { + position: absolute; + right: 0; + top: 8px; + z-index: 2; + height: 0; + border-left: 8px solid transparent; + border-bottom: 8px solid white; + } + } + .gap-top-mask { + width: 6px; + height: 1px; + position: absolute; + top: -1px; + left: 1px; + background-color: #eee; + z-index: 3; + } + .gap-bottom-mask { + width: 6px; + height: 1px; + position: absolute; + bottom: -1px; + left: 7px; + background-color: #eee; + z-index: 3; + } + } + .selected-days { + display: none; + } + .drp_top-bar { + line-height: 1.4; + position: relative; + padding: 10px 40px 10px 0; + .error-top, .normal-top { + display: none; + } + .default-top { + display: block; + } + &.error { + .default-top { + display: none; + } + .error-top { + display: block; + color: red; + } + } + &.normal { + .default-top { + display: none; + } + .normal-top { + display: block; + .selection-top { + color: #333; + } + } + } + .apply-btn { + position: absolute; + right: 0px; + top: 6px; + padding: 3px 5px; + margin: 0; + font-size: 12px; + border-radius: 4px; + cursor: pointer; + color: #d9eef7; + border: solid 1px #0076a3; + background: #0095cd; + background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5)); + background: -moz-linear-gradient(top, #00adee, #0078a5); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5'); + color: white; + line-height: initial; + &.disabled { + cursor: pointer; + color: #606060; + border: solid 1px #b7b7b7; + background: #fff; + background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed)); + background: -moz-linear-gradient(top, #fff, #ededed); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed'); + } + } + } + .time { + position: relative; + } + &.single-month .time { + display: block; + } + .time input[type=range] { + vertical-align: middle; + width: 129px; + padding: 0; + margin: 0; + height: 20px; + } + .time1 { + width: 180px; + padding: 0 5px; + text-align: center; + } +} + +/*time styling*/ + +.time2 { + width: 180px; + padding: 0 5px; + text-align: center; +} + +.date-picker-wrapper { + .time1 { + float: left; + } + .time2 { + float: right; + } + .hour { + text-align: right; + } +} + +.minute { + text-align: right; +} + +.date-picker-wrapper { + .hide { + display: none; + } + .first-date-selected, .last-date-selected { + background-color: #49e !important; + color: white !important; + } + .date-range-length-tip { + position: absolute; + margin-top: -4px; + margin-left: -8px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); + display: none; + background-color: yellow; + padding: 0 6px; + border-radius: 2px; + font-size: 12px; + line-height: 16px; + -webkit-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + -moz-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + -ms-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + -o-filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); + &:after { + content: ''; + position: absolute; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid yellow; + left: 50%; + margin-left: -4px; + bottom: -4px; + } + } + &.two-months.no-gap { + .month1 .next, .month2 .prev { + display: none; + } + } + .week-number { + padding: 5px 0; + line-height: 1; + font-size: 12px; + margin-bottom: 1px; + color: #999; + cursor: pointer; + &.week-number-selected { + color: #49e; + font-weight: bold; + } + } +} \ No newline at end of file Index: reference/jquery-plugins/jquery-date-range-picker-0.21.1/src/jquery.daterangepicker.js =================================================================== diff -u --- reference/jquery-plugins/jquery-date-range-picker-0.21.1/src/jquery.daterangepicker.js (revision 0) +++ reference/jquery-plugins/jquery-date-range-picker-0.21.1/src/jquery.daterangepicker.js (revision 7195fdbbd3ed57697e38ae5a601d5477e5483548) @@ -0,0 +1,2636 @@ +// jquery.daterangepicker.js +// author : Chunlong Liu +// license : MIT +// www.jszen.com + +(function(factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery', 'moment'], factory); + } else if (typeof exports === 'object' && typeof module !== 'undefined') { + // CommonJS. Register as a module + module.exports = factory(require('jquery'), require('moment')); + } else { + // Browser globals + factory(jQuery, moment); + } +}(function($, moment) { + 'use strict'; + $.dateRangePickerLanguages = { + "default": //default language: English + { + "selected": "Selected:", + "day": "Day", + "days": "Days", + "apply": "Close", + "week-1": "mo", + "week-2": "tu", + "week-3": "we", + "week-4": "th", + "week-5": "fr", + "week-6": "sa", + "week-7": "su", + "week-number": "W", + "month-name": ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"], + "shortcuts": "Shortcuts", + "custom-values": "Custom Values", + "past": "Past", + "following": "Following", + "previous": "Previous", + "prev-week": "Week", + "prev-month": "Month", + "prev-year": "Year", + "next": "Next", + "next-week": "Week", + "next-month": "Month", + "next-year": "Year", + "less-than": "Date range should not be more than %d days", + "more-than": "Date range should not be less than %d days", + "default-more": "Please select a date range longer than %d days", + "default-single": "Please select a date", + "default-less": "Please select a date range less than %d days", + "default-range": "Please select a date range between %d and %d days", + "default-default": "Please select a date range", + "time": "Time", + "hour": "Hour", + "minute": "Minute" + }, + "id": { + "selected": "Terpilih:", + "day": "Hari", + "days": "Hari", + "apply": "Tutup", + "week-1": "sen", + "week-2": "sel", + "week-3": "rab", + "week-4": "kam", + "week-5": "jum", + "week-6": "sab", + "week-7": "min", + "week-number": "W", + "month-name": ["januari", "februari", "maret", "april", "mei", "juni", "juli", "agustus", "september", "oktober", "november", "desember"], + "shortcuts": "Pintas", + "custom-values": "Nilai yang ditentukan", + "past": "Yang Lalu", + "following": "Mengikuti", + "previous": "Sebelumnya", + "prev-week": "Minggu", + "prev-month": "Bulan", + "prev-year": "Tahun", + "next": "Selanjutnya", + "next-week": "Minggu", + "next-month": "Bulan", + "next-year": "Tahun", + "less-than": "Tanggal harus lebih dari %d hari", + "more-than": "Tanggal harus kurang dari %d hari", + "default-more": "Jarak tanggal harus lebih lama dari %d hari", + "default-single": "Silakan pilih tanggal", + "default-less": "Jarak rentang tanggal tidak boleh lebih lama dari %d hari", + "default-range": "Rentang tanggal harus antara %d dan %d hari", + "default-default": "Silakan pilih rentang tanggal", + "time": "Waktu", + "hour": "Jam", + "minute": "Menit" + }, + "az": { + "selected": "Seçildi:", + "day": " gün", + "days": " gün", + "apply": "tətbiq", + "week-1": "1", + "week-2": "2", + "week-3": "3", + "week-4": "4", + "week-5": "5", + "week-6": "6", + "week-7": "7", + "month-name": ["yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"], + "shortcuts": "Qısayollar", + "past": "Keçmiş", + "following": "Növbəti", + "previous": "   ", + "prev-week": "Öncəki həftə", + "prev-month": "Öncəki ay", + "prev-year": "Öncəki il", + "next": "   ", + "next-week": "Növbəti həftə", + "next-month": "Növbəti ay", + "next-year": "Növbəti il", + "less-than": "Tarix aralığı %d gündən çox olmamalıdır", + "more-than": "Tarix aralığı %d gündən az olmamalıdır", + "default-more": "%d gündən çox bir tarix seçin", + "default-single": "Tarix seçin", + "default-less": "%d gündən az bir tarix seçin", + "default-range": "%d və %d gün aralığında tarixlər seçin", + "default-default": "Tarix aralığı seçin" + }, + "bg": { + "selected": "Избрано:", + "day": "Ден", + "days": "Дни", + "apply": "Затвори", + "week-1": "пн", + "week-2": "вт", + "week-3": "ср", + "week-4": "чт", + "week-5": "пт", + "week-6": "сб", + "week-7": "нд", + "week-number": "С", + "month-name": ["януари", "февруари", "март", "април", "май", "юни", "юли", "август", "септември", "октомври", "ноември", "декември"], + "shortcuts": "Преки пътища", + "custom-values": "Персонализирани стойности", + "past": "Минал", + "following": "Следващ", + "previous": "Предишен", + "prev-week": "Седмица", + "prev-month": "Месец", + "prev-year": "Година", + "next": "Следващ", + "next-week": "Седмица", + "next-month": "Месец", + "next-year": "Година", + "less-than": "Периодът от време не трябва да е повече от %d дни", + "more-than": "Периодът от време не трябва да е по-малко от %d дни", + "default-more": "Моля изберете период по-дълъг от %d дни", + "default-single": "Моля изберете дата", + "default-less": "Моля изберете период по-къс от %d дни", + "default-range": "Моля изберете период между %d и %d дни", + "default-default": "Моля изберете период", + "time": "Време", + "hour": "Час", + "minute": "Минута" + }, + "cn": //simplified chinese + { + "selected": "已选择:", + "day": "天", + "days": "天", + "apply": "确定", + "week-1": "一", + "week-2": "二", + "week-3": "三", + "week-4": "四", + "week-5": "五", + "week-6": "六", + "week-7": "日", + "week-number": "周", + "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + "shortcuts": "快捷选择", + "past": "过去", + "following": "将来", + "previous": "   ", + "prev-week": "上周", + "prev-month": "上个月", + "prev-year": "去年", + "next": "   ", + "next-week": "下周", + "next-month": "下个月", + "next-year": "明年", + "less-than": "所选日期范围不能大于%d天", + "more-than": "所选日期范围不能小于%d天", + "default-more": "请选择大于%d天的日期范围", + "default-less": "请选择小于%d天的日期范围", + "default-range": "请选择%d天到%d天的日期范围", + "default-single": "请选择一个日期", + "default-default": "请选择一个日期范围", + "time": "时间", + "hour": "小时", + "minute": "分钟" + }, + "cz": { + "selected": "Vybráno:", + "day": "Den", + "days": "Dny", + "apply": "Zavřít", + "week-1": "po", + "week-2": "út", + "week-3": "st", + "week-4": "čt", + "week-5": "pá", + "week-6": "so", + "week-7": "ne", + "month-name": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec"], + "shortcuts": "Zkratky", + "past": "po", + "following": "následující", + "previous": "předchozí", + "prev-week": "týden", + "prev-month": "měsíc", + "prev-year": "rok", + "next": "další", + "next-week": "týden", + "next-month": "měsíc", + "next-year": "rok", + "less-than": "Rozsah data by neměl být větší než %d dnů", + "more-than": "Rozsah data by neměl být menší než %d dnů", + "default-more": "Prosím zvolte rozsah data větší než %d dnů", + "default-single": "Prosím zvolte datum", + "default-less": "Prosím zvolte rozsah data menší než %d dnů", + "default-range": "Prosím zvolte rozsah data mezi %d a %d dny", + "default-default": "Prosím zvolte rozsah data" + }, + "de": { + "selected": "Auswahl:", + "day": "Tag", + "days": "Tage", + "apply": "Schließen", + "week-1": "mo", + "week-2": "di", + "week-3": "mi", + "week-4": "do", + "week-5": "fr", + "week-6": "sa", + "week-7": "so", + "month-name": ["januar", "februar", "märz", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "dezember"], + "shortcuts": "Schnellwahl", + "past": "Vorherige", + "following": "Folgende", + "previous": "Vorherige", + "prev-week": "Woche", + "prev-month": "Monat", + "prev-year": "Jahr", + "next": "Nächste", + "next-week": "Woche", + "next-month": "Monat", + "next-year": "Jahr", + "less-than": "Datumsbereich darf nicht größer sein als %d Tage", + "more-than": "Datumsbereich darf nicht kleiner sein als %d Tage", + "default-more": "Bitte mindestens %d Tage auswählen", + "default-single": "Bitte ein Datum auswählen", + "default-less": "Bitte weniger als %d Tage auswählen", + "default-range": "Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen", + "default-default": "Bitte ein Start- und Enddatum auswählen", + "Time": "Zeit", + "hour": "Stunde", + "minute": "Minute" + }, + "es": { + "selected": "Seleccionado:", + "day": "Día", + "days": "Días", + "apply": "Cerrar", + "week-1": "lu", + "week-2": "ma", + "week-3": "mi", + "week-4": "ju", + "week-5": "vi", + "week-6": "sa", + "week-7": "do", + "month-name": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], + "shortcuts": "Accesos directos", + "past": "Pasado", + "following": "Siguiente", + "previous": "Anterior", + "prev-week": "Semana", + "prev-month": "Mes", + "prev-year": "Año", + "next": "Siguiente", + "next-week": "Semana", + "next-month": "Mes", + "next-year": "Año", + "less-than": "El rango no debería ser mayor de %d días", + "more-than": "El rango no debería ser menor de %d días", + "default-more": "Por favor selecciona un rango mayor a %d días", + "default-single": "Por favor selecciona un día", + "default-less": "Por favor selecciona un rango menor a %d días", + "default-range": "Por favor selecciona un rango entre %d y %d días", + "default-default": "Por favor selecciona un rango de fechas." + }, + "fr": { + "selected": "Sélection:", + "day": "Jour", + "days": "Jours", + "apply": "Fermer", + "week-1": "lu", + "week-2": "ma", + "week-3": "me", + "week-4": "je", + "week-5": "ve", + "week-6": "sa", + "week-7": "di", + "month-name": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], + "shortcuts": "Raccourcis", + "past": "Passé", + "following": "Suivant", + "previous": "Précédent", + "prev-week": "Semaine", + "prev-month": "Mois", + "prev-year": "Année", + "next": "Suivant", + "next-week": "Semaine", + "next-month": "Mois", + "next-year": "Année", + "less-than": "L'intervalle ne doit pas être supérieure à %d jours", + "more-than": "L'intervalle ne doit pas être inférieure à %d jours", + "default-more": "Merci de choisir une intervalle supérieure à %d jours", + "default-single": "Merci de choisir une date", + "default-less": "Merci de choisir une intervalle inférieure %d jours", + "default-range": "Merci de choisir une intervalle comprise entre %d et %d jours", + "default-default": "Merci de choisir une date" + }, + "hu": { + "selected": "Kiválasztva:", + "day": "Nap", + "days": "Nap", + "apply": "Ok", + "week-1": "h", + "week-2": "k", + "week-3": "sz", + "week-4": "cs", + "week-5": "p", + "week-6": "sz", + "week-7": "v", + "month-name": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], + "shortcuts": "Gyorsválasztó", + "past": "Múlt", + "following": "Következő", + "previous": "Előző", + "prev-week": "Hét", + "prev-month": "Hónap", + "prev-year": "Év", + "next": "Következő", + "next-week": "Hét", + "next-month": "Hónap", + "next-year": "Év", + "less-than": "A kiválasztás nem lehet több %d napnál", + "more-than": "A kiválasztás nem lehet több %d napnál", + "default-more": "Válassz ki egy időszakot ami hosszabb mint %d nap", + "default-single": "Válassz egy napot", + "default-less": "Válassz ki egy időszakot ami rövidebb mint %d nap", + "default-range": "Válassz ki egy %d - %d nap hosszú időszakot", + "default-default": "Válassz ki egy időszakot" + }, + "it": { + "selected": "Selezionati:", + "day": "Giorno", + "days": "Giorni", + "apply": "Chiudi", + "week-1": "lu", + "week-2": "ma", + "week-3": "me", + "week-4": "gi", + "week-5": "ve", + "week-6": "sa", + "week-7": "do", + "month-name": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], + "shortcuts": "Scorciatoie", + "past": "Scorso", + "following": "Successivo", + "previous": "Precedente", + "prev-week": "Settimana", + "prev-month": "Mese", + "prev-year": "Anno", + "next": "Prossimo", + "next-week": "Settimana", + "next-month": "Mese", + "next-year": "Anno", + "less-than": "L'intervallo non dev'essere maggiore di %d giorni", + "more-than": "L'intervallo non dev'essere minore di %d giorni", + "default-more": "Seleziona un intervallo maggiore di %d giorni", + "default-single": "Seleziona una data", + "default-less": "Seleziona un intervallo minore di %d giorni", + "default-range": "Seleziona un intervallo compreso tra i %d e i %d giorni", + "default-default": "Seleziona un intervallo di date" + }, + "ko": { + "selected": "기간:", + "day": "일", + "days": "일간", + "apply": "닫기", + "week-1": "월", + "week-2": "화", + "week-3": "수", + "week-4": "목", + "week-5": "금", + "week-6": "토", + "week-7": "일", + "week-number": "주", + "month-name": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], + "shortcuts": "단축키들", + "past": "지난(오늘기준)", + "following": "이후(오늘기준)", + "previous": "이전", + "prev-week": "1주", + "prev-month": "1달", + "prev-year": "1년", + "next": "다음", + "next-week": "1주", + "next-month": "1달", + "next-year": "1년", + "less-than": "날짜 범위는 %d 일보다 많을 수 없습니다", + "more-than": "날짜 범위는 %d 일보다 작을 수 없습니다", + "default-more": "날짜 범위를 %d 일보다 길게 선택해 주세요", + "default-single": "날짜를 선택해 주세요", + "default-less": "%d 일보다 작은 날짜를 선택해 주세요", + "default-range": "%d와 %d 일 사이의 날짜 범위를 선택해 주세요", + "default-default": "날짜 범위를 선택해 주세요", + "time": "시각", + "hour": "시", + "minute": "분" + }, + "no": { + "selected": "Valgt:", + "day": "Dag", + "days": "Dager", + "apply": "Lukk", + "week-1": "ma", + "week-2": "ti", + "week-3": "on", + "week-4": "to", + "week-5": "fr", + "week-6": "lø", + "week-7": "sø", + "month-name": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"], + "shortcuts": "Snarveier", + "custom-values": "Egendefinerte Verdier", + "past": "Over", // Not quite sure about the context of this one + "following": "Følger", + "previous": "Forrige", + "prev-week": "Uke", + "prev-month": "Måned", + "prev-year": "År", + "next": "Neste", + "next-week": "Uke", + "next-month": "Måned", + "next-year": "År", + "less-than": "Datoperioden skal ikkje være lengre enn %d dager", + "more-than": "Datoperioden skal ikkje være kortere enn %d dager", + "default-more": "Vennligst velg ein datoperiode lengre enn %d dager", + "default-single": "Vennligst velg ein dato", + "default-less": "Vennligst velg ein datoperiode mindre enn %d dager", + "default-range": "Vennligst velg ein datoperiode mellom %d og %d dager", + "default-default": "Vennligst velg ein datoperiode", + "time": "Tid", + "hour": "Time", + "minute": "Minutter" + }, + "nl": { + "selected": "Geselecteerd:", + "day": "Dag", + "days": "Dagen", + "apply": "Ok", + "week-1": "ma", + "week-2": "di", + "week-3": "wo", + "week-4": "do", + "week-5": "vr", + "week-6": "za", + "week-7": "zo", + "month-name": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], + "shortcuts": "Snelkoppelingen", + "custom-values": "Aangepaste waarden", + "past": "Verleden", + "following": "Komend", + "previous": "Vorige", + "prev-week": "Week", + "prev-month": "Maand", + "prev-year": "Jaar", + "next": "Volgende", + "next-week": "Week", + "next-month": "Maand", + "next-year": "Jaar", + "less-than": "Interval moet langer dan %d dagen zijn", + "more-than": "Interval mag niet minder dan %d dagen zijn", + "default-more": "Selecteer een interval langer dan %dagen", + "default-single": "Selecteer een datum", + "default-less": "Selecteer een interval minder dan %d dagen", + "default-range": "Selecteer een interval tussen %d en %d dagen", + "default-default": "Selecteer een interval", + "time": "Tijd", + "hour": "Uur", + "minute": "Minuut" + }, + "ru": { + "selected": "Выбрано:", + "day": "День", + "days": "Дней", + "apply": "Применить", + "week-1": "пн", + "week-2": "вт", + "week-3": "ср", + "week-4": "чт", + "week-5": "пт", + "week-6": "сб", + "week-7": "вс", + "month-name": ["январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"], + "shortcuts": "Быстрый выбор", + "custom-values": "Пользовательские значения", + "past": "Прошедшие", + "following": "Следующие", + "previous": "   ", + "prev-week": "Неделя", + "prev-month": "Месяц", + "prev-year": "Год", + "next": "   ", + "next-week": "Неделя", + "next-month": "Месяц", + "next-year": "Год", + "less-than": "Диапазон не может быть больше %d дней", + "more-than": "Диапазон не может быть меньше %d дней", + "default-more": "Пожалуйста выберите диапазон больше %d дней", + "default-single": "Пожалуйста выберите дату", + "default-less": "Пожалуйста выберите диапазон меньше %d дней", + "default-range": "Пожалуйста выберите диапазон между %d и %d днями", + "default-default": "Пожалуйста выберите диапазон", + "time": "Время", + "hour": "Часы", + "minute": "Минуты" + }, + "uk": { + "selected": "Вибрано:", + "day": "День", + "days": "Днів", + "apply": "Застосувати", + "week-1": "пн", + "week-2": "вт", + "week-3": "ср", + "week-4": "чт", + "week-5": "пт", + "week-6": "сб", + "week-7": "нд", + "month-name": ["січень", "лютий", "березень", "квітень", "травень", "червень", "липень", "серпень", "вересень", "жовтень", "листопад", "грудень"], + "shortcuts": "Швидкий вибір", + "custom-values": "Значення користувача", + "past": "Минулі", + "following": "Наступні", + "previous": "   ", + "prev-week": "Тиждень", + "prev-month": "Місяць", + "prev-year": "Рік", + "next": "   ", + "next-week": "Тиждень", + "next-month": "Місяць", + "next-year": "Рік", + "less-than": "Діапазон не може бути більш ніж %d днів", + "more-than": "Діапазон не може бути меньш ніж %d днів", + "default-more": "Будь ласка виберіть діапазон більше %d днів", + "default-single": "Будь ласка виберіть дату", + "default-less": "Будь ласка виберіть діапазон менше %d днів", + "default-range": "Будь ласка виберіть діапазон між %d та %d днями", + "default-default": "Будь ласка виберіть діапазон", + "time": "Час", + "hour": "Години", + "minute": "Хвилини" + }, + "pl": { + "selected": "Wybrany:", + "day": "Dzień", + "days": "Dni", + "apply": "Zamknij", + "week-1": "pon", + "week-2": "wt", + "week-3": "śr", + "week-4": "czw", + "week-5": "pt", + "week-6": "so", + "week-7": "nd", + "month-name": ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"], + "shortcuts": "Skróty", + "custom-values": "Niestandardowe wartości", + "past": "Przeszłe", + "following": "Następne", + "previous": "Poprzednie", + "prev-week": "tydzień", + "prev-month": "miesiąc", + "prev-year": "rok", + "next": "Następny", + "next-week": "tydzień", + "next-month": "miesiąc", + "next-year": "rok", + "less-than": "Okres nie powinien być dłuższy niż %d dni", + "more-than": "Okres nie powinien być krótszy niż %d ni", + "default-more": "Wybierz okres dłuższy niż %d dni", + "default-single": "Wybierz datę", + "default-less": "Wybierz okres krótszy niż %d dni", + "default-range": "Wybierz okres trwający od %d do %d dni", + "default-default": "Wybierz okres", + "time": "Czas", + "hour": "Godzina", + "minute": "Minuta" + }, + "se": { + "selected": "Vald:", + "day": "dag", + "days": "dagar", + "apply": "godkänn", + "week-1": "ma", + "week-2": "ti", + "week-3": "on", + "week-4": "to", + "week-5": "fr", + "week-6": "lö", + "week-7": "sö", + "month-name": ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], + "shortcuts": "genvägar", + "custom-values": "Anpassade värden", + "past": "över", + "following": "följande", + "previous": "förra", + "prev-week": "vecka", + "prev-month": "månad", + "prev-year": "år", + "next": "nästa", + "next-week": "vecka", + "next-month": "måned", + "next-year": "år", + "less-than": "Datumintervall bör inte vara mindre än %d dagar", + "more-than": "Datumintervall bör inte vara mer än %d dagar", + "default-more": "Välj ett datumintervall längre än %d dagar", + "default-single": "Välj ett datum", + "default-less": "Välj ett datumintervall mindre än %d dagar", + "default-range": "Välj ett datumintervall mellan %d och %d dagar", + "default-default": "Välj ett datumintervall", + "time": "tid", + "hour": "timme", + "minute": "minut" + }, + "pt": //Portuguese (European) + { + "selected": "Selecionado:", + "day": "Dia", + "days": "Dias", + "apply": "Fechar", + "week-1": "seg", + "week-2": "ter", + "week-3": "qua", + "week-4": "qui", + "week-5": "sex", + "week-6": "sab", + "week-7": "dom", + "week-number": "N", + "month-name": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], + "shortcuts": "Atalhos", + "custom-values": "Valores Personalizados", + "past": "Passado", + "following": "Seguinte", + "previous": "Anterior", + "prev-week": "Semana", + "prev-month": "Mês", + "prev-year": "Ano", + "next": "Próximo", + "next-week": "Próxima Semana", + "next-month": "Próximo Mês", + "next-year": "Próximo Ano", + "less-than": "O período selecionado não deve ser maior que %d dias", + "more-than": "O período selecionado não deve ser menor que %d dias", + "default-more": "Selecione um período superior a %d dias", + "default-single": "Selecione uma data", + "default-less": "Selecione um período inferior a %d dias", + "default-range": "Selecione um período de %d a %d dias", + "default-default": "Selecione um período", + "time": "Tempo", + "hour": "Hora", + "minute": "Minuto" + }, + "tc": // traditional chinese + { + "selected": "已選擇:", + "day": "天", + "days": "天", + "apply": "確定", + "week-1": "一", + "week-2": "二", + "week-3": "三", + "week-4": "四", + "week-5": "五", + "week-6": "六", + "week-7": "日", + "week-number": "週", + "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + "shortcuts": "快速選擇", + "past": "過去", + "following": "將來", + "previous": "   ", + "prev-week": "上週", + "prev-month": "上個月", + "prev-year": "去年", + "next": "   ", + "next-week": "下週", + "next-month": "下個月", + "next-year": "明年", + "less-than": "所選日期範圍不能大於%d天", + "more-than": "所選日期範圍不能小於%d天", + "default-more": "請選擇大於%d天的日期範圍", + "default-less": "請選擇少於%d天的日期範圍", + "default-range": "請選擇%d天到%d天的日期範圍", + "default-single": "請選擇一個日期", + "default-default": "請選擇一個日期範圍", + "time": "日期", + "hour": "小時", + "minute": "分鐘" + }, + "ja": { + "selected": "選択しました:", + "day": "日", + "days": "日", + "apply": "確定", + "week-1": "月", + "week-2": "火", + "week-3": "水", + "week-4": "木", + "week-5": "金", + "week-6": "土", + "week-7": "日", + "month-name": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + "shortcuts": "クイック選択", + "past": "過去", + "following": "将来", + "previous": "   ", + "prev-week": "先週", + "prev-month": "先月", + "prev-year": "昨年", + "next": "   ", + "next-week": "来週", + "next-month": "来月", + "next-year": "来年", + "less-than": "日付の範囲は%d日以上にすべきではありません", + "more-than": "日付の範囲は%d日を下回ってはいけません", + "default-more": "%d日よりも長い期間を選択してください", + "default-less": "%d日未満の期間を選択してください", + "default-range": "%d日と%d日の間の日付範囲を選択してください", + "default-single": "日付を選択してください", + "default-default": "日付範囲を選択してください", + "time": "時間", + "hour": "時間", + "minute": "分" + }, + "da": { + "selected": "Valgt:", + "day": "Dag", + "days": "Dage", + "apply": "Luk", + "week-1": "ma", + "week-2": "ti", + "week-3": "on", + "week-4": "to", + "week-5": "fr", + "week-6": "lø", + "week-7": "sø", + "month-name": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"], + "shortcuts": "genveje", + "custom-values": "Brugerdefinerede værdier", + "past": "Forbi", + "following": "Følgende", + "previous": "Forrige", + "prev-week": "uge", + "prev-month": "måned", + "prev-year": "år", + "next": "Næste", + "next-week": "uge", + "next-month": "måned", + "next-year": "år", + "less-than": "Dato interval bør ikke være med end %d dage", + "more-than": "Dato interval bør ikke være mindre end %d dage", + "default-more": "Vælg datointerval længere end %d dage", + "default-single": "Vælg dato", + "default-less": "Vælg datointerval mindre end %d dage", + "default-range": "Vælg datointerval mellem %d og %d dage", + "default-default": "Vælg datointerval", + "time": "tid", + "hour": "time", + "minute": "minut" + }, + "fi": // Finnish + { + "selected": "Valittu:", + "day": "Päivä", + "days": "Päivää", + "apply": "Sulje", + "week-1": "ma", + "week-2": "ti", + "week-3": "ke", + "week-4": "to", + "week-5": "pe", + "week-6": "la", + "week-7": "su", + "week-number": "V", + "month-name": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], + "shortcuts": "Pikavalinnat", + "custom-values": "Mukautetut Arvot", + "past": "Menneet", + "following": "Tulevat", + "previous": "Edellinen", + "prev-week": "Viikko", + "prev-month": "Kuukausi", + "prev-year": "Vuosi", + "next": "Seuraava", + "next-week": "Viikko", + "next-month": "Kuukausi", + "next-year": "Vuosi", + "less-than": "Aikajakson tulisi olla vähemmän kuin %d päivää", + "more-than": "Aikajakson ei tulisi olla vähempää kuin %d päivää", + "default-more": "Valitse pidempi aikajakso kuin %d päivää", + "default-single": "Valitse päivä", + "default-less": "Valitse lyhyempi aikajakso kuin %d päivää", + "default-range": "Valitse aikajakso %d ja %d päivän väliltä", + "default-default": "Valitse aikajakso", + "time": "Aika", + "hour": "Tunti", + "minute": "Minuutti" + }, + "cat": // Catala + { + "selected": "Seleccionats:", + "day": "Dia", + "days": "Dies", + "apply": "Tanca", + "week-1": "Dl", + "week-2": "Dm", + "week-3": "Dc", + "week-4": "Dj", + "week-5": "Dv", + "week-6": "Ds", + "week-7": "Dg", + "week-number": "S", + "month-name": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"], + "shortcuts": "Dreçeres", + "custom-values": "Valors personalitzats", + "past": "Passat", + "following": "Futur", + "previous": "Anterior", + "prev-week": "Setmana", + "prev-month": "Mes", + "prev-year": "Any", + "next": "Següent", + "next-week": "Setmana", + "next-month": "Mes", + "next-year": "Any", + "less-than": "El període no hauria de ser de més de %d dies", + "more-than": "El període no hauria de ser de menys de %d dies", + "default-more": "Perfavor selecciona un període més gran de %d dies", + "default-single": "Perfavor selecciona una data", + "default-less": "Perfavor selecciona un període de menys de %d dies", + "default-range": "Perfavor selecciona un període d'entre %d i %d dies", + "default-default": "Perfavor selecciona un període", + "time": "Temps", + "hour": "Hora", + "minute": "Minut" + }, + "sk": { + "selected": "Vybrané:", + "day": "Deň", + "days": "Dni", + "apply": "Zavrieť", + "week-1": "po", + "week-2": "út", + "week-3": "st", + "week-4": "št", + "week-5": "pi", + "week-6": "so", + "week-7": "ne", + "week-number": "T", + "month-name": ["január", "február", "marec", "apríl", "máj", "jún", "júl", "august", "september", "október", "november", "december"], + "shortcuts": "Skratky", + "custom-values": "Vlastné hodnoty", + "past": "po", + "following": "nasledujúci", + "previous": "predchádzajúci", + "prev-week": "týždeň", + "prev-month": "mesiac", + "prev-year": "rok", + "next": "ďalší", + "next-week": "týždeň", + "next-month": "mesiac", + "next-year": "rok", + "less-than": "Rozsah dátumu by nemal byť väčší ako %d dní", + "more-than": "Rozsah dátumu by nemal byť menší ako %d dní", + "default-more": "Prosím zvoľte rozsah dlhší ako %d dní", + "default-single": "Prosím zvoľte dátum", + "default-less": "Prosím zvoľte rozsah menší ako %d dní", + "default-range": "Prosím zvoľte rozsah medzi %d a %d dňami", + "default-default": "Prosím zvoľte rozsah", + "time": "Čas", + "hour": "Hodina", + "minute": "Minúta" + } + }; + + $.fn.dateRangePicker = function(opt) { + if (!opt) opt = {}; + opt = $.extend(true, { + autoClose: false, + format: 'YYYY-MM-DD', + separator: ' to ', + language: 'auto', + startOfWeek: 'sunday', // or monday + getValue: function() { + return $(this).val(); + }, + setValue: function(s) { + if (!$(this).attr('readonly') && !$(this).is(':disabled') && s != $(this).val()) { + $(this).val(s); + } + }, + startDate: false, + endDate: false, + time: { + enabled: false + }, + minDays: 0, + maxDays: 0, + showShortcuts: false, + shortcuts: { + //'prev-days': [1,3,5,7], + // 'next-days': [3,5,7], + //'prev' : ['week','month','year'], + // 'next' : ['week','month','year'] + }, + customShortcuts: [], + inline: false, + container: 'body', + alwaysOpen: false, + singleDate: false, + lookBehind: false, + batchMode: false, + duration: 200, + stickyMonths: false, + dayDivAttrs: [], + dayTdAttrs: [], + selectForward: false, + selectBackward: false, + applyBtnClass: '', + singleMonth: 'auto', + hoveringTooltip: function(days, startTime, hoveringTime) { + return days > 1 ? days + ' ' + translate('days') : ''; + }, + showTopbar: true, + swapTime: false, + showWeekNumbers: false, + getWeekNumber: function(date) //date will be the first day of a week + { + return moment(date).format('w'); + }, + customOpenAnimation: null, + customCloseAnimation: null, + customArrowPrevSymbol: null, + customArrowNextSymbol: null, + monthSelect: false, + yearSelect: false + }, opt); + + opt.start = false; + opt.end = false; + + opt.startWeek = false; + + //detect a touch device + opt.isTouchDevice = 'ontouchstart' in window || navigator.msMaxTouchPoints; + + //if it is a touch device, hide hovering tooltip + if (opt.isTouchDevice) opt.hoveringTooltip = false; + + //show one month on mobile devices + if (opt.singleMonth == 'auto') opt.singleMonth = $(window).width() < 480; + if (opt.singleMonth) opt.stickyMonths = false; + + if (!opt.showTopbar) opt.autoClose = true; + + if (opt.startDate && typeof opt.startDate == 'string') opt.startDate = moment(opt.startDate, opt.format).toDate(); + if (opt.endDate && typeof opt.endDate == 'string') opt.endDate = moment(opt.endDate, opt.format).toDate(); + + if (opt.yearSelect && typeof opt.yearSelect === 'boolean') { + opt.yearSelect = function(current) { return [current - 5, current + 5]; } + } + + var languages = getLanguages(); + var box; + var initiated = false; + var self = this; + var selfDom = $(self).get(0); + var domChangeTimer; + + $(this).off('.datepicker').on('click.datepicker', function(evt) { + var isOpen = box.is(':visible'); + if (!isOpen) open(opt.duration); + }).on('change.datepicker', function(evt) { + checkAndSetDefaultValue(); + }).on('keyup.datepicker', function() { + try { + clearTimeout(domChangeTimer); + } catch (e) {} + domChangeTimer = setTimeout(function() { + checkAndSetDefaultValue(); + }, 2000); + }); + + init_datepicker.call(this); + + if (opt.alwaysOpen) { + open(0); + } + + // expose some api + $(this).data('dateRangePicker', { + setStart: function(d1) { + if (typeof d1 == 'string') { + d1 = moment(d1, opt.format).toDate(); + } + + opt.end = false; + setSingleDate(d1); + + return this; + }, + setEnd: function(d2, silent) { + var start = new Date(); + start.setTime(opt.start); + if (typeof d2 == 'string') { + d2 = moment(d2, opt.format).toDate(); + } + setDateRange(start, d2, silent); + return this; + }, + setDateRange: function(d1, d2, silent) { + if (typeof d1 == 'string' && typeof d2 == 'string') { + d1 = moment(d1, opt.format).toDate(); + d2 = moment(d2, opt.format).toDate(); + } + setDateRange(d1, d2, silent); + }, + clear: clearSelection, + close: closeDatePicker, + open: open, + redraw: redrawDatePicker, + getDatePicker: getDatePicker, + resetMonthsView: resetMonthsView, + destroy: function() { + $(self).off('.datepicker'); + $(self).data('dateRangePicker', ''); + $(self).data('date-picker-opened', null); + box.remove(); + $(window).off('resize.datepicker', calcPosition); + $(document).off('click.datepicker', outsideClickClose); + } + }); + + $(window).on('resize.datepicker', calcPosition); + + return this; + + function IsOwnDatePickerClicked(evt, selfObj) { + return (selfObj.contains(evt.target) || evt.target == selfObj || (selfObj.childNodes != undefined && $.inArray(evt.target, selfObj.childNodes) >= 0)); + } + + function init_datepicker() { + var self = this; + + if ($(this).data('date-picker-opened')) { + closeDatePicker(); + return; + } + $(this).data('date-picker-opened', true); + + + box = createDom().hide(); + box.append('
'); + + $(opt.container).append(box); + + if (!opt.inline) { + calcPosition(); + } else { + box.addClass('inline-wrapper'); + } + + if (opt.alwaysOpen) { + box.find('.apply-btn').hide(); + } + + var defaultTime = getDefaultTime(); + resetMonthsView(defaultTime); + + if (opt.time.enabled) { + if ((opt.startDate && opt.endDate) || (opt.start && opt.end)) { + showTime(moment(opt.start || opt.startDate).toDate(), 'time1'); + showTime(moment(opt.end || opt.endDate).toDate(), 'time2'); + } else { + var defaultEndTime = opt.defaultEndTime ? opt.defaultEndTime : defaultTime; + showTime(defaultTime, 'time1'); + showTime(defaultEndTime, 'time2'); + } + } + + //showSelectedInfo(); + + + var defaultTopText = ''; + if (opt.singleDate) + defaultTopText = translate('default-single'); + else if (opt.minDays && opt.maxDays) + defaultTopText = translate('default-range'); + else if (opt.minDays) + defaultTopText = translate('default-more'); + else if (opt.maxDays) + defaultTopText = translate('default-less'); + else + defaultTopText = translate('default-default'); + + box.find('.default-top').html(defaultTopText.replace(/\%d/, opt.minDays).replace(/\%d/, opt.maxDays)); + if (opt.singleMonth) { + box.addClass('single-month'); + } else { + box.addClass('two-months'); + } + + + setTimeout(function() { + updateCalendarWidth(); + initiated = true; + }, 0); + + box.on('click', function(evt) { + evt.stopPropagation(); + }); + + //if user click other place of the webpage, close date range picker window + $(document).on('click.datepicker', outsideClickClose); + + box.find('.next').on('click', function() { + if (!opt.stickyMonths) + gotoNextMonth(this); + else + gotoNextMonth_stickily(this); + }); + + function gotoNextMonth(self) { + var isMonth2 = $(self).parents('table').hasClass('month2'); + var month = isMonth2 ? opt.month2 : opt.month1; + month = nextMonth(month); + if (!opt.singleMonth && !opt.singleDate && !isMonth2 && compare_month(month, opt.month2) >= 0 || isMonthOutOfBounds(month)) return; + showMonth(month, isMonth2 ? 'month2' : 'month1'); + showGap(); + } + + function gotoNextMonth_stickily(self) { + var nextMonth1 = nextMonth(opt.month1); + var nextMonth2 = nextMonth(opt.month2); + if (isMonthOutOfBounds(nextMonth2)) return; + if (!opt.singleDate && compare_month(nextMonth1, nextMonth2) >= 0) return; + showMonth(nextMonth1, 'month1'); + showMonth(nextMonth2, 'month2'); + showSelectedDays(); + } + + + box.find('.prev').on('click', function() { + if (!opt.stickyMonths) + gotoPrevMonth(this); + else + gotoPrevMonth_stickily(this); + }); + + function gotoPrevMonth(self) { + var isMonth2 = $(self).parents('table').hasClass('month2'); + var month = isMonth2 ? opt.month2 : opt.month1; + month = prevMonth(month); + if (isMonth2 && compare_month(month, opt.month1) <= 0 || isMonthOutOfBounds(month)) return; + showMonth(month, isMonth2 ? 'month2' : 'month1'); + showGap(); + } + + function gotoPrevMonth_stickily(self) { + var prevMonth1 = prevMonth(opt.month1); + var prevMonth2 = prevMonth(opt.month2); + if (isMonthOutOfBounds(prevMonth1)) return; + if (!opt.singleDate && compare_month(prevMonth2, prevMonth1) <= 0) return; + showMonth(prevMonth2, 'month2'); + showMonth(prevMonth1, 'month1'); + showSelectedDays(); + } + + box.attr('unselectable', 'on') + .css('user-select', 'none') + .on('selectstart', function(e) { + e.preventDefault(); + return false; + }); + + box.find('.apply-btn').on('click', function() { + closeDatePicker(); + var dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end)); + $(self).trigger('datepicker-apply', { + 'value': dateRange, + 'date1': new Date(opt.start), + 'date2': new Date(opt.end) + }); + }); + + box.find('[custom]').on('click', function() { + var valueName = $(this).attr('custom'); + opt.start = false; + opt.end = false; + box.find('.day.checked').removeClass('checked'); + opt.setValue.call(selfDom, valueName); + checkSelectionValid(); + showSelectedInfo(true); + showSelectedDays(); + if (opt.autoClose) closeDatePicker(); + }); + + box.find('[shortcut]').on('click', function() { + var shortcut = $(this).attr('shortcut'); + var end = new Date(), + start = false; + var dir; + if (shortcut.indexOf('day') != -1) { + var day = parseInt(shortcut.split(',', 2)[1], 10); + start = new Date(new Date().getTime() + 86400000 * day); + end = new Date(end.getTime() + 86400000 * (day > 0 ? 1 : -1)); + } else if (shortcut.indexOf('week') != -1) { + dir = shortcut.indexOf('prev,') != -1 ? -1 : 1; + var stopDay; + if (dir == 1) + stopDay = opt.startOfWeek == 'monday' ? 1 : 0; + else + stopDay = opt.startOfWeek == 'monday' ? 0 : 6; + + end = new Date(end.getTime() - 86400000); + while (end.getDay() != stopDay) end = new Date(end.getTime() + dir * 86400000); + start = new Date(end.getTime() + dir * 86400000 * 6); + } else if (shortcut.indexOf('month') != -1) { + dir = shortcut.indexOf('prev,') != -1 ? -1 : 1; + if (dir == 1) + start = nextMonth(end); + else + start = prevMonth(end); + start.setDate(1); + end = nextMonth(start); + end.setDate(1); + end = new Date(end.getTime() - 86400000); + } else if (shortcut.indexOf('year') != -1) { + dir = shortcut.indexOf('prev,') != -1 ? -1 : 1; + start = new Date(); + start.setFullYear(end.getFullYear() + dir); + start.setMonth(0); + start.setDate(1); + end.setFullYear(end.getFullYear() + dir); + end.setMonth(11); + end.setDate(31); + } else if (shortcut == 'custom') { + var name = $(this).html(); + if (opt.customShortcuts && opt.customShortcuts.length > 0) { + for (var i = 0; i < opt.customShortcuts.length; i++) { + var sh = opt.customShortcuts[i]; + if (sh.name == name) { + var data = []; + // try + // { + data = sh['dates'].call(); + //}catch(e){} + if (data && data.length == 2) { + start = data[0]; + end = data[1]; + } + + // if only one date is specified then just move calendars there + // move calendars to show this date's month and next months + if (data && data.length == 1) { + var movetodate = data[0]; + showMonth(movetodate, 'month1'); + showMonth(nextMonth(movetodate), 'month2'); + showGap(); + } + + break; + } + } + } + } + if (start && end) { + setDateRange(start, end); + checkSelectionValid(); + } + }); + + box.find('.time1 input[type=range]').on('change touchmove', function(e) { + var target = e.target, + hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined, + min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined; + setTime('time1', hour, min); + }); + + box.find('.time2 input[type=range]').on('change touchmove', function(e) { + var target = e.target, + hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined, + min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined; + setTime('time2', hour, min); + }); + + } + + + function calcPosition() { + if (!opt.inline) { + var offset = $(self).offset(); + if ($(opt.container).css('position') == 'relative') { + var containerOffset = $(opt.container).offset(); + var leftIndent = Math.max(0, offset.left + box.outerWidth() - $('body').width() + 16); + box.css({ + top: offset.top - containerOffset.top + $(self).outerHeight() + 4, + left: offset.left - containerOffset.left - leftIndent + }); + } else { + if (offset.left < 460) //left to right + { + box.css({ + top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10), + left: offset.left + }); + } else { + box.css({ + top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10), + left: offset.left + $(self).width() - box.width() - 16 + }); + } + } + } + } + + // Return the date picker wrapper element + function getDatePicker() { + return box; + } + + function open(animationTime) { + redrawDatePicker(); + checkAndSetDefaultValue(); + if (opt.customOpenAnimation) { + opt.customOpenAnimation.call(box.get(0), function() { + $(self).trigger('datepicker-opened', { + relatedTarget: box + }); + }); + } else { + box.slideDown(animationTime, function() { + $(self).trigger('datepicker-opened', { + relatedTarget: box + }); + }); + } + $(self).trigger('datepicker-open', { + relatedTarget: box + }); + showGap(); + updateCalendarWidth(); + calcPosition(); + } + + function checkAndSetDefaultValue() { + var __default_string = opt.getValue.call(selfDom); + var defaults = __default_string ? __default_string.split(opt.separator) : ''; + + if (defaults && ((defaults.length == 1 && opt.singleDate) || defaults.length >= 2)) { + var ___format = opt.format; + if (___format.match(/Do/)) { + + ___format = ___format.replace(/Do/, 'D'); + defaults[0] = defaults[0].replace(/(\d+)(th|nd|st)/, '$1'); + if (defaults.length >= 2) { + defaults[1] = defaults[1].replace(/(\d+)(th|nd|st)/, '$1'); + } + } + // set initiated to avoid triggerring datepicker-change event + initiated = false; + if (defaults.length >= 2) { + setDateRange(getValidValue(defaults[0], ___format, moment.locale(opt.language)), getValidValue(defaults[1], ___format, moment.locale(opt.language))); + } else if (defaults.length == 1 && opt.singleDate) { + setSingleDate(getValidValue(defaults[0], ___format, moment.locale(opt.language))); + } + + initiated = true; + } + } + + function getValidValue(date, format, locale) { + if (moment(date, format, locale).isValid()) { + return moment(date, format, locale).toDate(); + } else { + return moment().toDate(); + } + } + + function updateCalendarWidth() { + var gapMargin = box.find('.gap').css('margin-left'); + if (gapMargin) gapMargin = parseInt(gapMargin); + var w1 = box.find('.month1').width(); + var w2 = box.find('.gap').width() + (gapMargin ? gapMargin * 2 : 0); + var w3 = box.find('.month2').width(); + box.find('.month-wrapper').width(w1 + w2 + w3); + } + + function renderTime(name, date) { + box.find('.' + name + ' input[type=range].hour-range').val(moment(date).hours()); + box.find('.' + name + ' input[type=range].minute-range').val(moment(date).minutes()); + setTime(name, moment(date).format('HH'), moment(date).format('mm')); + } + + function changeTime(name, date) { + opt[name] = parseInt( + moment(parseInt(date)) + .hour(moment(opt[name + 'Time']).format('HH'), 'h') + .minute(moment(opt[name + 'Time']).format('mm'), 'm').valueOf() + ); + } + + function swapTime() { + renderTime('time1', opt.start); + renderTime('time2', opt.end); + } + + function setTime(name, hour, minute) { + hour && (box.find('.' + name + ' .hour-val').text(hour)); + minute && (box.find('.' + name + ' .minute-val').text(minute)); + switch (name) { + case 'time1': + if (opt.start) { + setRange('start', moment(opt.start)); + } + setRange('startTime', moment(opt.startTime || moment().valueOf())); + break; + case 'time2': + if (opt.end) { + setRange('end', moment(opt.end)); + } + setRange('endTime', moment(opt.endTime || moment().valueOf())); + break; + } + + function setRange(name, timePoint) { + var h = timePoint.format('HH'), + m = timePoint.format('mm'); + opt[name] = timePoint + .hour(hour || h, 'h') + .minute(minute || m, 'm') + .valueOf(); + } + checkSelectionValid(); + showSelectedInfo(); + showSelectedDays(); + } + + function clearSelection() { + opt.start = false; + opt.end = false; + box.find('.day.checked').removeClass('checked'); + box.find('.day.last-date-selected').removeClass('last-date-selected'); + box.find('.day.first-date-selected').removeClass('first-date-selected'); + opt.setValue.call(selfDom, ''); + checkSelectionValid(); + showSelectedInfo(); + showSelectedDays(); + } + + function handleStart(time) { + var r = time; + if (opt.batchMode === 'week-range') { + if (opt.startOfWeek === 'monday') { + r = moment(parseInt(time)).startOf('isoweek').valueOf(); + } else { + r = moment(parseInt(time)).startOf('week').valueOf(); + } + } else if (opt.batchMode === 'month-range') { + r = moment(parseInt(time)).startOf('month').valueOf(); + } + return r; + } + + function handleEnd(time) { + var r = time; + if (opt.batchMode === 'week-range') { + if (opt.startOfWeek === 'monday') { + r = moment(parseInt(time)).endOf('isoweek').valueOf(); + } else { + r = moment(parseInt(time)).endOf('week').valueOf(); + } + } else if (opt.batchMode === 'month-range') { + r = moment(parseInt(time)).endOf('month').valueOf(); + } + return r; + } + + + function dayClicked(day) { + if (day.hasClass('invalid')) return; + var time = day.attr('time'); + day.addClass('checked'); + if (opt.singleDate) { + opt.start = time; + opt.end = false; + } else if (opt.batchMode === 'week') { + if (opt.startOfWeek === 'monday') { + opt.start = moment(parseInt(time)).startOf('isoweek').valueOf(); + opt.end = moment(parseInt(time)).endOf('isoweek').valueOf(); + } else { + opt.end = moment(parseInt(time)).endOf('week').valueOf(); + opt.start = moment(parseInt(time)).startOf('week').valueOf(); + } + } else if (opt.batchMode === 'workweek') { + opt.start = moment(parseInt(time)).day(1).valueOf(); + opt.end = moment(parseInt(time)).day(5).valueOf(); + } else if (opt.batchMode === 'weekend') { + opt.start = moment(parseInt(time)).day(6).valueOf(); + opt.end = moment(parseInt(time)).day(7).valueOf(); + } else if (opt.batchMode === 'month') { + opt.start = moment(parseInt(time)).startOf('month').valueOf(); + opt.end = moment(parseInt(time)).endOf('month').valueOf(); + } else if ((opt.start && opt.end) || (!opt.start && !opt.end)) { + opt.start = handleStart(time); + opt.end = false; + } else if (opt.start) { + opt.end = handleEnd(time); + if (opt.time.enabled) { + changeTime('end', opt.end); + } + } + + //Update time in case it is enabled and timestamps are available + if (opt.time.enabled) { + if (opt.start) { + changeTime('start', opt.start); + } + if (opt.end) { + changeTime('end', opt.end); + } + } + + //In case the start is after the end, swap the timestamps + if (!opt.singleDate && opt.start && opt.end && opt.start > opt.end) { + var tmp = opt.end; + opt.end = handleEnd(opt.start); + opt.start = handleStart(tmp); + if (opt.time.enabled && opt.swapTime) { + swapTime(); + } + } + + opt.start = parseInt(opt.start); + opt.end = parseInt(opt.end); + + clearHovering(); + if (opt.start && !opt.end) { + $(self).trigger('datepicker-first-date-selected', { + 'date1': new Date(opt.start) + }); + dayHovering(day); + } + updateSelectableRange(time); + + checkSelectionValid(); + showSelectedInfo(); + showSelectedDays(); + autoclose(); + } + + + function weekNumberClicked(weekNumberDom) { + var thisTime = parseInt(weekNumberDom.attr('data-start-time'), 10); + var date1, date2; + if (!opt.startWeek) { + opt.startWeek = thisTime; + weekNumberDom.addClass('week-number-selected'); + date1 = new Date(thisTime); + opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf(); + opt.end = moment(date1).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf(); + } else { + box.find('.week-number-selected').removeClass('week-number-selected'); + date1 = new Date(thisTime < opt.startWeek ? thisTime : opt.startWeek); + date2 = new Date(thisTime < opt.startWeek ? opt.startWeek : thisTime); + opt.startWeek = false; + opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf(); + opt.end = moment(date2).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf(); + } + updateSelectableRange(); + checkSelectionValid(); + showSelectedInfo(); + showSelectedDays(); + autoclose(); + } + + function isValidTime(time) { + time = parseInt(time, 10); + if (opt.startDate && compare_day(time, opt.startDate) < 0) return false; + if (opt.endDate && compare_day(time, opt.endDate) > 0) return false; + + if (opt.start && !opt.end && !opt.singleDate) { + //check maxDays and minDays setting + if (opt.maxDays > 0 && countDays(time, opt.start) > opt.maxDays) return false; + if (opt.minDays > 0 && countDays(time, opt.start) < opt.minDays) return false; + + //check selectForward and selectBackward + if (opt.selectForward && time < opt.start) return false; + if (opt.selectBackward && time > opt.start) return false; + + //check disabled days + if (opt.beforeShowDay && typeof opt.beforeShowDay == 'function') { + var valid = true; + var timeTmp = time; + while (countDays(timeTmp, opt.start) > 1) { + var arr = opt.beforeShowDay(new Date(timeTmp)); + if (!arr[0]) { + valid = false; + break; + } + if (Math.abs(timeTmp - opt.start) < 86400000) break; + if (timeTmp > opt.start) timeTmp -= 86400000; + if (timeTmp < opt.start) timeTmp += 86400000; + } + if (!valid) return false; + } + } + return true; + } + + + function updateSelectableRange() { + box.find('.day.invalid.tmp').removeClass('tmp invalid').addClass('valid'); + if (opt.start && !opt.end) { + box.find('.day.toMonth.valid').each(function() { + var time = parseInt($(this).attr('time'), 10); + if (!isValidTime(time)) + $(this).addClass('invalid tmp').removeClass('valid'); + else + $(this).addClass('valid tmp').removeClass('invalid'); + }); + } + + return true; + } + + + function dayHovering(day) { + var hoverTime = parseInt(day.attr('time')); + var tooltip = ''; + + if (day.hasClass('has-tooltip') && day.attr('data-tooltip')) { + tooltip = '' + day.attr('data-tooltip') + ''; + } else if (!day.hasClass('invalid')) { + if (opt.singleDate) { + box.find('.day.hovering').removeClass('hovering'); + day.addClass('hovering'); + } else { + box.find('.day').each(function() { + var time = parseInt($(this).attr('time')), + start = opt.start, + end = opt.end; + + if (time == hoverTime) { + $(this).addClass('hovering'); + } else { + $(this).removeClass('hovering'); + } + + if ( + (opt.start && !opt.end) && + ( + (opt.start < time && hoverTime >= time) || + (opt.start > time && hoverTime <= time) + ) + ) { + $(this).addClass('hovering'); + } else { + $(this).removeClass('hovering'); + } + }); + + if (opt.start && !opt.end) { + var days = countDays(hoverTime, opt.start); + if (opt.hoveringTooltip) { + if (typeof opt.hoveringTooltip == 'function') { + tooltip = opt.hoveringTooltip(days, opt.start, hoverTime); + } else if (opt.hoveringTooltip === true && days > 1) { + tooltip = days + ' ' + translate('days'); + } + } + } + } + } + + if (tooltip) { + var posDay = day.offset(); + var posBox = box.offset(); + + var _left = posDay.left - posBox.left; + var _top = posDay.top - posBox.top; + _left += day.width() / 2; + + + var $tip = box.find('.date-range-length-tip'); + var w = $tip.css({ + 'visibility': 'hidden', + 'display': 'none' + }).html(tooltip).width(); + var h = $tip.height(); + _left -= w / 2; + _top -= h; + setTimeout(function() { + $tip.css({ + left: _left, + top: _top, + display: 'block', + 'visibility': 'visible' + }); + }, 10); + } else { + box.find('.date-range-length-tip').hide(); + } + } + + function clearHovering() { + box.find('.day.hovering').removeClass('hovering'); + box.find('.date-range-length-tip').hide(); + } + + function dateChanged(date) { + var value = date.val(); + var name = date.attr('name'); + var type = date.parents('table').hasClass('month1') ? 'month1' : 'month2'; + var oppositeType = type === 'month1' ? 'month2' : 'month1'; + var startDate = opt.startDate ? moment(opt.startDate) : false; + var endDate = opt.endDate ? moment(opt.endDate) : false; + var newDate = moment(opt[type])[name](value); + + + if (startDate && newDate.isSameOrBefore(startDate)) { + newDate = startDate.add(type === 'month2' ? 1 : 0, 'month'); + } + + if (endDate && newDate.isSameOrAfter(endDate)) { + newDate = endDate.add(!opt.singleMonth && type === 'month1' ? -1 : 0, 'month'); + } + + showMonth(newDate, type); + + if (type === 'month1') { + if (opt.stickyMonths || moment(newDate).isSameOrAfter(opt[oppositeType], 'month')) { + showMonth(moment(newDate).add(1, 'month'), oppositeType); + } + } else { + if (opt.stickyMonths || moment(newDate).isSameOrBefore(opt[oppositeType], 'month')) { + showMonth(moment(newDate).add(-1, 'month'), oppositeType); + } + } + + showGap(); + } + + function autoclose() { + if (opt.singleDate === true) { + if (initiated && opt.start) { + if (opt.autoClose) closeDatePicker(); + } + } else { + if (initiated && opt.start && opt.end) { + if (opt.autoClose) closeDatePicker(); + } + } + } + + function checkSelectionValid() { + var days = Math.ceil((opt.end - opt.start) / 86400000) + 1; + if (opt.singleDate) { // Validate if only start is there + if (opt.start && !opt.end) + box.find('.drp_top-bar').removeClass('error').addClass('normal'); + else + box.find('.drp_top-bar').removeClass('error').removeClass('normal'); + } else if (opt.maxDays && days > opt.maxDays) { + opt.start = false; + opt.end = false; + box.find('.day').removeClass('checked'); + box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(translate('less-than').replace('%d', opt.maxDays)); + } else if (opt.minDays && days < opt.minDays) { + opt.start = false; + opt.end = false; + box.find('.day').removeClass('checked'); + box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(translate('more-than').replace('%d', opt.minDays)); + } else { + if (opt.start || opt.end) + box.find('.drp_top-bar').removeClass('error').addClass('normal'); + else + box.find('.drp_top-bar').removeClass('error').removeClass('normal'); + } + + if ((opt.singleDate && opt.start && !opt.end) || (!opt.singleDate && opt.start && opt.end)) { + box.find('.apply-btn').removeClass('disabled'); + } else { + box.find('.apply-btn').addClass('disabled'); + } + + if (opt.batchMode) { + if ( + (opt.start && opt.startDate && compare_day(opt.start, opt.startDate) < 0) || + (opt.end && opt.endDate && compare_day(opt.end, opt.endDate) > 0) + ) { + opt.start = false; + opt.end = false; + box.find('.day').removeClass('checked'); + } + } + } + + function showSelectedInfo(forceValid, silent) { + box.find('.start-day').html('...'); + box.find('.end-day').html('...'); + box.find('.selected-days').hide(); + if (opt.start) { + box.find('.start-day').html(getDateString(new Date(parseInt(opt.start)))); + } + if (opt.end) { + box.find('.end-day').html(getDateString(new Date(parseInt(opt.end)))); + } + var dateRange; + if (opt.start && opt.singleDate) { + box.find('.apply-btn').removeClass('disabled'); + dateRange = getDateString(new Date(opt.start)); + opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end))); + + if (initiated && !silent) { + $(self).trigger('datepicker-change', { + 'value': dateRange, + 'date1': new Date(opt.start) + }); + } + } else if (opt.start && opt.end) { + box.find('.selected-days').show().find('.selected-days-num').html(countDays(opt.end, opt.start)); + box.find('.apply-btn').removeClass('disabled'); + dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end)); + opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end))); + if (initiated && !silent) { + $(self).trigger('datepicker-change', { + 'value': dateRange, + 'date1': new Date(opt.start), + 'date2': new Date(opt.end) + }); + } + } else if (forceValid) { + box.find('.apply-btn').removeClass('disabled'); + } else { + box.find('.apply-btn').addClass('disabled'); + } + } + + function countDays(start, end) { + return Math.abs(moment(start).diff(moment(end), 'd')) + 1; + } + + function setDateRange(date1, date2, silent) { + if (date1.getTime() > date2.getTime()) { + var tmp = date2; + date2 = date1; + date1 = tmp; + tmp = null; + } + var valid = true; + if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false; + if (opt.endDate && compare_day(date2, opt.endDate) > 0) valid = false; + if (!valid) { + showMonth(opt.startDate, 'month1'); + showMonth(nextMonth(opt.startDate), 'month2'); + showGap(); + return; + } + + opt.start = date1.getTime(); + opt.end = date2.getTime(); + + if (opt.time.enabled) { + renderTime('time1', date1); + renderTime('time2', date2); + } + + if (opt.stickyMonths || (compare_day(date1, date2) > 0 && compare_month(date1, date2) === 0)) { + if (opt.lookBehind) { + date1 = prevMonth(date2); + } else { + date2 = nextMonth(date1); + } + } + + if (opt.stickyMonths && opt.endDate !== false && compare_month(date2, opt.endDate) > 0) { + date1 = prevMonth(date1); + date2 = prevMonth(date2); + } + + if (!opt.stickyMonths) { + if (compare_month(date1, date2) === 0) { + if (opt.lookBehind) { + date1 = prevMonth(date2); + } else { + date2 = nextMonth(date1); + } + } + } + + showMonth(date1, 'month1'); + showMonth(date2, 'month2'); + showGap(); + checkSelectionValid(); + showSelectedInfo(false, silent); + autoclose(); + } + + function setSingleDate(date1) { + + var valid = true; + if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false; + if (opt.endDate && compare_day(date1, opt.endDate) > 0) valid = false; + if (!valid) { + showMonth(opt.startDate, 'month1'); + return; + } + + opt.start = date1.getTime(); + + + if (opt.time.enabled) { + renderTime('time1', date1); + + } + showMonth(date1, 'month1'); + if (opt.singleMonth !== true) { + var date2 = nextMonth(date1); + showMonth(date2, 'month2'); + } + showGap(); + showSelectedInfo(); + autoclose(); + } + + function showSelectedDays() { + if (!opt.start && !opt.end) return; + box.find('.day').each(function() { + var time = parseInt($(this).attr('time')), + start = opt.start, + end = opt.end; + if (opt.time.enabled) { + time = moment(time).startOf('day').valueOf(); + start = moment(start || moment().valueOf()).startOf('day').valueOf(); + end = moment(end || moment().valueOf()).startOf('day').valueOf(); + } + if ( + (opt.start && opt.end && end >= time && start <= time) || + (opt.start && !opt.end && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) + ) { + $(this).addClass('checked'); + } else { + $(this).removeClass('checked'); + } + + //add first-date-selected class name to the first date selected + if (opt.start && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) { + $(this).addClass('first-date-selected'); + } else { + $(this).removeClass('first-date-selected'); + } + //add last-date-selected + if (opt.end && moment(end).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) { + $(this).addClass('last-date-selected'); + } else { + $(this).removeClass('last-date-selected'); + } + }); + + box.find('.week-number').each(function() { + if ($(this).attr('data-start-time') == opt.startWeek) { + $(this).addClass('week-number-selected'); + } + }); + } + + function showMonth(date, month) { + date = moment(date).toDate(); + var monthElement = generateMonthElement(date, month); + var yearElement = generateYearElement(date, month); + + box.find('.' + month + ' .month-name').html(monthElement + ' ' + yearElement); + box.find('.' + month + ' tbody').html(createMonthHTML(date)); + opt[month] = date; + updateSelectableRange(); + bindEvents(); + } + + function generateMonthElement(date, month) { + date = moment(date); + var currentMonth = date.get('month'); + var currentMonthName = nameMonth(currentMonth); + var nonSelectableMonth = '
' + currentMonthName + '
'; + + if (!opt.monthSelect) { return nonSelectableMonth; } + + var startDate = opt.startDate ? moment(opt.startDate).add(!opt.singleMonth && month === 'month2' ? 1 : 0, 'month') : false; + var endDate = opt.endDate ? moment(opt.endDate).add(!opt.singleMonth && month === 'month1' ? -1 : 0, 'month') : false; + + var minSelectableMonth = startDate && date.isSame(startDate, 'year') ? startDate.get('month') : 0; + var maxSelectableMonth = endDate && date.isSame(endDate, 'year') ? endDate.get('month') : 11; + var minVisibleMonth = Math.min(minSelectableMonth, currentMonth); + var maxVisibleMonth = Math.max(maxSelectableMonth, currentMonth); + + if (minVisibleMonth === maxVisibleMonth) { return nonSelectableMonth; } + + var selectData = generateSelectData( + { + minSelectable: minSelectableMonth, + maxSelectable: maxSelectableMonth, + minVisible: minVisibleMonth, + maxVisible: maxVisibleMonth, + }, + currentMonth, + function (value) { return nameMonth(value); } + ) + return generateSelect('month', selectData); + } + + function generateYearElement(date, month) { + date = moment(date); + var currentYear = date.get('year'); + var nonSelectableMonth = '
' + currentYear + '
'; + + if (!opt.yearSelect) { return nonSelectableMonth; } + + var isYearFunction = opt.yearSelect && typeof opt.yearSelect === 'function'; + var startDate = opt.startDate ? moment(opt.startDate).add(!opt.singleMonth && month === 'month2' ? 1 : 0, 'month') : false; + var endDate = opt.endDate ? moment(opt.endDate).add(!opt.singleMonth && month === 'month1' ? -1 : 0, 'month') : false; + var range = isYearFunction ? opt.yearSelect(currentYear) : opt.yearSelect.slice(); + + var minSelectableYear = startDate ? Math.max(range[0], startDate.get('year')) : Math.min(range[0], currentYear); + var maxSelectableYear = endDate ? Math.min(range[1], endDate.get('year')) : Math.max(range[1], currentYear); + var minVisibleYear = Math.min(minSelectableYear, currentYear); + var maxVisibleYear = Math.max(maxSelectableYear, currentYear); + + if (minVisibleYear === maxVisibleYear) { return nonSelectableMonth; } + + var selectData = generateSelectData( + { + minSelectable: minSelectableYear, + maxSelectable: maxSelectableYear, + minVisible: minVisibleYear, + maxVisible: maxVisibleYear, + }, + currentYear + ) + return generateSelect('year', selectData); + } + + + function generateSelectData(range, current, valueBeautifier) { + var data = []; + valueBeautifier = valueBeautifier || function(value) { return value; }; + + for (var i = range.minVisible; i <= range.maxVisible; i++) { + data.push({ + value: i, + text: valueBeautifier(i), + selected: i === current, + disabled: ((i < range.minSelectable) || (i > range.maxSelectable)), + }); + } + + return data; + } + + function generateSelect(name, data) { + var select = '
' + current + '
'; + + return select; + } + + function bindEvents() { + box.find('.day').off("click").on('click', function(evt) { + dayClicked($(this)); + }); + + box.find('.day').off("mouseenter").on('mouseenter', function(evt) { + dayHovering($(this)); + }); + + box.find('.day').off("mouseleave").on('mouseleave', function(evt) { + box.find('.date-range-length-tip').hide(); + if (opt.singleDate) { + clearHovering(); + } + }); + + box.find('.week-number').off("click").on('click', function(evt) { + weekNumberClicked($(this)); + }); + + box.find('.month').off("change").on('change', function(evt) { + dateChanged($(this)); + }); + + box.find('.year').off("change").on('change', function(evt) { + dateChanged($(this)); + }); + } + + function showTime(date, name) { + box.find('.' + name).append(getTimeHTML()); + renderTime(name, date); + } + + function nameMonth(m) { + return translate('month-name')[m]; + } + + function getDateString(d) { + return moment(d).format(opt.format); + } + + function showGap() { + showSelectedDays(); + var m1 = parseInt(moment(opt.month1).format('YYYYMM')); + var m2 = parseInt(moment(opt.month2).format('YYYYMM')); + var p = Math.abs(m1 - m2); + var shouldShow = (p > 1 && p != 89); + if (shouldShow) { + box.addClass('has-gap').removeClass('no-gap').find('.gap').css('visibility', 'visible'); + } else { + box.removeClass('has-gap').addClass('no-gap').find('.gap').css('visibility', 'hidden'); + } + var h1 = box.find('table.month1').height(); + var h2 = box.find('table.month2').height(); + box.find('.gap').height(Math.max(h1, h2) + 10); + } + + function closeDatePicker() { + if (opt.alwaysOpen) return; + + var afterAnim = function() { + $(self).data('date-picker-opened', false); + $(self).trigger('datepicker-closed', { + relatedTarget: box + }); + }; + if (opt.customCloseAnimation) { + opt.customCloseAnimation.call(box.get(0), afterAnim); + } else { + $(box).slideUp(opt.duration, afterAnim); + } + $(self).trigger('datepicker-close', { + relatedTarget: box + }); + } + + function redrawDatePicker() { + showMonth(opt.month1, 'month1'); + showMonth(opt.month2, 'month2'); + } + + function compare_month(m1, m2) { + var p = parseInt(moment(m1).format('YYYYMM')) - parseInt(moment(m2).format('YYYYMM')); + if (p > 0) return 1; + if (p === 0) return 0; + return -1; + } + + function compare_day(m1, m2) { + var p = parseInt(moment(m1).format('YYYYMMDD')) - parseInt(moment(m2).format('YYYYMMDD')); + if (p > 0) return 1; + if (p === 0) return 0; + return -1; + } + + function nextMonth(month) { + return moment(month).add(1, 'months').toDate(); + } + + function prevMonth(month) { + return moment(month).add(-1, 'months').toDate(); + } + + function getTimeHTML() { + return '
' + + '' + translate('Time') + ': 00:00' + + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '
'; + } + + function createDom() { + var html = '
'; + + if (opt.showTopbar) { + html += '
'; + + if (opt.customTopBar) { + if (typeof opt.customTopBar == 'function') opt.customTopBar = opt.customTopBar(); + html += '
' + opt.customTopBar + '
'; + } else { + html += '
' + + '' + translate('selected') + ' ...'; + if (!opt.singleDate) { + html += ' ' + opt.separator + ' ... (3 ' + translate('days') + ')'; + } + html += '
'; + html += '
error
' + + '
default
'; + } + + html += ''; + html += '
'; + } + + var _colspan = opt.showWeekNumbers ? 6 : 5; + + var arrowPrev = '<'; + if (opt.customArrowPrevSymbol) arrowPrev = opt.customArrowPrevSymbol; + + var arrowNext = '>'; + if (opt.customArrowNextSymbol) arrowNext = opt.customArrowNextSymbol; + + html += '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + getWeekHead() + + ' ' + + ' ' + + '
' + + ' ' + + arrowPrev + + ' ' + + ' ' + + ' ' + + (opt.singleDate || !opt.stickyMonths ? '' + arrowNext + '' : '') + + '
'; + + if (hasMonth2()) { + html += '
' + getGapHTML() + '
' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + getWeekHead() + + ' ' + + ' ' + + '
' + + (!opt.stickyMonths ? '' + arrowPrev + '' : '') + + ' ' + + ' ' + + ' ' + arrowNext + '' + + '
'; + + } + //+'
' + html += '
' + + '
' + + '
'; + if (!opt.singleDate) { + html += '
'; + } + html += '
' + + '
' + + '
'; + + html += ''; + + + return $(html); + } + + function getApplyBtnClass() { + var klass = ''; + if (opt.autoClose === true) { + klass += ' hide'; + } + if (opt.applyBtnClass !== '') { + klass += ' ' + opt.applyBtnClass; + } + return klass; + } + + function getWeekHead() { + var prepend = opt.showWeekNumbers ? '' + translate('week-number') + '' : ''; + if (opt.startOfWeek == 'monday') { + return prepend + '' + translate('week-1') + '' + + '' + translate('week-2') + '' + + '' + translate('week-3') + '' + + '' + translate('week-4') + '' + + '' + translate('week-5') + '' + + '' + translate('week-6') + '' + + '' + translate('week-7') + ''; + } else { + return prepend + '' + translate('week-7') + '' + + '' + translate('week-1') + '' + + '' + translate('week-2') + '' + + '' + translate('week-3') + '' + + '' + translate('week-4') + '' + + '' + translate('week-5') + '' + + '' + translate('week-6') + ''; + } + } + + function isMonthOutOfBounds(month) { + month = moment(month); + if (opt.startDate && month.endOf('month').isBefore(opt.startDate)) { + return true; + } + if (opt.endDate && month.startOf('month').isAfter(opt.endDate)) { + return true; + } + return false; + } + + function getGapHTML() { + var html = ['
']; + for (var i = 0; i < 20; i++) { + html.push('
' + + '
' + + '
' + + '
' + + '
'); + } + html.push('
'); + return html.join(''); + } + + function hasMonth2() { + return (!opt.singleMonth); + } + + function attributesCallbacks(initialObject, callbacksArray, today) { + var resultObject = $.extend(true, {}, initialObject); + + $.each(callbacksArray, function(cbAttrIndex, cbAttr) { + var addAttributes = cbAttr(today); + for (var attr in addAttributes) { + if (resultObject.hasOwnProperty(attr)) { + resultObject[attr] += addAttributes[attr]; + } else { + resultObject[attr] = addAttributes[attr]; + } + } + }); + + var attrString = ''; + + for (var attr in resultObject) { + if (resultObject.hasOwnProperty(attr)) { + attrString += attr + '="' + resultObject[attr] + '" '; + } + } + + return attrString; + } + + function createMonthHTML(d) { + var days = []; + d.setDate(1); + var lastMonth = new Date(d.getTime() - 86400000); + var now = new Date(); + + var dayOfWeek = d.getDay(); + if ((dayOfWeek === 0) && (opt.startOfWeek === 'monday')) { + // add one week + dayOfWeek = 7; + } + var today, valid; + + if (dayOfWeek > 0) { + for (var i = dayOfWeek; i > 0; i--) { + var day = new Date(d.getTime() - 86400000 * i); + valid = isValidTime(day.getTime()); + if (opt.startDate && compare_day(day, opt.startDate) < 0) valid = false; + if (opt.endDate && compare_day(day, opt.endDate) > 0) valid = false; + days.push({ + date: day, + type: 'lastMonth', + day: day.getDate(), + time: day.getTime(), + valid: valid + }); + } + } + var toMonth = d.getMonth(); + for (var i = 0; i < 40; i++) { + today = moment(d).add(i, 'days').toDate(); + valid = isValidTime(today.getTime()); + if (opt.startDate && compare_day(today, opt.startDate) < 0) valid = false; + if (opt.endDate && compare_day(today, opt.endDate) > 0) valid = false; + days.push({ + date: today, + type: today.getMonth() == toMonth ? 'toMonth' : 'nextMonth', + day: today.getDate(), + time: today.getTime(), + valid: valid + }); + } + var html = []; + for (var week = 0; week < 6; week++) { + if (days[week * 7].type == 'nextMonth') break; + html.push(''); + + for (var day = 0; day < 7; day++) { + var _day = (opt.startOfWeek == 'monday') ? day + 1 : day; + today = days[week * 7 + _day]; + var highlightToday = moment(today.time).format('L') == moment(now).format('L'); + today.extraClass = ''; + today.tooltip = ''; + if (today.valid && opt.beforeShowDay && typeof opt.beforeShowDay == 'function') { + var _r = opt.beforeShowDay(moment(today.time).toDate()); + today.valid = _r[0]; + today.extraClass = _r[1] || ''; + today.tooltip = _r[2] || ''; + if (today.tooltip !== '') today.extraClass += ' has-tooltip '; + } + + var todayDivAttr = { + time: today.time, + 'data-tooltip': today.tooltip, + 'class': 'day ' + today.type + ' ' + today.extraClass + ' ' + (today.valid ? 'valid' : 'invalid') + ' ' + (highlightToday ? 'real-today' : '') + }; + + if (day === 0 && opt.showWeekNumbers) { + html.push('
' + opt.getWeekNumber(today.date) + '
'); + } + + html.push('
' + showDayHTML(today.time, today.day) + '
'); + } + html.push(''); + } + return html.join(''); + } + + function showDayHTML(time, date) { + if (opt.showDateFilter && typeof opt.showDateFilter == 'function') return opt.showDateFilter(time, date); + return date; + } + + function getLanguages() { + if (opt.language == 'auto') { + var language = navigator.language ? navigator.language : navigator.browserLanguage; + if (!language) { + return $.dateRangePickerLanguages['default']; + } + language = language.toLowerCase(); + if(language in $.dateRangePickerLanguages){ + return $.dateRangePickerLanguages[language]; + } + + return $.dateRangePickerLanguages['default']; + } else if (opt.language && opt.language in $.dateRangePickerLanguages) { + return $.dateRangePickerLanguages[opt.language]; + } else { + return $.dateRangePickerLanguages['default']; + } + } + + /** + * Translate language string, try both the provided translation key, as the lower case version + */ + function translate(translationKey) { + var translationKeyLowerCase = translationKey.toLowerCase(); + var result = (translationKey in languages) ? languages[translationKey] : (translationKeyLowerCase in languages) ? languages[translationKeyLowerCase] : null; + var defaultLanguage = $.dateRangePickerLanguages['default']; + if (result == null) result = (translationKey in defaultLanguage) ? defaultLanguage[translationKey] : (translationKeyLowerCase in defaultLanguage) ? defaultLanguage[translationKeyLowerCase] : ''; + + return result; + } + + function getDefaultTime() { + var defaultTime = opt.defaultTime ? opt.defaultTime : new Date(); + + if (opt.lookBehind) { + if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = nextMonth(moment(opt.startDate).toDate()); + if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate(); + } else { + if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate(); + if (opt.endDate && compare_month(nextMonth(defaultTime), opt.endDate) > 0) defaultTime = prevMonth(moment(opt.endDate).toDate()); + } + + if (opt.singleDate) { + if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate(); + if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate(); + } + + return defaultTime; + } + + function resetMonthsView(time) { + if (!time) { + time = getDefaultTime(); + } + + if (opt.lookBehind) { + showMonth(prevMonth(time), 'month1'); + showMonth(time, 'month2'); + } else { + showMonth(time, 'month1'); + showMonth(nextMonth(time), 'month2'); + } + + if (opt.singleDate) { + showMonth(time, 'month1'); + } + + showSelectedDays(); + showGap(); + } + + function outsideClickClose(evt) { + if (!IsOwnDatePickerClicked(evt, self[0])) { + if (box.is(':visible')) closeDatePicker(); + } + } + + }; +}));