pax_global_header00006660000000000000000000000064137443471130014521gustar00rootroot0000000000000052 comment=4524a48e52d16519d63c2d80c4e419e9be9a0825 Pikaday-1.8.2/000077500000000000000000000000001374434711300131135ustar00rootroot00000000000000Pikaday-1.8.2/.editorconfig000066400000000000000000000003431374434711300155700ustar00rootroot00000000000000; http://EditorConfig.org root = true [*] end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.{js,css}] indent_style = space indent_size = 4 [*.md] trim_trailing_whitespace = falsePikaday-1.8.2/.gitattributes000066400000000000000000000000141374434711300160010ustar00rootroot00000000000000* text=auto Pikaday-1.8.2/.gitignore000066400000000000000000000000361374434711300151020ustar00rootroot00000000000000node_modules .c9revisions .c9 Pikaday-1.8.2/.jshintrc000066400000000000000000000010201374434711300147310ustar00rootroot00000000000000{ "node": true, "browser": true, "esnext": true, "bitwise": true, "camelcase": true, "eqeqeq": true, "immed": true, "indent": 4, "latedef": true, "newcap": true, "noarg": true, "quotmark": "single", "regexp": true, "undef": true, "unused": true, "strict": true, "trailing": true, "smarttabs": true, "expr": true, "globals": { "define": false, /* MOCHA */ "describe" : false, "it" : false, "before" : false, "beforeEach" : false, "after" : false, "afterEach" : false } } Pikaday-1.8.2/.npmignore000066400000000000000000000001711374434711300151110ustar00rootroot00000000000000node_modules examples tests .editorconfig .gitattributes .jshintrc .npmignore bower.json component.json CNAME index.html Pikaday-1.8.2/CHANGELOG.md000077500000000000000000000072231374434711300147330ustar00rootroot00000000000000# Changelog ## 1.8.2 - 2020-10-22 - Properly parse date string, fixes #735 #755 #688 - Cleaner packages, see #542 #580 - Add space for XHTML, fixes #526 - CSS fixes, see #431 #430 #809 #883 #237 #869 #869 #730 - Add clear functionality, see #720 - Use unique IDs, fixes #650 - Bubble event on left arrow, fixes #710 - Show week numbers based on ISO 8601 by default, fixes #388 #825 ## 1.8.0 - 2018-10-17 - Remove testling because service is not running atm - Move to github organisation Pikaday/Pikaday - Add CSS-classes indicating position - Remove the Moment.js optional dependency - Add aria label text configuration ## 1.7.0 - 2017-12-12 - Add keyboard input option, see #610 ## 1.6.1 - 2017-06-06 - Fix memory leak, fixes #630 ## 1.6.0 - 2017-05-31 - Add custom parsers, see #613 - Re-introduce correct null behavor, fixes #654 - Pick a whole week, see #516 - Added `events` option: dates that you would like to differentiate from regular days, see #152 - Fix the (re)position issue, see #643, #642 - Configure if field is blurred when date is selected, see #631 - Prevent error when no field is bound, fixes #611 ## 1.5.1 - 2016-10-28 - Only set attribute if field is bound, see #567 ## 1.5.0 - 2016-10-27 - Make Pikaday accessibile, see #522 - Add possibility to reset the max and min date to the date picker - Make Pikaday XHTML compatible, see #492 - Remove unnecessary setTimeout call, fixes #496 - Make disabled buttons not clickable in IE 10 and below, fixes #288 - Show days in next and previous months ## 1.4.0 - 2015-10-30 - Fix touch device support, see #374 - Add possibility to reset the max and min date to the date picker ## 1.3.3 - 2015-06-26 - Add theme class support, see #260 - Fix on iOS, see #101, #121 - Add date range example, see #337 - Fix dates used in examples, see #329 ## 1.3.2 - 2015-02-17 - Add options to disable days, see #171 - Add SCSS file, see #130 ## 1.3.1 - 2015-02-04 - Fix for bug introduced in #166; fixes #224, #230 ## 1.3.0 - 2015-01-09 - Fix #79 moving through months can cause calendar to "bounce around" - Add configurable number of shown months - #51 Add unit tests with ci: [testling](https://ci.testling.com/rikkert/pikaday) - Fix #94 blur input field after date selection - Add configuable container to render calendar into - Add option to show week numbers, see #147 - Positioning is now optional, see #192 ## 1.2.0 - 2014-01-28 - Fix #8 Automatically adjust datepicker position - Merge #45 Adjusting position - Merge #11 Allow using a different element to open and bind the datepicker to - Use new Bower package filename: bower.json - Merge #90 Configuration options for the title, useful for Asian languages. - Merge #96 Use proper UMD-wrapper - Merge #92 Export as CommonJS module - Merge #119 Use a px text-indent on .pika-prev/next to prevent Firefox bug - Merge #60 Add customizable position option - Add Component package definition ## 1.1.0 - 2013-03-29 - Add Ruby on Rails [gem](https://rubygems.org/gems/pikaday-gem) - Add project configuration files. (jshint and editorconfig) - Add AMD support to pikaday and pikaday.jquery - Fix #52 check if date is valid when moment.js is available - Fix #54 add CSS support for IE8 Notes: - jQuery plugin needs pikaday.js loaded first - See the examples/ dir: - amd.html module loading example - jquery-amd.html module loading the jQuery plugin example - jquery.html jQuery plugin example - moment.html moment.js library example ## 1.0.0 - 2013-03-15 - Fix issue #41 (minDate does not include the specified date) - Add Bower package definition ## 0.0.2 - 2012-10-10 - jQuery plugin version ## 0.0.1 - 2012-10-08 - Basic documentation written - GitHub repository is ready to go… Pikaday-1.8.2/CNAME000066400000000000000000000000141374434711300136540ustar00rootroot00000000000000pikaday.com Pikaday-1.8.2/LICENSE000077500000000000000000000046101374434711300141240ustar00rootroot00000000000000Copyright (c) 2014 David Bushell BSD & MIT license The MIT License (MIT) Copyright (c) 2014 David Bushell 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. The BSD License Copyright (c) 2014 David Bushell All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Pikaday-1.8.2/README.md000077500000000000000000000425621374434711300144060ustar00rootroot00000000000000Pikaday ======== [![NPM version][npm-image]][npm-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] ### A refreshing JavaScript Datepicker * Lightweight (less than 5kb minified and gzipped) * No dependencies (but plays well with [Moment.js][moment]) * Modular CSS classes for easy styling [**Try Pikaday Demo →**][Pikaday] ![Pikaday Screenshot][screenshot] **Production ready?** Since version 1.0.0 Pikaday is stable and used in production. If you do however find bugs or have feature requests please submit them to the [GitHub issue tracker][issues]. Also see the [changelog](CHANGELOG.md) ## Installation You can install Pikaday as an NPM package: ```shell npm install pikaday ``` Or link directly to the CDN: ```html ``` ## Styles You will also need to include Pikaday CSS file. This step depends on how Pikaday was installed. Either import from NPM: ```css @import './node_modules/pikaday/css/pikaday.css'; ``` Or link to the CDN: ```html ``` ## Usage **Pikaday** can be bound to an input field: ```html ``` Add the JavaScript to the end of your document: ```html ``` If you're using **jQuery** make sure to pass only the first element: ```javascript var picker = new Pikaday({ field: $('#datepicker')[0] }); ``` If the Pikaday instance is not bound to a field you can append the element anywhere: ```javascript var field = document.getElementById('datepicker'); var picker = new Pikaday({ onSelect: function(date) { field.value = picker.toString(); } }); field.parentNode.insertBefore(picker.el, field.nextSibling); ``` ### Formatting By default, dates are formatted and parsed using standard JavaScript Date object. If [Moment.js][moment] is available in scope, it will be used to format and parse input values. You can pass an additional `format` option to the configuration which will be passed to the `moment` constructor. See the [moment.js example][] for a full version. ```html ``` For more advanced and flexible formatting you can pass your own `toString` function to the configuration which will be used to format the date object. This function has the following signature: `toString(date, format = 'YYYY-MM-DD')` You should return a string from it. Be careful, though. If the formatted string that you return cannot be correctly parsed by the `Date.parse` method (or by `moment` if it is available), then you must provide your own `parse` function in the config. This function will be passed the formatted string and the format: `parse(dateString, format = 'YYYY-MM-DD')` ```javascript var picker = new Pikaday({ field: document.getElementById('datepicker'), format: 'D/M/YYYY', toString(date, format) { // you should do formatting based on the passed format, // but we will just return 'D/M/YYYY' for simplicity const day = date.getDate(); const month = date.getMonth() + 1; const year = date.getFullYear(); return `${day}/${month}/${year}`; }, parse(dateString, format) { // dateString is the result of `toString` method const parts = dateString.split('/'); const day = parseInt(parts[0], 10); const month = parseInt(parts[1], 10) - 1; const year = parseInt(parts[2], 10); return new Date(year, month, day); } }); ``` ### Configuration As the examples demonstrate above Pikaday has many useful options: * `field` bind the datepicker to a form field * `trigger` use a different element to trigger opening the datepicker, see [trigger example][] (default to `field`) * `bound` automatically show/hide the datepicker on `field` focus (default `true` if `field` is set) * `ariaLabel` data-attribute on the input field with an aria assistance text (only applied when `bound` is set) * `position` preferred position of the datepicker relative to the form field, e.g.: `top right`, `bottom right` **Note:** automatic adjustment may occur to avoid datepicker from being displayed outside the viewport, see [positions example][] (default to 'bottom left') * `reposition` can be set to false to not reposition datepicker within the viewport, forcing it to take the configured `position` (default: true) * `container` DOM node to render calendar into, see [container example][] (default: undefined) * `format` the default output format for `.toString()` and `field` value (requires [Moment.js][moment] for custom formatting) * `formatStrict` the default flag for moment's strict date parsing (requires [Moment.js][moment] for custom formatting) * `toString(date, format)` function which will be used for custom formatting. This function will take precedence over `moment`. * `parse(dateString, format)` function which will be used for parsing input string and getting a date object from it. This function will take precedence over `moment`. * `defaultDate` the initial date to view when first opened * `setDefaultDate` Boolean (true/false). make the `defaultDate` the initial selected value * `firstDay` first day of the week (0: Sunday, 1: Monday, etc) * `minDate` the minimum/earliest date that can be selected (this should be a native Date object - e.g. `new Date()` or `moment().toDate()`) * `maxDate` the maximum/latest date that can be selected (this should be a native Date object - e.g. `new Date()` or `moment().toDate()`) * `disableWeekends` disallow selection of Saturdays or Sundays * `disableDayFn` callback function that gets passed a Date object for each day in view. Should return true to disable selection of that day. * `yearRange` number of years either side (e.g. `10`) or array of upper/lower range (e.g. `[1900,2015]`) * `showWeekNumber` show the ISO week number at the head of the row (default `false`) * `pickWholeWeek` select a whole week instead of a day (default `false`) * `isRTL` reverse the calendar for right-to-left languages * `i18n` language defaults for month and weekday names (see internationalization below) * `yearSuffix` additional text to append to the year in the title * `showMonthAfterYear` render the month after year in the title (default `false`) * `showDaysInNextAndPreviousMonths` render days of the calendar grid that fall in the next or previous months (default: false) * `enableSelectionDaysInNextAndPreviousMonths` allows user to select date that is in the next or previous months (default: false) * `numberOfMonths` number of visible calendars * `mainCalendar` when `numberOfMonths` is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`). Only used for the first display or when a selected date is not already visible * `events` array of dates that you would like to differentiate from regular days (e.g. `['Sat Jun 28 2017', 'Sun Jun 29 2017', 'Tue Jul 01 2017',]`) * `theme` define a classname that can be used as a hook for styling different themes, see [theme example][] (default `null`) * `blurFieldOnSelect` defines if the field is blurred when a date is selected (default `true`) * `onSelect` callback function for when a date is selected * `onOpen` callback function for when the picker becomes visible * `onClose` callback function for when the picker is hidden * `onDraw` callback function for when the picker draws a new month * `keyboardInput` enable keyboard input support (default `true`) ### Styling If the `reposition` configuration-option is enabled (default), Pikaday will apply CSS-classes to the datepicker according to how it is positioned: * `top-aligned` * `left-aligned` * `right-aligned` * `bottom-aligned` Note that the DOM element at any time will typically have 2 CSS-classes (eg. `top-aligned right-aligned` etc). ## jQuery Plugin The normal version of Pikaday does not require jQuery, however there is a jQuery plugin if that floats your boat (see `plugins/pikaday.jquery.js` in the repository). This version requires jQuery, naturally, and can be used like other plugins: See the [jQuery example][] for a full version. ```html ``` ## AMD support If you use a modular script loader, Pikaday is not bound to the global object and will fit nicely in your build process. You can require Pikaday just like any other module. See the [AMD example][] for a full version. ```javascript require(['pikaday'], function(Pikaday) { var picker = new Pikaday({ field: document.getElementById('datepicker') }); }); ``` The same applies for the jQuery plugin mentioned above. See the [jQuery AMD example][] for a full version. ```javascript require(['jquery', 'pikaday.jquery'], function($) { $('#datepicker').pikaday(); }); ``` ## CommonJS module support If you use a CommonJS compatible environment you can use the require function to import Pikaday. ```javascript var pikaday = require('pikaday'); ``` When you bundle all your required modules with [Browserify][browserify] and you don't use [Moment.js][moment] specify the ignore option: `browserify main.js -o bundle.js -i moment` ## Ruby on Rails If you're using **Ruby on Rails**, make sure to check out the [Pikaday gem][gem]. ## Methods You can control the date picker after creation: ```javascript var picker = new Pikaday({ field: document.getElementById('datepicker') }); ``` ### Get and set date `picker.toString('YYYY-MM-DD')` Returns the selected date in a string format. If [Moment.js][moment] exists (recommended) then Pikaday can return any format that Moment understands. You can also provide your own `toString` function and do the formatting yourself. Read more in the [formatting](#formatting) section. If neither `moment` object exists nor `toString` function is provided, JavaScript's default [`.toDateString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) method will be used. `picker.getDate()` Returns a basic JavaScript `Date` object of the selected day, or `null` if no selection. `picker.setDate('2015-01-01')` Set the current selection. This will be restricted within the bounds of `minDate` and `maxDate` options if they're specified. You can optionally pass a boolean as the second parameter to prevent triggering of the onSelect callback (true), allowing the date to be set silently. `picker.getMoment()` Returns a [Moment.js][moment] object for the selected date (Moment must be loaded before Pikaday). `picker.setMoment(moment('14th February 2014', 'DDo MMMM YYYY'))` Set the current selection with a [Moment.js][moment] object (see `setDate` for details). ### Clear and reset date `picker.clear()` Will clear and reset the input where picker is bound to. ### Change current view `picker.gotoDate(new Date(2014, 1))` Change the current view to see a specific date. This example will jump to February 2014 ([month is a zero-based index][mdn_date]). `picker.gotoToday()` Shortcut for `picker.gotoDate(new Date())` `picker.gotoMonth(2)` Change the current view by month (0: January, 1: Februrary, etc). `picker.nextMonth()` `picker.prevMonth()` Go to the next or previous month (this will change year if necessary). `picker.gotoYear()` Change the year being viewed. `picker.setMinDate()` Update the minimum/earliest date that can be selected. `picker.setMaxDate()` Update the maximum/latest date that can be selected. `picker.setStartRange()` Update the range start date. For using two Pikaday instances to select a date range. `picker.setEndRange()` Update the range end date. For using two Pikaday instances to select a date range. ### Show and hide datepicker `picker.isVisible()` Returns `true` or `false`. `picker.show()` Make the picker visible. `picker.adjustPosition()` Recalculate and change the position of the picker. `picker.hide()` Hide the picker making it invisible. `picker.destroy()` Hide the picker and remove all event listeners — no going back! ### Internationalization The default `i18n` configuration format looks like this: ```javascript i18n: { previousMonth : 'Previous Month', nextMonth : 'Next Month', months : ['January','February','March','April','May','June','July','August','September','October','November','December'], weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] } ``` You must provide 12 months and 7 weekdays (with abbreviations). Always specify weekdays in this order with Sunday first. You can change the `firstDay` option to reorder if necessary (0: Sunday, 1: Monday, etc). You can also set `isRTL` to `true` for languages that are read right-to-left. ## Extensions ### Timepicker Pikaday is a pure datepicker. It will not support picking a time of day. However, there have been efforts to add time support to Pikaday. See [#1][issue1] and [#18][issue18]. These reside in their own fork. You can use the work [@owenmead][owenmead] did most recently at [owenmead/Pikaday][owen Pika] A more simple time selection approach done by [@xeeali][xeeali] at [xeeali/Pikaday][xeeali Pika] is based on version 1.2.0. Also [@stas][stas] has a fork [stas/Pikaday][stas Pika], but is now quite old ## Browser Compatibility * IE 7+ * Chrome 8+ * Firefox 3.5+ * Safari 3+ * Opera 10.6+ [![browser compatibility](https://ci.testling.com/rikkert/pikaday.png) ](https://ci.testling.com/rikkert/pikaday) * * * ## Authors * David Bushell [https://dbushell.com][Bushell] [@dbushell][Bushell Twitter] * Ramiro Rikkert [GitHub][Rikkert] [@RamRik][Rikkert Twitter] Thanks to [@shoogledesigns][shoogledesigns] for the name. Copyright © 2014 David Bushell | BSD & MIT license [Pikaday]: https://pikaday.com/ "Pikaday" [moment]: http://momentjs.com/ "moment.js" [browserify]: http://browserify.org/ "browserify" [screenshot]: https://raw.github.com/Pikaday/Pikaday/master/examples/screenshot.png "Screenshot" [issues]: https://github.com/Pikaday/Pikaday/issues "Issue tracker" [gem]: https://rubygems.org/gems/pikaday-gem "RoR gem" [mdn_date]: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date "Date" [Bushell]: https://dbushell.com/ "dbushell.com" [Bushell Twitter]: https://twitter.com/dbushell "@dbushell" [Rikkert]: https://github.com/rikkert "Rikkert GitHub" [Rikkert Twitter]: https://twitter.com/ramrik "@ramrik" [shoogledesigns]: https://twitter.com/shoogledesigns/status/255209384261586944 "@shoogledesigns" [issue1]: https://github.com/Pikaday/Pikaday/issues/1 "Issue 1" [issue18]: https://github.com/Pikaday/Pikaday/issues/18 "Issue 18" [stas]: https://github.com/stas "@stas" [stas Pika]: https://github.com/stas/Pikaday "Pikaday" [owenmead]: https://github.com/owenmead "@owenmead" [owen Pika]: https://github.com/owenmead/Pikaday "Pikaday" [xeeali]: https://github.com/xeeali "@xeeali" [xeeali Pika]: https://github.com/xeeali/Pikaday "Pikaday" [moment.js example]: https://pikaday.com/examples/moment.html "Pikaday w/ moment.js" [jQuery example]: https://pikaday.com/examples/jquery.html "Pikaday w/ jQuery" [AMD example]: https://pikaday.com/examples/amd.html "Pikaday w/ AMD" [jQuery AMD example]: https://pikaday.com/examples/jquery-amd.html "Pikaday w/ jQuery + AMD" [trigger example]: https://pikaday.com/examples/trigger.html "Pikaday using custom trigger" [positions example]: https://pikaday.com/examples/positions.html "Pikaday using different position options" [container example]: https://pikaday.com/examples/container.html "Pikaday using custom calendar container" [theme example]: https://pikaday.com/examples/theme.html "Pikaday using multiple themes" [npm-image]: https://img.shields.io/npm/v/pikaday.svg?style=flat-square [npm-url]: https://npmjs.org/package/pikaday [license-image]: https://img.shields.io/:license-mit-blue.svg?style=flat-square [license-url]: LICENSE.md [downloads-image]: http://img.shields.io/npm/dm/pikaday.svg?style=flat-square [downloads-url]: https://npmjs.org/package/pikaday Pikaday-1.8.2/bower.json000077500000000000000000000010421374434711300151240ustar00rootroot00000000000000{ "name": "pikaday", "description": "A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS", "keywords": [ "datepicker", "calendar", "date" ], "main": [ "./pikaday.js", "./css/pikaday.css" ], "dependencies": {}, "ignore": [ "**/.*", "node_modules", "components", "examples", "tests" ], "license" : [ "0BSD", "MIT" ], "homepage": "https://pikaday.com", "repository": { "type": "git", "url": "https://github.com/Pikaday/Pikaday.git" } } Pikaday-1.8.2/component.json000077500000000000000000000006251374434711300160160ustar00rootroot00000000000000{ "name": "pikaday", "repo": "dbushell/Pikaday", "description": "A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS", "version": "1.8.2", "keywords": [ "datepicker", "calendar", "date" ], "main": "pikaday.js", "scripts": ["pikaday.js"], "styles": ["css/pikaday.css"], "dependencies": {}, "demo": "https://pikaday.com", "license": "MIT" } Pikaday-1.8.2/css/000077500000000000000000000000001374434711300137035ustar00rootroot00000000000000Pikaday-1.8.2/css/pikaday.css000077500000000000000000000105041374434711300160420ustar00rootroot00000000000000@charset "UTF-8"; /*! * Pikaday * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/ */ .pika-single { z-index: 9999; display: block; position: relative; color: #333; background: #fff; border: 1px solid #ccc; border-bottom-color: #bbb; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } /* clear child float (pika-lendar), using the famous micro clearfix hack http://nicolasgallagher.com/micro-clearfix-hack/ */ .pika-single:before, .pika-single:after { content: " "; display: table; } .pika-single:after { clear: both } .pika-single.is-hidden { display: none; } .pika-single.is-bound { position: absolute; box-shadow: 0 5px 15px -5px rgba(0,0,0,.5); } .pika-lendar { float: left; width: 240px; margin: 8px; } .pika-title { position: relative; text-align: center; } .pika-label { display: inline-block; position: relative; z-index: 9999; overflow: hidden; margin: 0; padding: 5px 3px; font-size: 14px; line-height: 20px; font-weight: bold; background-color: #fff; } .pika-title select { cursor: pointer; position: absolute; z-index: 9998; margin: 0; left: 0; top: 5px; opacity: 0; } .pika-prev, .pika-next { display: block; cursor: pointer; position: relative; outline: none; border: 0; padding: 0; width: 20px; height: 30px; /* hide text using text-indent trick, using width value (it's enough) */ text-indent: 20px; white-space: nowrap; overflow: hidden; background-color: transparent; background-position: center center; background-repeat: no-repeat; background-size: 75% 75%; opacity: .5; } .pika-prev:hover, .pika-next:hover { opacity: 1; } .pika-prev, .is-rtl .pika-next { float: left; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg=='); } .pika-next, .is-rtl .pika-prev { float: right; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII='); } .pika-prev.is-disabled, .pika-next.is-disabled { cursor: default; opacity: .2; } .pika-select { display: inline-block; } .pika-table { width: 100%; border-collapse: collapse; border-spacing: 0; border: 0; } .pika-table th, .pika-table td { width: 14.285714285714286%; padding: 0; } .pika-table th { color: #999; font-size: 12px; line-height: 25px; font-weight: bold; text-align: center; } .pika-button { cursor: pointer; display: block; box-sizing: border-box; -moz-box-sizing: border-box; outline: none; border: 0; margin: 0; width: 100%; padding: 5px; color: #666; font-size: 12px; line-height: 15px; text-align: right; background: #f5f5f5; height: initial; } .pika-week { font-size: 11px; color: #999; } .is-today .pika-button { color: #33aaff; font-weight: bold; } .is-selected .pika-button, .has-event .pika-button { color: #fff; font-weight: bold; background: #33aaff; box-shadow: inset 0 1px 3px #178fe5; border-radius: 3px; } .has-event .pika-button { background: #005da9; box-shadow: inset 0 1px 3px #0076c9; } .is-disabled .pika-button, .is-inrange .pika-button { background: #D5E9F7; } .is-startrange .pika-button { color: #fff; background: #6CB31D; box-shadow: none; border-radius: 3px; } .is-endrange .pika-button { color: #fff; background: #33aaff; box-shadow: none; border-radius: 3px; } .is-disabled .pika-button { pointer-events: none; cursor: default; color: #999; opacity: .3; } .is-outside-current-month .pika-button { color: #999; opacity: .3; } .is-selection-disabled { pointer-events: none; cursor: default; } .pika-button:hover, .pika-row.pick-whole-week:hover .pika-button { color: #fff; background: #ff8000; box-shadow: none; border-radius: 3px; } /* styling for abbr */ .pika-table abbr { border-bottom: none; cursor: help; } Pikaday-1.8.2/css/site.css000077500000000000000000000014061374434711300153650ustar00rootroot00000000000000html { margin: 0; padding: 0; } body { font-size: 100%; margin: 0; padding: 1.75em; font-family: 'Helvetica Neue', Arial, sans-serif; } h1 { font-size: 1.75em; margin: 0 0 0.6em 0; } h2 { font-size: 1.25em; margin: 0 0 0.6em 0; } a { color: #2996cc; } a:hover { text-decoration: none; } p { line-height: 1.5em; } .small { color: #666; font-size: 0.875em; } .large { font-size: 1.25em; } label { font-weight: bold; } input[type="text"] { margin: 0.5em 0 3em 0; padding: 0.5em; } button#datepicker-button { margin-bottom: 3em; } .flow-element { display: inline-block; margin-right: 3em; vertical-align: top; } .flow-element:last-child { margin-right: 0; } .flow-element input { margin-top: 0; } #container { min-height: 15em; }Pikaday-1.8.2/css/theme.css000077500000000000000000000024701374434711300155250ustar00rootroot00000000000000/** * This theme is an example to show how you can create your own. */ .pika-single.dark-theme { color: #fff; background: #333; border: 1px solid #666; border-bottom-color: #999; } .dark-theme .pika-label { background-color: #333; } .dark-theme .pika-prev, .dark-theme .is-rtl .pika-next { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAQAAACGG/bgAAAAQ0lEQVR4Ae3KIQ4AIBTD0N0/IeHGI3UIRA3ut/Zl+ltXc5++htVAmIAwAWECwgSEKbgthEoIlRAqIVRCqINQB9nDgQd7ktwFo6UpWQAAAABJRU5ErkJggg=='); } .dark-theme .pika-next, .dark-theme .is-rtl .pika-prev { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAQAAACGG/bgAAAAP0lEQVQ4y+3TMQoAMAgEwfwfAvvjTZ1uGzuvHhBPPGczEG+FRqqRaqQaqUaqkX6QBmmjacvQ6qEVTjsh+xizebvlaWptGXZAAAAAAElFTkSuQmCC'); } .dark-theme .pika-table th { color: #999; } .dark-theme .pika-button { color: #fff; background: #222; } .dark-theme .pika-week { color: #999; } .dark-theme .is-today .pika-button { color: #33aaff; } .dark-theme .is-selected .pika-button { color: #fff; background: #33aaff; box-shadow: inset 0 1px 3px #178fe5; } .dark-theme .is-disabled .pika-button { color: #999; opacity: .3; } .dark-theme .pika-button:hover { color: #fff !important; background: #ff8000 !important; } Pikaday-1.8.2/css/triangle.css000077500000000000000000000002241374434711300162230ustar00rootroot00000000000000/** * This theme is an example to show how you can add triangles to the dropdowns. */ .triangle-theme .pika-label:after { content:" \25be"; } Pikaday-1.8.2/examples/000077500000000000000000000000001374434711300147315ustar00rootroot00000000000000Pikaday-1.8.2/examples/amd.html000077500000000000000000000035651374434711300163740ustar00rootroot00000000000000 Pikaday - AMD example Fork me on GitHub

Pikaday - AMD example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/aria-label.html000077500000000000000000000032401374434711300176120ustar00rootroot00000000000000 Pikaday - custom trigger element example Fork me on GitHub

Pikaday - custom trigger example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/bound-container.html000077500000000000000000000036041374434711300207140ustar00rootroot00000000000000 Pikaday - Container example Fork me on GitHub

Pikaday - Container example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/calendars.html000077500000000000000000000040051374434711300175550ustar00rootroot00000000000000 Pikaday - ranges example Fork me on GitHub

Pikaday

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


2 months
3 months, main aligned to right

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2013 David Bushell | BSD & MIT license | Example by MoOx

Pikaday-1.8.2/examples/container.html000077500000000000000000000036051374434711300176100ustar00rootroot00000000000000 Pikaday - Container example Fork me on GitHub

Pikaday - Container example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/date-fns.html000077500000000000000000000043231374434711300173250ustar00rootroot00000000000000 Pikaday - date-fns example Fork me on GitHub

Pikaday + date-fns

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.



What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/date-range.html000077500000000000000000000052141374434711300176330ustar00rootroot00000000000000 Pikaday - Date Range example

Pikaday - Date Range example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.

Pikaday source on GitHub



What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license

Pikaday-1.8.2/examples/daysInNextMonth.html000077500000000000000000000033631374434711300207230ustar00rootroot00000000000000 Pikaday - showDaysInNextAndPreviousMonths example Fork me on GitHub

Pikaday - show days in next and previous month example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/diableDayFn.html000077500000000000000000000032721374434711300177700ustar00rootroot00000000000000 Pikaday - disableDayFn example Fork me on GitHub

Pikaday - disableDayFn example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/jquery-amd.html000077500000000000000000000041261374434711300177030ustar00rootroot00000000000000 Pikaday - jQuery + AMD example Fork me on GitHub

Pikaday - jQuery + AMD example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/jquery.html000077500000000000000000000035541374434711300171500ustar00rootroot00000000000000 Pikaday - jQuery example Fork me on GitHub

Pikaday - jQuery example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/moment.html000077500000000000000000000037771374434711300171370ustar00rootroot00000000000000 Pikaday - moment.js example Fork me on GitHub

Pikaday + moment.js

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.



What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/pick-whole-week.html000066400000000000000000000034761374434711300206240ustar00rootroot00000000000000 Pikaday - pickWholeWeek example Fork me on GitHub

Pikaday - pickWholeWeek example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Lei Zhao

Pikaday-1.8.2/examples/position-css-classes.html000066400000000000000000000106451374434711300217120ustar00rootroot00000000000000 Pikaday alignment CSS-classes example Fork me on GitHub

Pikaday alignment CSS-classes example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ruben Swieringa

Pikaday-1.8.2/examples/positions.html000077500000000000000000000072651374434711300176630ustar00rootroot00000000000000 Pikaday alignment example Fork me on GitHub

Pikaday alignment example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.



not really (too close from top)
for real this time (same code as above)
not really (too close from right)
Here is the top right position with content before (no automatic adjustment used, same code as above)


Here is the bottom right position with content before (no automatic adjustment used, , same code as above)

Also, take a look to the bottom right of this page to see an example with position automatically adjusted.

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by MoOx

Pikaday-1.8.2/examples/screenshot.png000066400000000000000000000152141374434711300176170ustar00rootroot00000000000000PNG  IHDR$)SIDATx߫t# Ox ꃰ!++€`C)@^Hp4输'{޳Y߇t2Y3k>3kƂ8@{ @$@$ @ @@ 0 @cH H  @ @ H H H @ @H_Y|q Ȉ͐oGYX HNo|\+_!PLd8qݒfOkf$6_YIwAbx r7o\vyׯw$Ɉ׷5$+.djzPG aA4# C6nN_L}7# V8풣P v x< q|R$x:[V vElI<U~@I- f5@TJ* = 10phSOVRi+RszV;^D@޼ySPԁ=XX2*:s§爕eg_*cJTEUZQOj46<=fɘH:V$q 쵋f,bOsEr: mÆ~իW]:,1n߾MTdɋJd54edŤy3mVj}'Y?lC(RKi)~FjZ9F.v -&HtǏׯEI'@,{Ç']V0[yQF'K/ D#݈DtEQ2e$[>$H4 9)N3بgx0N0ɗg56'~M6WHt\oLsG[ Cy ۭmxgot DxASSqF <`hN0nMK~3Z0 <[̍8Wy3XNٝh$Z$fl9+kjzX$5@Esu o`ٚfe M83ZBigZY(D*.ylHw1\hDG %cF=vA" o9iIlsy֤'}-isp2t+./$UmX$Ӑ iJU2oDfl(EBW6`WjȂ^ M+hKE44 Q(h|gvRbU=lT6bzLW,g6yRp$9r&3ቐgl3K(s=A^ K;T@T(Ĵ#iyL yjM]Dz0;L r@b\q#6|-C$r1BBtGL63${Vtj{;0kxrjB,9R0S,=Gq{$luĵU] O:.>/չJW1餋'|iIS*:YySaM00v4JZ>,-ѱfs-$:󈒏Ҋ.#1`^dܢ|4iQ ZleIHYv㴬uVuV?,=!ޗ:\^Q0-C?v  @ @c^68CG]%,}Ћq '`p",t-rQ0-LN)c=g{|wՙٽ]L^V>{ YhFH"H"!Ȇ$CH"! ( (H"3&@ᬑP.@atY?ۭα6^z{yL% A\ ʸ ,q@m;ESF *Q;K\.T%q2eG`"TW$Z*2oR&/\{b_ 9'p?>>>'/n}r#);:@AO.Nsr&/~SP$|P/9]h%9.*kEB 9s0&/t\bH}Ϊ0wPF [Kإ+in޲|tȕH&sُmH>N&)œ$* qcS(jcDj$)흓vG?_Y$N9qVق57Y${>NdNHYƺJڙe暢,PKU{]]kϖn9N꿽Hf^Tn5BF7H$*.@pU쑚+iO+'?JώHDjt ҰB"9$j)4[N&v\ I $QѼKX쑚o, wfUfcuM =XsE\i. 'F $9@_k]**HDҋ KgoOUFUD'&%Y[&XsE"N   9d. Uh1OORTDj$pv`FlK榉zwڨFԄD*i >k3hqpAOҟ[>xLť,:İ޴A9)+a,(t!C+XftFv2j>8|v2!֎ޅH @$H#18:f!m "t6jl*?y#"鏛gjjG~@]7ׯy@6>tqDK@-6C DH @$ е}C(l 9 6ΎEKj~EX"ѵ}2 v:SIboS3QSOdGLɿJ͇SJM U X"ѵ}E&by)"MV0eP$҉z;UG{R:=6W]$z-t ]DjŚDUc=P')|KgR_͕z,JM:AtfEj58$( bɧ4_+VZ+5R?Bj2QŚھ@O\RpxŊIZDmҿΏ4z JM:dADf{EkoA,y)먫'HRouv;R;>n|vJijJM:JMz9D&]Nھ,갾3)4·m"]O&g]x1gw#DbZ G&RS&U?.lHtm,f=e5.B9,.oٯ..fs^Poꍷ,[;z-̕t w&TS&DkP$A s Э)2v4 2 ]ez"ka|8[5bMll!TjPkb'vV!H "A$ Drd{u #EqڞXyIv;v M<(?"A$ H"A$DH"A$8 "ٷeJt"A " mylEkY!Ql Pikaday - Theme example Fork me on GitHub

Pikaday - Theme example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.


No theme
Custom theme
Dropdowns w/ triangles

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/trigger.html000077500000000000000000000033071374434711300172700ustar00rootroot00000000000000 Pikaday - custom trigger element example Fork me on GitHub

Pikaday - custom trigger example

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.



What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/examples/weeknumbers.html000077500000000000000000000032041374434711300201500ustar00rootroot00000000000000 Pikaday - weeknumbers example Fork me on GitHub

Pikaday - showing weeknumbers

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.

What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license | Example by Ramiro Rikkert

Pikaday-1.8.2/index.html000077500000000000000000000025331374434711300151160ustar00rootroot00000000000000 Pikaday

Pikaday

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.

Pikaday source on GitHub


What is this?

Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the GitHub issue tracker, thanks!

Copyright © 2014 David Bushell | BSD & MIT license

Pikaday-1.8.2/package-lock.json000066400000000000000000001133761374434711300163420ustar00rootroot00000000000000{ "name": "pikaday", "version": "1.8.2", "lockfileVersion": 1, "requires": true, "dependencies": { "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" } }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" } }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "binary-extensions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" } }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "chokidar": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.5.0" } }, "cli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", "dev": true, "requires": { "exit": "0.1.2", "glob": "^7.1.1" } }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", "wrap-ansi": "^5.1.0" }, "dependencies": { "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" } } } }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" } }, "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { "date-now": "^0.1.4" } }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, "debug": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { "ms": "2.1.2" } }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "dom-serializer": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "dev": true, "requires": { "domelementtype": "^2.0.1", "entities": "^2.0.0" }, "dependencies": { "domelementtype": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==", "dev": true }, "entities": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", "dev": true } } }, "domelementtype": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", "dev": true }, "domhandler": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", "dev": true, "requires": { "domelementtype": "1" } }, "domutils": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "dev": true, "requires": { "dom-serializer": "0", "domelementtype": "1" } }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", "dev": true }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, "expect.js": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz", "integrity": "sha1-sKWaDS7/VDdUTr8M6qYBWEHQm1s=", "dev": true }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" } }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fsevents": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, "optional": true }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", "dev": true, "requires": { "domelementtype": "1", "domhandler": "2.3", "domutils": "1.5", "entities": "1.0", "readable-stream": "1.1" } }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { "binary-extensions": "^2.0.0" } }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" } }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "js-yaml": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" } }, "jshint": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.12.0.tgz", "integrity": "sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA==", "dev": true, "requires": { "cli": "~1.0.0", "console-browserify": "1.1.x", "exit": "0.1.x", "htmlparser2": "3.8.x", "lodash": "~4.17.19", "minimatch": "~3.0.2", "shelljs": "0.3.x", "strip-json-comments": "1.0.x" } }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { "chalk": "^4.0.0" } }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "mocha": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.0.tgz", "integrity": "sha512-lEWEMq2LMfNJMKeuEwb5UELi+OgFDollXaytR5ggQcHpzG3NP/R7rvixAvF+9/lLsTWhWG+4yD2M70GsM06nxw==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.4.3", "debug": "4.2.0", "diff": "4.0.2", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.1.6", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.14.0", "log-symbols": "4.0.0", "minimatch": "3.0.4", "ms": "2.1.2", "nanoid": "3.1.12", "serialize-javascript": "5.0.1", "strip-json-comments": "3.1.1", "supports-color": "7.2.0", "which": "2.0.2", "wide-align": "1.1.3", "workerpool": "6.0.2", "yargs": "13.3.2", "yargs-parser": "13.1.2", "yargs-unparser": "2.0.0" }, "dependencies": { "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true } } }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "nanoid": { "version": "3.1.12", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", "dev": true }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" } }, "p-limit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", "dev": true, "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" } }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" } }, "readable-stream": { "version": "1.1.14", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "0.0.1", "string_decoder": "~0.10.x" } }, "readdirp": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" } }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "serialize-javascript": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, "requires": { "randombytes": "^2.1.0" } }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "shelljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", "dev": true }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" } }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { "ansi-regex": "^3.0.0" } }, "strip-json-comments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" } }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" } }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { "string-width": "^1.0.2 || 2" } }, "workerpool": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", "dev": true }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", "strip-ansi": "^5.0.0" }, "dependencies": { "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { "color-name": "1.1.3" } }, "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" } } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^13.1.2" }, "dependencies": { "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" } }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" } }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" } } } }, "yargs-parser": { "version": "13.1.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" }, "dependencies": { "camelcase": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz", "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==", "dev": true }, "decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true } } } } } Pikaday-1.8.2/package.json000077500000000000000000000015571374434711300154140ustar00rootroot00000000000000{ "name": "pikaday", "version": "1.8.2", "description": "A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS", "keywords": [ "datepicker", "calendar", "date" ], "homepage": "https://pikaday.com", "bugs": "https://github.com/Pikaday/Pikaday/issues", "license": "(0BSD OR MIT)", "main": "pikaday.js", "repository": { "type": "git", "url": "https://github.com/Pikaday/Pikaday.git" }, "devDependencies": { "expect.js": "^0.3.1", "jshint": "^2.12.0", "mocha": "^8.2.0" }, "testling": { "harness": "mocha", "files": "tests/*.js", "browsers": [ "ie/7..latest", "chrome/latest", "firefox/3.6", "firefox/latest", "safari/latest", "opera/latest" ] }, "scripts": { "test": "testling", "lint": "jshint *.js plugins/*.js tests/*.js" } } Pikaday-1.8.2/pikaday.js000077500000000000000000001230601374434711300151000ustar00rootroot00000000000000/*! * Pikaday * * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday */ (function (root, factory) { 'use strict'; var moment; if (typeof exports === 'object') { // CommonJS module // Load moment.js as an optional dependency try { moment = require('moment'); } catch (e) {} module.exports = factory(moment); } else if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(function (req) { // Load moment.js as an optional dependency var id = 'moment'; try { moment = req(id); } catch (e) {} return factory(moment); }); } else { root.Pikaday = factory(root.moment); } }(this, function (moment) { 'use strict'; /** * feature detection and helper functions */ var hasMoment = typeof moment === 'function', hasEventListeners = !!window.addEventListener, document = window.document, sto = window.setTimeout, addEvent = function(el, e, callback, capture) { if (hasEventListeners) { el.addEventListener(e, callback, !!capture); } else { el.attachEvent('on' + e, callback); } }, removeEvent = function(el, e, callback, capture) { if (hasEventListeners) { el.removeEventListener(e, callback, !!capture); } else { el.detachEvent('on' + e, callback); } }, trim = function(str) { return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,''); }, hasClass = function(el, cn) { return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1; }, addClass = function(el, cn) { if (!hasClass(el, cn)) { el.className = (el.className === '') ? cn : el.className + ' ' + cn; } }, removeClass = function(el, cn) { el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' ')); }, isArray = function(obj) { return (/Array/).test(Object.prototype.toString.call(obj)); }, isDate = function(obj) { return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime()); }, isWeekend = function(date) { var day = date.getDay(); return day === 0 || day === 6; }, isLeapYear = function(year) { // solution lifted from date.js (MIT license): https://github.com/datejs/Datejs return ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0); }, getDaysInMonth = function(year, month) { return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, setToStartOfDay = function(date) { if (isDate(date)) date.setHours(0,0,0,0); }, compareDates = function(a,b) { // weak date comparison (use setToStartOfDay(date) to ensure correct result) return a.getTime() === b.getTime(); }, extend = function(to, from, overwrite) { var prop, hasProp; for (prop in from) { hasProp = to[prop] !== undefined; if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) { if (isDate(from[prop])) { if (overwrite) { to[prop] = new Date(from[prop].getTime()); } } else if (isArray(from[prop])) { if (overwrite) { to[prop] = from[prop].slice(0); } } else { to[prop] = extend({}, from[prop], overwrite); } } else if (overwrite || !hasProp) { to[prop] = from[prop]; } } return to; }, fireEvent = function(el, eventName, data) { var ev; if (document.createEvent) { ev = document.createEvent('HTMLEvents'); ev.initEvent(eventName, true, false); ev = extend(ev, data); el.dispatchEvent(ev); } else if (document.createEventObject) { ev = document.createEventObject(); ev = extend(ev, data); el.fireEvent('on' + eventName, ev); } }, adjustCalendar = function(calendar) { if (calendar.month < 0) { calendar.year -= Math.ceil(Math.abs(calendar.month)/12); calendar.month += 12; } if (calendar.month > 11) { calendar.year += Math.floor(Math.abs(calendar.month)/12); calendar.month -= 12; } return calendar; }, /** * defaults and localisation */ defaults = { // bind the picker to a form field field: null, // automatically show/hide the picker on `field` focus (default `true` if `field` is set) bound: undefined, // data-attribute on the input field with an aria assistance text (only applied when `bound` is set) ariaLabel: 'Use the arrow keys to pick a date', // position of the datepicker, relative to the field (default to bottom & left) // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position) position: 'bottom left', // automatically fit in the viewport even if it means repositioning from the position option reposition: true, // the default output format for `.toString()` and `field` value format: 'YYYY-MM-DD', // the toString function which gets passed a current date object and format // and returns a string toString: null, // used to create date object from current input string parse: null, // the initial date to view when first opened defaultDate: null, // make the `defaultDate` the initial selected value setDefaultDate: false, // first day of week (0: Sunday, 1: Monday etc) firstDay: 0, // minimum number of days in the week that gets week number one // default ISO 8601, week 01 is the week with the first Thursday (4) firstWeekOfYearMinDays: 4, // the default flag for moment's strict date parsing formatStrict: false, // the minimum/earliest date that can be selected minDate: null, // the maximum/latest date that can be selected maxDate: null, // number of years either side, or array of upper/lower range yearRange: 10, // show week numbers at head of row showWeekNumber: false, // Week picker mode pickWholeWeek: false, // used internally (don't config outside) minYear: 0, maxYear: 9999, minMonth: undefined, maxMonth: undefined, startRange: null, endRange: null, isRTL: false, // Additional text to append to the year in the calendar title yearSuffix: '', // Render the month after year in the calendar title showMonthAfterYear: false, // Render days of the calendar grid that fall in the next or previous month showDaysInNextAndPreviousMonths: false, // Allows user to select days that fall in the next or previous month enableSelectionDaysInNextAndPreviousMonths: false, // how many months are visible numberOfMonths: 1, // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`) // only used for the first display or when a selected date is not visible mainCalendar: 'left', // Specify a DOM element to render the calendar in container: undefined, // Blur field when date is selected blurFieldOnSelect : true, // internationalization i18n: { previousMonth : 'Previous Month', nextMonth : 'Next Month', months : ['January','February','March','April','May','June','July','August','September','October','November','December'], weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] }, // Theme Classname theme: null, // events array events: [], // callback function onSelect: null, onOpen: null, onClose: null, onDraw: null, // Enable keyboard input keyboardInput: true }, /** * templating functions to abstract HTML rendering */ renderDayName = function(opts, day, abbr) { day += opts.firstDay; while (day >= 7) { day -= 7; } return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day]; }, renderDay = function(opts) { var arr = []; var ariaSelected = 'false'; if (opts.isEmpty) { if (opts.showDaysInNextAndPreviousMonths) { arr.push('is-outside-current-month'); if(!opts.enableSelectionDaysInNextAndPreviousMonths) { arr.push('is-selection-disabled'); } } else { return ''; } } if (opts.isDisabled) { arr.push('is-disabled'); } if (opts.isToday) { arr.push('is-today'); } if (opts.isSelected) { arr.push('is-selected'); ariaSelected = 'true'; } if (opts.hasEvent) { arr.push('has-event'); } if (opts.isInRange) { arr.push('is-inrange'); } if (opts.isStartRange) { arr.push('is-startrange'); } if (opts.isEndRange) { arr.push('is-endrange'); } return '' + '' + ''; }, isoWeek = function(date, firstWeekOfYearMinDays) { // Ensure we're at the start of the day. date.setHours(0, 0, 0, 0); // Thursday in current week decides the year because January 4th // is always in the first week according to ISO8601. var yearDay = date.getDate(), weekDay = date.getDay(), dayInFirstWeek = firstWeekOfYearMinDays, dayShift = dayInFirstWeek - 1, // counting starts at 0 daysPerWeek = 7, prevWeekDay = function(day) { return (day + daysPerWeek - 1) % daysPerWeek; }; // Adjust to Thursday in week 1 and count number of weeks from date to week 1. date.setDate(yearDay + dayShift - prevWeekDay(weekDay)); var jan4th = new Date(date.getFullYear(), 0, dayInFirstWeek), msPerDay = 24 * 60 * 60 * 1000, daysBetween = (date.getTime() - jan4th.getTime()) / msPerDay, weekNum = 1 + Math.round((daysBetween - dayShift + prevWeekDay(jan4th.getDay())) / daysPerWeek); return weekNum; }, renderWeek = function (d, m, y, firstWeekOfYearMinDays) { var date = new Date(y, m, d), week = hasMoment ? moment(date).isoWeek() : isoWeek(date, firstWeekOfYearMinDays); return '' + week + ''; }, renderRow = function(days, isRTL, pickWholeWeek, isRowSelected) { return '' + (isRTL ? days.reverse() : days).join('') + ''; }, renderBody = function(rows) { return '' + rows.join('') + ''; }, renderHead = function(opts) { var i, arr = []; if (opts.showWeekNumber) { arr.push(''); } for (i = 0; i < 7; i++) { arr.push('' + renderDayName(opts, i, true) + ''); } return '' + (opts.isRTL ? arr.reverse() : arr).join('') + ''; }, renderTitle = function(instance, c, year, month, refYear, randId) { var i, j, arr, opts = instance._o, isMinYear = year === opts.minYear, isMaxYear = year === opts.maxYear, html = '
', monthHtml, yearHtml, prev = true, next = true; for (arr = [], i = 0; i < 12; i++) { arr.push(''); } monthHtml = '
' + opts.i18n.months[month] + '
'; if (isArray(opts.yearRange)) { i = opts.yearRange[0]; j = opts.yearRange[1] + 1; } else { i = year - opts.yearRange; j = 1 + year + opts.yearRange; } for (arr = []; i < j && i <= opts.maxYear; i++) { if (i >= opts.minYear) { arr.push(''); } } yearHtml = '
' + year + opts.yearSuffix + '
'; if (opts.showMonthAfterYear) { html += yearHtml + monthHtml; } else { html += monthHtml + yearHtml; } if (isMinYear && (month === 0 || opts.minMonth >= month)) { prev = false; } if (isMaxYear && (month === 11 || opts.maxMonth <= month)) { next = false; } if (c === 0) { html += ''; } if (c === (instance._o.numberOfMonths - 1) ) { html += ''; } return html += '
'; }, renderTable = function(opts, data, randId) { return '' + renderHead(opts) + renderBody(data) + '
'; }, /** * Pikaday constructor */ Pikaday = function(options) { var self = this, opts = self.config(options); self._onMouseDown = function(e) { if (!self._v) { return; } e = e || window.event; var target = e.target || e.srcElement; if (!target) { return; } if (!hasClass(target, 'is-disabled')) { if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) { self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day'))); if (opts.bound) { sto(function() { self.hide(); if (opts.blurFieldOnSelect && opts.field) { opts.field.blur(); } }, 100); } } else if (hasClass(target, 'pika-prev')) { self.prevMonth(); } else if (hasClass(target, 'pika-next')) { self.nextMonth(); } } if (!hasClass(target, 'pika-select')) { // if this is touch event prevent mouse events emulation if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; return false; } } else { self._c = true; } }; self._onChange = function(e) { e = e || window.event; var target = e.target || e.srcElement; if (!target) { return; } if (hasClass(target, 'pika-select-month')) { self.gotoMonth(target.value); } else if (hasClass(target, 'pika-select-year')) { self.gotoYear(target.value); } }; self._onKeyChange = function(e) { e = e || window.event; if (self.isVisible()) { switch(e.keyCode){ case 13: case 27: if (opts.field) { opts.field.blur(); } break; case 37: self.adjustDate('subtract', 1); break; case 38: self.adjustDate('subtract', 7); break; case 39: self.adjustDate('add', 1); break; case 40: self.adjustDate('add', 7); break; case 8: case 46: self.setDate(null); break; } } }; self._parseFieldValue = function() { if (opts.parse) { return opts.parse(opts.field.value, opts.format); } else if (hasMoment) { var date = moment(opts.field.value, opts.format, opts.formatStrict); return (date && date.isValid()) ? date.toDate() : null; } else { return new Date(Date.parse(opts.field.value)); } }; self._onInputChange = function(e) { var date; if (e.firedBy === self) { return; } date = self._parseFieldValue(); if (isDate(date)) { self.setDate(date); } if (!self._v) { self.show(); } }; self._onInputFocus = function() { self.show(); }; self._onInputClick = function() { self.show(); }; self._onInputBlur = function() { // IE allows pika div to gain focus; catch blur the input field var pEl = document.activeElement; do { if (hasClass(pEl, 'pika-single')) { return; } } while ((pEl = pEl.parentNode)); if (!self._c) { self._b = sto(function() { self.hide(); }, 50); } self._c = false; }; self._onClick = function(e) { e = e || window.event; var target = e.target || e.srcElement, pEl = target; if (!target) { return; } if (!hasEventListeners && hasClass(target, 'pika-select')) { if (!target.onchange) { target.setAttribute('onchange', 'return;'); addEvent(target, 'change', self._onChange); } } do { if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) { return; } } while ((pEl = pEl.parentNode)); if (self._v && target !== opts.trigger && pEl !== opts.trigger) { self.hide(); } }; self.el = document.createElement('div'); self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : ''); addEvent(self.el, 'mousedown', self._onMouseDown, true); addEvent(self.el, 'touchend', self._onMouseDown, true); addEvent(self.el, 'change', self._onChange); if (opts.keyboardInput) { addEvent(document, 'keydown', self._onKeyChange); } if (opts.field) { if (opts.container) { opts.container.appendChild(self.el); } else if (opts.bound) { document.body.appendChild(self.el); } else { opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling); } addEvent(opts.field, 'change', self._onInputChange); if (!opts.defaultDate) { opts.defaultDate = self._parseFieldValue(); opts.setDefaultDate = true; } } var defDate = opts.defaultDate; if (isDate(defDate)) { if (opts.setDefaultDate) { self.setDate(defDate, true); } else { self.gotoDate(defDate); } } else { self.gotoDate(new Date()); } if (opts.bound) { this.hide(); self.el.className += ' is-bound'; addEvent(opts.trigger, 'click', self._onInputClick); addEvent(opts.trigger, 'focus', self._onInputFocus); addEvent(opts.trigger, 'blur', self._onInputBlur); } else { this.show(); } }; /** * public Pikaday API */ Pikaday.prototype = { /** * configure functionality */ config: function(options) { if (!this._o) { this._o = extend({}, defaults, true); } var opts = extend(this._o, options, true); opts.isRTL = !!opts.isRTL; opts.field = (opts.field && opts.field.nodeName) ? opts.field : null; opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null; opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field); opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field; opts.disableWeekends = !!opts.disableWeekends; opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null; var nom = parseInt(opts.numberOfMonths, 10) || 1; opts.numberOfMonths = nom > 4 ? 4 : nom; if (!isDate(opts.minDate)) { opts.minDate = false; } if (!isDate(opts.maxDate)) { opts.maxDate = false; } if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) { opts.maxDate = opts.minDate = false; } if (opts.minDate) { this.setMinDate(opts.minDate); } if (opts.maxDate) { this.setMaxDate(opts.maxDate); } if (isArray(opts.yearRange)) { var fallback = new Date().getFullYear() - 10; opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback; opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback; } else { opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange; if (opts.yearRange > 100) { opts.yearRange = 100; } } return opts; }, /** * return a formatted string of the current selection (using Moment.js if available) */ toString: function(format) { format = format || this._o.format; if (!isDate(this._d)) { return ''; } if (this._o.toString) { return this._o.toString(this._d, format); } if (hasMoment) { return moment(this._d).format(format); } return this._d.toDateString(); }, /** * return a Moment.js object of the current selection (if available) */ getMoment: function() { return hasMoment ? moment(this._d) : null; }, /** * set the current selection from a Moment.js object (if available) */ setMoment: function(date, preventOnSelect) { if (hasMoment && moment.isMoment(date)) { this.setDate(date.toDate(), preventOnSelect); } }, /** * return a Date object of the current selection */ getDate: function() { return isDate(this._d) ? new Date(this._d.getTime()) : null; }, /** * set the current selection */ setDate: function(date, preventOnSelect) { if (!date) { this._d = null; if (this._o.field) { this._o.field.value = ''; fireEvent(this._o.field, 'change', { firedBy: this }); } return this.draw(); } if (typeof date === 'string') { date = new Date(Date.parse(date)); } if (!isDate(date)) { return; } var min = this._o.minDate, max = this._o.maxDate; if (isDate(min) && date < min) { date = min; } else if (isDate(max) && date > max) { date = max; } this._d = new Date(date.getTime()); setToStartOfDay(this._d); this.gotoDate(this._d); if (this._o.field) { this._o.field.value = this.toString(); fireEvent(this._o.field, 'change', { firedBy: this }); } if (!preventOnSelect && typeof this._o.onSelect === 'function') { this._o.onSelect.call(this, this.getDate()); } }, /** * clear and reset the date */ clear: function() { this.setDate(null); }, /** * change view to a specific date */ gotoDate: function(date) { var newCalendar = true; if (!isDate(date)) { return; } if (this.calendars) { var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1), lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1), visibleDate = date.getTime(); // get the end of the month lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1); lastVisibleDate.setDate(lastVisibleDate.getDate()-1); newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate); } if (newCalendar) { this.calendars = [{ month: date.getMonth(), year: date.getFullYear() }]; if (this._o.mainCalendar === 'right') { this.calendars[0].month += 1 - this._o.numberOfMonths; } } this.adjustCalendars(); }, adjustDate: function(sign, days) { var day = this.getDate() || new Date(); var difference = parseInt(days)*24*60*60*1000; var newDay; if (sign === 'add') { newDay = new Date(day.valueOf() + difference); } else if (sign === 'subtract') { newDay = new Date(day.valueOf() - difference); } this.setDate(newDay); }, adjustCalendars: function() { this.calendars[0] = adjustCalendar(this.calendars[0]); for (var c = 1; c < this._o.numberOfMonths; c++) { this.calendars[c] = adjustCalendar({ month: this.calendars[0].month + c, year: this.calendars[0].year }); } this.draw(); }, gotoToday: function() { this.gotoDate(new Date()); }, /** * change view to a specific month (zero-index, e.g. 0: January) */ gotoMonth: function(month) { if (!isNaN(month)) { this.calendars[0].month = parseInt(month, 10); this.adjustCalendars(); } }, nextMonth: function() { this.calendars[0].month++; this.adjustCalendars(); }, prevMonth: function() { this.calendars[0].month--; this.adjustCalendars(); }, /** * change view to a specific full year (e.g. "2012") */ gotoYear: function(year) { if (!isNaN(year)) { this.calendars[0].year = parseInt(year, 10); this.adjustCalendars(); } }, /** * change the minDate */ setMinDate: function(value) { if(value instanceof Date) { setToStartOfDay(value); this._o.minDate = value; this._o.minYear = value.getFullYear(); this._o.minMonth = value.getMonth(); } else { this._o.minDate = defaults.minDate; this._o.minYear = defaults.minYear; this._o.minMonth = defaults.minMonth; this._o.startRange = defaults.startRange; } this.draw(); }, /** * change the maxDate */ setMaxDate: function(value) { if(value instanceof Date) { setToStartOfDay(value); this._o.maxDate = value; this._o.maxYear = value.getFullYear(); this._o.maxMonth = value.getMonth(); } else { this._o.maxDate = defaults.maxDate; this._o.maxYear = defaults.maxYear; this._o.maxMonth = defaults.maxMonth; this._o.endRange = defaults.endRange; } this.draw(); }, setStartRange: function(value) { this._o.startRange = value; }, setEndRange: function(value) { this._o.endRange = value; }, /** * refresh the HTML */ draw: function(force) { if (!this._v && !force) { return; } var opts = this._o, minYear = opts.minYear, maxYear = opts.maxYear, minMonth = opts.minMonth, maxMonth = opts.maxMonth, html = '', randId; if (this._y <= minYear) { this._y = minYear; if (!isNaN(minMonth) && this._m < minMonth) { this._m = minMonth; } } if (this._y >= maxYear) { this._y = maxYear; if (!isNaN(maxMonth) && this._m > maxMonth) { this._m = maxMonth; } } for (var c = 0; c < opts.numberOfMonths; c++) { randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2); html += '
' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '
'; } this.el.innerHTML = html; if (opts.bound) { if(opts.field.type !== 'hidden') { sto(function() { opts.trigger.focus(); }, 1); } } if (typeof this._o.onDraw === 'function') { this._o.onDraw(this); } if (opts.bound) { // let the screen reader user know to use arrow keys opts.field.setAttribute('aria-label', opts.ariaLabel); } }, adjustPosition: function() { var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned; if (this._o.container) return; this.el.style.position = 'absolute'; field = this._o.trigger; pEl = field; width = this.el.offsetWidth; height = this.el.offsetHeight; viewportWidth = window.innerWidth || document.documentElement.clientWidth; viewportHeight = window.innerHeight || document.documentElement.clientHeight; scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop; leftAligned = true; bottomAligned = true; if (typeof field.getBoundingClientRect === 'function') { clientRect = field.getBoundingClientRect(); left = clientRect.left + window.pageXOffset; top = clientRect.bottom + window.pageYOffset; } else { left = pEl.offsetLeft; top = pEl.offsetTop + pEl.offsetHeight; while((pEl = pEl.offsetParent)) { left += pEl.offsetLeft; top += pEl.offsetTop; } } // default position is bottom & left if ((this._o.reposition && left + width > viewportWidth) || ( this._o.position.indexOf('right') > -1 && left - width + field.offsetWidth > 0 ) ) { left = left - width + field.offsetWidth; leftAligned = false; } if ((this._o.reposition && top + height > viewportHeight + scrollTop) || ( this._o.position.indexOf('top') > -1 && top - height - field.offsetHeight > 0 ) ) { top = top - height - field.offsetHeight; bottomAligned = false; } this.el.style.left = left + 'px'; this.el.style.top = top + 'px'; addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned'); addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned'); removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned'); removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned'); }, /** * render HTML for a particular month */ render: function(year, month, randId) { var opts = this._o, now = new Date(), days = getDaysInMonth(year, month), before = new Date(year, month, 1).getDay(), data = [], row = []; setToStartOfDay(now); if (opts.firstDay > 0) { before -= opts.firstDay; if (before < 0) { before += 7; } } var previousMonth = month === 0 ? 11 : month - 1, nextMonth = month === 11 ? 0 : month + 1, yearOfPreviousMonth = month === 0 ? year - 1 : year, yearOfNextMonth = month === 11 ? year + 1 : year, daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth); var cells = days + before, after = cells; while(after > 7) { after -= 7; } cells += 7 - after; var isWeekSelected = false; for (var i = 0, r = 0; i < cells; i++) { var day = new Date(year, month, 1 + (i - before)), isSelected = isDate(this._d) ? compareDates(day, this._d) : false, isToday = compareDates(day, now), hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false, isEmpty = i < before || i >= (days + before), dayNumber = 1 + (i - before), monthNumber = month, yearNumber = year, isStartRange = opts.startRange && compareDates(opts.startRange, day), isEndRange = opts.endRange && compareDates(opts.endRange, day), isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange, isDisabled = (opts.minDate && day < opts.minDate) || (opts.maxDate && day > opts.maxDate) || (opts.disableWeekends && isWeekend(day)) || (opts.disableDayFn && opts.disableDayFn(day)); if (isEmpty) { if (i < before) { dayNumber = daysInPreviousMonth + dayNumber; monthNumber = previousMonth; yearNumber = yearOfPreviousMonth; } else { dayNumber = dayNumber - days; monthNumber = nextMonth; yearNumber = yearOfNextMonth; } } var dayConfig = { day: dayNumber, month: monthNumber, year: yearNumber, hasEvent: hasEvent, isSelected: isSelected, isToday: isToday, isDisabled: isDisabled, isEmpty: isEmpty, isStartRange: isStartRange, isEndRange: isEndRange, isInRange: isInRange, showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths, enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths }; if (opts.pickWholeWeek && isSelected) { isWeekSelected = true; } row.push(renderDay(dayConfig)); if (++r === 7) { if (opts.showWeekNumber) { row.unshift(renderWeek(i - before, month, year, opts.firstWeekOfYearMinDays)); } data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected)); row = []; r = 0; isWeekSelected = false; } } return renderTable(opts, data, randId); }, isVisible: function() { return this._v; }, show: function() { if (!this.isVisible()) { this._v = true; this.draw(); removeClass(this.el, 'is-hidden'); if (this._o.bound) { addEvent(document, 'click', this._onClick); this.adjustPosition(); } if (typeof this._o.onOpen === 'function') { this._o.onOpen.call(this); } } }, hide: function() { var v = this._v; if (v !== false) { if (this._o.bound) { removeEvent(document, 'click', this._onClick); } if (!this._o.container) { this.el.style.position = 'static'; // reset this.el.style.left = 'auto'; this.el.style.top = 'auto'; } addClass(this.el, 'is-hidden'); this._v = false; if (v !== undefined && typeof this._o.onClose === 'function') { this._o.onClose.call(this); } } }, /** * GAME OVER */ destroy: function() { var opts = this._o; this.hide(); removeEvent(this.el, 'mousedown', this._onMouseDown, true); removeEvent(this.el, 'touchend', this._onMouseDown, true); removeEvent(this.el, 'change', this._onChange); if (opts.keyboardInput) { removeEvent(document, 'keydown', this._onKeyChange); } if (opts.field) { removeEvent(opts.field, 'change', this._onInputChange); if (opts.bound) { removeEvent(opts.trigger, 'click', this._onInputClick); removeEvent(opts.trigger, 'focus', this._onInputFocus); removeEvent(opts.trigger, 'blur', this._onInputBlur); } } if (this.el.parentNode) { this.el.parentNode.removeChild(this.el); } } }; return Pikaday; })); Pikaday-1.8.2/plugins/000077500000000000000000000000001374434711300145745ustar00rootroot00000000000000Pikaday-1.8.2/plugins/pikaday.jquery.js000077500000000000000000000027731374434711300201060ustar00rootroot00000000000000/*! * Pikaday jQuery plugin. * * Copyright © 2013 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday */ (function (root, factory) { 'use strict'; if (typeof exports === 'object') { // CommonJS module factory(require('jquery'), require('pikaday')); } else if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery', 'pikaday'], factory); } else { // Browser globals factory(root.jQuery, root.Pikaday); } }(this, function ($, Pikaday) { 'use strict'; $.fn.pikaday = function() { var args = arguments; if (!args || !args.length) { args = [{ }]; } return this.each(function() { var self = $(this), plugin = self.data('pikaday'); if (!(plugin instanceof Pikaday)) { if (typeof args[0] === 'object') { var options = $.extend({}, args[0]); options.field = self[0]; self.data('pikaday', new Pikaday(options)); } } else { if (typeof args[0] === 'string' && typeof plugin[args[0]] === 'function') { plugin[args[0]].apply(plugin, Array.prototype.slice.call(args,1)); if (args[0] === 'destroy') { self.removeData('pikaday'); } } } }); }; })); Pikaday-1.8.2/scss/000077500000000000000000000000001374434711300140665ustar00rootroot00000000000000Pikaday-1.8.2/scss/pikaday.scss000077500000000000000000000134371374434711300164200ustar00rootroot00000000000000/*! * Pikaday * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/ */ // Variables // Declare any of these variables before importing this SCSS file to easily override defaults // Variables are namespaced with the pd (pikaday) prefix // Colours $pd-text-color: #333 !default; $pd-title-color: #333 !default; $pd-title-bg: #fff !default; $pd-picker-bg: #fff !default; $pd-picker-border: #ccc !default; $pd-picker-border-bottom: #bbb !default; $pd-picker-shadow: rgba(0,0,0,.5) !default; $pd-th-color: #999 !default; $pd-day-color: #666 !default; $pd-day-bg: #f5f5f5 !default; $pd-day-hover-color: #fff !default; $pd-day-hover-bg: #ff8000 !default; $pd-day-today-color: #33aaff !default; $pd-day-selected-color: #fff !default; $pd-day-selected-bg: #33aaff !default; $pd-day-selected-shadow: #178fe5 !default; $pd-day-disabled-color: #999 !default; $pd-week-color: #999 !default; $pd-inrange-color: #666 !default; $pd-inrange-bg: #D5E9F7 !default; $pd-startrange-color: #fff !default; $pd-startrange-bg: #6CB31D !default; $pd-endrange-color: #fff !default; $pd-endrange-bg: #33aaff !default; $pd-event-color: #fff !default; $pd-event-bg: #33aaff !default; $pd-z-index: 9999 !default; $pd-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default; $pd-border-radius: 3px !default; .pika-single { z-index: $pd-z-index; display: block; position: relative; color: $pd-text-color; background: $pd-picker-bg; border: 1px solid $pd-picker-border; border-bottom-color: $pd-picker-border-bottom; font-family: $pd-font-family; &.is-hidden { display: none; } &.is-bound { position: absolute; box-shadow: 0 5px 15px -5px $pd-picker-shadow; } } // clear child float (pika-lendar), using the famous micro clearfix hack // http://nicolasgallagher.com/micro-clearfix-hack/ .pika-single { &:before, &:after { content: " "; display: table; } &:after { clear: both } } .pika-lendar { float: left; width: 240px; margin: 8px; } .pika-title { position: relative; text-align: center; select { cursor: pointer; position: absolute; z-index: $pd-z-index - 1; margin: 0; left: 0; top: 5px; opacity: 0; } } .pika-label { display: inline-block; position: relative; z-index: $pd-z-index; overflow: hidden; margin: 0; padding: 5px 3px; font-size: 14px; line-height: 20px; font-weight: bold; color: $pd-title-color; background-color: $pd-title-bg; } .pika-prev, .pika-next { display: block; cursor: pointer; position: relative; outline: none; border: 0; padding: 0; width: 20px; height: 30px; text-indent: 20px; // hide text using text-indent trick, using width value (it's enough) white-space: nowrap; overflow: hidden; background-color: transparent; background-position: center center; background-repeat: no-repeat; background-size: 75% 75%; opacity: .5; &:hover { opacity: 1; } &.is-disabled { cursor: default; opacity: .2; } } .pika-prev, .is-rtl .pika-next { float: left; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg=='); } .pika-next, .is-rtl .pika-prev { float: right; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII='); } .pika-select { display: inline-block; } .pika-table { width: 100%; border-collapse: collapse; border-spacing: 0; border: 0; th, td { width: 14.285714285714286%; padding: 0; } th { color: $pd-th-color; font-size: 12px; line-height: 25px; font-weight: bold; text-align: center; } abbr { border-bottom: none; cursor: help; } } .pika-button { cursor: pointer; display: block; -moz-box-sizing: border-box; box-sizing: border-box; outline: none; border: 0; margin: 0; width: 100%; padding: 5px; color: $pd-day-color; font-size: 12px; line-height: 15px; text-align: right; background: $pd-day-bg; height: initial; .has-event & { color: $pd-event-color; background: $pd-event-bg; } .is-today & { color: $pd-day-today-color; font-weight: bold; } .is-selected & { color: $pd-day-selected-color; font-weight: bold; background: $pd-day-selected-bg; box-shadow: inset 0 1px 3px $pd-day-selected-shadow; border-radius: $pd-border-radius; } .is-disabled &, .is-outside-current-month & { color: $pd-day-disabled-color; opacity: .3; } .is-disabled & { pointer-events: none; cursor: default; } &:hover { color: $pd-day-hover-color; background: $pd-day-hover-bg; box-shadow: none; border-radius: $pd-border-radius; } .is-selection-disabled { pointer-events: none; cursor: default; } } .pika-week { font-size: 11px; color: $pd-week-color; } .is-inrange .pika-button { color: $pd-inrange-color; background: $pd-inrange-bg; } .is-startrange .pika-button { color: $pd-startrange-color; background: $pd-startrange-bg; box-shadow: none; border-radius: $pd-border-radius; } .is-endrange .pika-button { color: $pd-endrange-color; background: $pd-endrange-bg; box-shadow: none; border-radius: $pd-border-radius; } Pikaday-1.8.2/tests/000077500000000000000000000000001374434711300142555ustar00rootroot00000000000000Pikaday-1.8.2/tests/methods.js000077500000000000000000000111461374434711300162640ustar00rootroot00000000000000var Pikaday = require('../'), expect = require('expect.js'); describe('Pikaday public method', function () { 'use strict'; describe('#getDate()', function() { it('should return null if date not set', function() { expect(new Pikaday().getDate()).to.be(null); }); }); describe('#toString()', function () { it('should return empty string when date not set', function () { var pikaday = new Pikaday(); expect(pikaday.toString()).to.be.empty; }); it('should return date string, formatted by moment, when date is set', function() { var date = new Date(2014, 3, 25), pikaday = new Pikaday({ format: 'DD-MM-YY' }); pikaday.setDate(date); expect(pikaday.toString()).to.eql('25-04-14'); }); it('should use toString function if one is provided', function () { var date = new Date(2014, 3, 25), pikaday = new Pikaday({ toString: function(d) { var date = d.getDate(); var month = d.getMonth() + 1; return 'custom: ' + date + '/' + month; } }); pikaday.setDate(date); expect(pikaday.toString()).to.eql('custom: 25/4'); }); it('should pass current format option to the toString function', function () { var date = new Date(2014, 3, 25); var expectedFormat = 'DD/MM/YYYY'; var passedFormat; var pikaday = new Pikaday({ format: expectedFormat, toString: function(d, format) { passedFormat = format; return ''; } }); pikaday.setDate(date); pikaday.toString(); // invoke toString to set the passedFormat variable expect(passedFormat).to.eql(expectedFormat); }); it('should use parse function if one is provided', function () { var expectedDate = new Date(2017, 3, 6); var pikaday = new Pikaday({ parse: function() { return new Date(2017, 3, 6); } }); // mock input field pikaday._o.field = { value: '', setAttribute: function() {}, dispatchEvent: function() {}, }; pikaday._onInputChange({}); expect(pikaday.getDate().getTime()).to.eql(expectedDate.getTime()); }); it('should pass input value and current format to the parse function', function () { var expectedValue = 'test value'; var expectedFormat = 'DD/MM/YYYY'; var passedValue; var passedFormat; var pikaday = new Pikaday({ format: expectedFormat, parse: function(value, format) { passedValue = value; passedFormat = format; return new Date(2017, 3, 6); } }); // mock input field pikaday._o.field = { value: expectedValue, setAttribute: function() {}, dispatchEvent: function() {}, }; pikaday._onInputChange({}); expect(passedValue).to.eql(expectedValue); expect(passedFormat).to.eql(expectedFormat); }); }); describe('When specifying minDate option in Constructor', function () { it('Should remove the time portion (flattening to midnight)', function () { var date = new Date(2015, 1, 17, 22, 10, 5), expected = new Date(2015, 1, 17, 0, 0, 0), pikaday = new Pikaday({ minDate: date }); expect(pikaday._o.minDate).to.eql(expected); }); }); describe('#setMinDate()', function () { it('should flatten date to midnight ignoring time portion (consistent with minDate option in ctor)', function () { var date = new Date(2015, 1, 17, 22, 10, 5), expected = new Date(2015, 1, 17, 0, 0, 0), pikaday = new Pikaday(); pikaday.setMinDate(date); expect(pikaday._o.minDate).to.eql(expected); }); }); describe('#render()', function() { it('starts with the correct week number according to ISO8601', function() { var pikaday = new Pikaday({showWeekNumber: true}); expect(pikaday.render(2016, 0)).to.contain('53'); }); }); }); Pikaday-1.8.2/tests/module.js000077500000000000000000000010351374434711300161020ustar00rootroot00000000000000var Pikaday = require('../'), expect = require('expect.js'); describe('Pikaday', function () { 'use strict'; it('should expose as a CommonJS module', function () { expect(Pikaday).to.be.a('function'); }); it('should NOT leak to the global object', function () { expect(window).to.not.have.property('Pikaday'); }); it('should be possible to create a new instance', function () { expect(function () { new Pikaday(); }).to.not.throwException(); }); });