Repository: uxsolutions/bootstrap-datepicker Branch: master Commit: 722dc29432e8 Files: 174 Total size: 619.6 KB Directory structure: gitextract_uke3yxr5/ ├── .editorconfig ├── .github/ │ ├── ISSUE_TEMPLATE.md │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ └── ci.yaml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── bower.json ├── build/ │ ├── build.less │ ├── build3.less │ ├── build_standalone.less │ └── build_standalone3.less ├── composer.json ├── dist/ │ ├── css/ │ │ ├── bootstrap-datepicker.css │ │ ├── bootstrap-datepicker.standalone.css │ │ ├── bootstrap-datepicker3.css │ │ └── bootstrap-datepicker3.standalone.css │ └── js/ │ └── bootstrap-datepicker.js ├── docs/ │ ├── Makefile │ ├── README.md │ ├── _screenshots/ │ │ ├── assets/ │ │ │ ├── common.css │ │ │ └── common.js │ │ ├── demo_head.html │ │ ├── markup_component.html │ │ ├── markup_daterange.html │ │ ├── markup_inline.html │ │ ├── markup_input.html │ │ ├── option_calendarweeks.html │ │ ├── option_clearbtn.html │ │ ├── option_daysofweekdisabled.html │ │ ├── option_enddate.html │ │ ├── option_language.html │ │ ├── option_multidate.html │ │ ├── option_showweekdays.html │ │ ├── option_startdate.html │ │ ├── option_todaybtn.html │ │ ├── option_todayhighlight.html │ │ └── option_weekstart.html │ ├── conf.py │ ├── events.rst │ ├── i18n.rst │ ├── index.rst │ ├── keyboard.rst │ ├── make.bat │ ├── markup.rst │ ├── methods.rst │ ├── options.rst │ ├── requirements.txt │ └── screenshots.js ├── grunt/ │ └── .jshintrc ├── js/ │ ├── .jscsrc │ ├── .jshintrc │ ├── bootstrap-datepicker.js │ └── locales/ │ ├── bootstrap-datepicker-en-CA.js │ ├── bootstrap-datepicker.ar-DZ.js │ ├── bootstrap-datepicker.ar-tn.js │ ├── bootstrap-datepicker.ar.js │ ├── bootstrap-datepicker.az.js │ ├── bootstrap-datepicker.bg.js │ ├── bootstrap-datepicker.bm.js │ ├── bootstrap-datepicker.bn.js │ ├── bootstrap-datepicker.br.js │ ├── bootstrap-datepicker.bs.js │ ├── bootstrap-datepicker.ca.js │ ├── bootstrap-datepicker.cs.js │ ├── bootstrap-datepicker.cy.js │ ├── bootstrap-datepicker.da.js │ ├── bootstrap-datepicker.de.js │ ├── bootstrap-datepicker.el.js │ ├── bootstrap-datepicker.en-AU.js │ ├── bootstrap-datepicker.en-CA.js │ ├── bootstrap-datepicker.en-GB.js │ ├── bootstrap-datepicker.en-IE.js │ ├── bootstrap-datepicker.en-NZ.js │ ├── bootstrap-datepicker.en-US.js │ ├── bootstrap-datepicker.en-ZA.js │ ├── bootstrap-datepicker.eo.js │ ├── bootstrap-datepicker.es.js │ ├── bootstrap-datepicker.et.js │ ├── bootstrap-datepicker.eu.js │ ├── bootstrap-datepicker.fa.js │ ├── bootstrap-datepicker.fi.js │ ├── bootstrap-datepicker.fo.js │ ├── bootstrap-datepicker.fr-CH.js │ ├── bootstrap-datepicker.fr.js │ ├── bootstrap-datepicker.gl.js │ ├── bootstrap-datepicker.he.js │ ├── bootstrap-datepicker.hi.js │ ├── bootstrap-datepicker.hr.js │ ├── bootstrap-datepicker.hu.js │ ├── bootstrap-datepicker.hy.js │ ├── bootstrap-datepicker.id.js │ ├── bootstrap-datepicker.is.js │ ├── bootstrap-datepicker.it-CH.js │ ├── bootstrap-datepicker.it.js │ ├── bootstrap-datepicker.ja.js │ ├── bootstrap-datepicker.ka.js │ ├── bootstrap-datepicker.kh.js │ ├── bootstrap-datepicker.kk.js │ ├── bootstrap-datepicker.km.js │ ├── bootstrap-datepicker.ko.js │ ├── bootstrap-datepicker.kr.js │ ├── bootstrap-datepicker.lt.js │ ├── bootstrap-datepicker.lv.js │ ├── bootstrap-datepicker.me.js │ ├── bootstrap-datepicker.mk.js │ ├── bootstrap-datepicker.mn.js │ ├── bootstrap-datepicker.mr.js │ ├── bootstrap-datepicker.ms.js │ ├── bootstrap-datepicker.nl-BE.js │ ├── bootstrap-datepicker.nl.js │ ├── bootstrap-datepicker.no.js │ ├── bootstrap-datepicker.oc.js │ ├── bootstrap-datepicker.pl.js │ ├── bootstrap-datepicker.pt-BR.js │ ├── bootstrap-datepicker.pt.js │ ├── bootstrap-datepicker.ro.js │ ├── bootstrap-datepicker.rs-latin.js │ ├── bootstrap-datepicker.rs.js │ ├── bootstrap-datepicker.ru.js │ ├── bootstrap-datepicker.si.js │ ├── bootstrap-datepicker.sk.js │ ├── bootstrap-datepicker.sl.js │ ├── bootstrap-datepicker.sq.js │ ├── bootstrap-datepicker.sr-latin.js │ ├── bootstrap-datepicker.sr.js │ ├── bootstrap-datepicker.sv.js │ ├── bootstrap-datepicker.sw.js │ ├── bootstrap-datepicker.ta.js │ ├── bootstrap-datepicker.tg.js │ ├── bootstrap-datepicker.th.js │ ├── bootstrap-datepicker.tk.js │ ├── bootstrap-datepicker.tr.js │ ├── bootstrap-datepicker.uk.js │ ├── bootstrap-datepicker.uz-cyrl.js │ ├── bootstrap-datepicker.uz-latn.js │ ├── bootstrap-datepicker.vi.js │ ├── bootstrap-datepicker.zh-CN.js │ └── bootstrap-datepicker.zh-TW.js ├── less/ │ ├── .csslintrc │ ├── datepicker.less │ └── datepicker3.less ├── package.json └── tests/ ├── README.md ├── assets/ │ ├── coverage.js │ ├── mock.js │ ├── qunit-logging.js │ ├── qunit.css │ ├── qunit.js │ └── utils.js ├── suites/ │ ├── calendar-weeks.js │ ├── component.js │ ├── data-api.js │ ├── events.js │ ├── formats.js │ ├── inline.js │ ├── keyboard_navigation/ │ │ ├── 2011.js │ │ ├── 2012.js │ │ └── all.js │ ├── methods.js │ ├── methods_jquery.js │ ├── mouse_navigation/ │ │ ├── 2011.js │ │ ├── 2012.js │ │ └── all.js │ ├── noconflict.js │ ├── options.js │ ├── timezone.js │ └── touch_navigation/ │ └── all.js ├── tests.html └── timezone.html ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome: https://editorconfig.org root = true [*] charset = utf-8 end_of_line = lf indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ ### Expected behaviour Tell us what should happen. ### Actual behaviour Tell us what happens instead. ### Datepicker version used ex. 1.6.1. ### Example code Jsfiddle example to reproduce the problem. ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ | Q | A | --------------- | --- | Bug fix? | no|yes | New feature? | no|yes | BC breaks? | no|yes | Related tickets | fixes #X, partially #Y, mentioned in #Z | License | MIT ================================================ FILE: .github/workflows/ci.yaml ================================================ name: CI on: [push, pull_request] jobs: test: name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - name: Install grunt run: yarn global add grunt-cli - name: Install dependencies run: yarn - name: Run tests run: yarn test ================================================ FILE: .gitignore ================================================ docs/_build *-dist.zip # OS or Editor folders .DS_Store .idea # Folders to ignore bower_components node_modules ================================================ FILE: CHANGELOG.md ================================================ Changelog ========= 1.9.0 ----- ## Features * Added clearDates for clears range (#2114) ## Bugfix * Hide today button when before start or after end date (#2474) * Fix navigation buttons states (#2277) * Fix updateNavArrows bug (#2230) ## Locales ### Bugfix * Added monthsTitle to Latvian locale (#2255) * Rename en-CA locale file to match the rest of the files (#2217) * Fix cs locale date format (#2275) * Added translation for months (fixing the default 'en' locale) (#2271) 1.7.1 ----- ## Bugfixes * Revert "move `jquery` to `peerDependencies` from `dependencies`" 1.7.0 ----- ## Features * Adding dateCells option (#1723) * Added keepEmptyValues option (#1558 + #1901) * added "changeViewMode" event; also adds the current `viewMode` to events (#1953) * adds `updateViewDate` option (#1982) * Added hiding week day names functionality (#2087) * Allow customizing day cell value (#2043) ## Bugfixes * originalEvent object needs preventDefault fn (#1824) * Fix jQuery selector from premature selection of span element in inline/embedded calendar's month selection (#1859 + #1886) * Use date arithmetic to allow dates with times other than 00:00:00 (#1483) * Multiple general fixes (#1883 + #1893) * Visibility fix for nav arrows (#1916) * Do not trigger change or changeDate on initialization (#1912) * Fix: Close datepicker on touchstart (#1924) * Fix data-date-dates-disabled attribute to accept a comma-separated list (#1946) * Fix maxViewMode and navigation switch click (#1951) * Add support jQuery 3. Bootstrap 2 still available (composer.json) (#1958) * fix(parseDate) use insensitive regex to support +15d with capslock (#1910) * Refactoring timedelta aliases (dateAliases) (#1965) * Fix RTL layout (#1973) * Remove listen `changeDate` after destroy DateRangePicker (#1968) * add tests for setDatesDisabled function (#1983) * resolves bug on days when DST is added. (#2009) * XHTML fixes (#1998) * update grunt and other dev-dependencies (#2111) * Use display:table-cell instead of display:block for today, clear and title (#2121) * moved assumeNearbyYear to correct location (#2140) * move `jquery` to `peerDependencies` from `dependencies` (#2163) * Use default arrow values (#2176) ## Locales ### New * en-ZA (#1798) * en-ZNZ (#1799) * en-IE (#1800) * ar-tn (#1863) * Added Sinhala (si) locale (#2025) * Occitan locale (#2024 + #2026) * [l10n]Add breton translation (#2028) * Added Tajik language (#2117) * Add Uzbek latin and cyrill locales (#2152) * add Bengali (Bangla) language (#2171) * Added Hindi locale (#2199) ### Bugfix * km/kh (#1812) * Capital letters in Polish translation (#1890) * Add missing monthsTitle in cs (#1900) * Update bootstrap-datepicker.da.js (#1936) * Fix typo in month name (#2040) * Added missing basque language properties (#2066) * Added weekStart to slovenian translation (#2067) * add monthsTitle for ru (#2092) * Change danish (da) date format to match the rest of the locales (#2048) * Fix Tamil Language file with proper locale code (#2141) * Revert strange changes, +monthsTitle (#2153) * updated Tajik (cyrillic) translation file (#2167) * Romanian uses dd/mm/yyyy format for dates (#2173) * Missing latvian translation (#2204) ## Docs * Fix typo in index.rst (#1882) * Update CDNjs info in README.md (#1933) * [Doc] Keyboard navigation is not supported for embedded / inline type (#2002) * Removed reference to stefan petre (#2031) * Improve defaultViewDate documentation (#2052) * Add notes about multiple dates and examples for update method (#2060) * Add Code Of Conduct (#2095) * Update install instructions on README.md (#2160) 1.6.2 - 1.6.3 - 1.6.4 --------------------- Bugfix * Backported jquery 3 fix from #1958 1.6.1 ----- Bugfixes * add specific class for disabled dates back (Fixes #1785) * [fix] Allow keyboard navigation for non-input fields (Fixes: #874) * fix kazakh mothShort * Fix bug when clicking on a day that is highlighted today in the next month * dates read out are 12am UTC * Fix show by component (with disabled attribute) 1.6.0 ----- Features * Changes nonpunctuation to accept unicode characters * Add "assumeNearbyYear" option * Decade and century picking * Added timedelta aliases. (Fixes #785) * add getter methods for date limits * Replace arrow entities for glyphicon + template + libs snippets (Fixes: #610 #833 #1007) * added class .disabled to dow header * Rename "remove" to "destroy" and create alias Bugfix * Month/year view keyboard navigation * fix changeMonth, changeYear not triggered when selecting day from prev/next month * Fix default arrows for BS2 and screenshots (for docs) * Extend beforeShowMonth event functionality to work like beforeShowDay and beforeShowYear Locale changes * Correct date format for ko locale * Add en-AU (Australian English) locale Repository * Add CSS sourcemap * [BS3 Less] Remove unused variables and cleanup * Added timezone aware tests * remove .idea-folder from npm 1.5.1 ----- Bugfixes * Fix calculation for new position when datepicker goes offscreen when inside a container (Fixes: #1619) * Fix datepicker title not centered when displaying calendar weeks (Fixes: #1625) * Fixing looping when calling dp inside change event (Fixes: #1628) * Add scrollTop to position if container is not body (Fixes: #1616) * Use document scrollTop instead of body scrollTop when using the body container * Fix focus for disabled week days (Fixes: #1365, #1187, #1648) * Fixes enableOnReadOnly bug when datepicker is of type component Translations * Added missing translations for slovak translation. (Fixes: #1521) * Added missing date format for norwegian (nb) locale (Fixes #1690) * Armenian translation short names * adding Today translation, default date format for the lithuanian translation Docs * Document data-api on container * Added docs for the different stylesheet files. (Fixes #1459) Repository * Enable travis container builds for faster builds 1.5.0 ----- Features * Added down key as datepicker show trigger * immediateUpdates option (updates input when a year or month is selected) * Highlight days of week * maxViewMode option * Include "main" property in package.json * Require.js support. (Fixes: #280) * Allow overriding `$.fn.show` and `$.fn.hide` (Fixes: #1424) * Adding border-radius variable for LESS (Fixes: #1429) * Add support for dropdown border variables * Add the posibility to have a title on the picker (Fixes: #1410) * Implement `beforeShowYear` (Fixes: #1226) * Add commonjs support * Trigger 'hide' event when clicking outside datepicker * Add css-classes for range-start and range-end * Update hover effect for "buttons" (matches Bootstrap 3.3.5 mixin) * Custom formatting options Bugfixes: * Scrolling on mobile device closes datepicker * Use $.on() instead $.bind() * Fixed right-click and edit-menu paste * Ported prototype fix for Prototype Compability * Fixed issue with startview year * Fixed padding inconsistency with twitter bootstrap 3 * prevents the click event from bubbling to any user defined click handlers * Added padding for .datepicker-dropdown * Fixes the issue with a date change firing mulitple change events * removed hard dependency on bootstrap (because of twbs-sass package) * Clearing the date should reset to defaultViewDate * Datepicker orientation mix up - top = bottom and bottom = top * Fix cursor thead styles * Fix date-reset issue when navigating to next with invalid date * Using orientation:auto but date picker still appears above, cut off, when there plenty of space below. * lots of orientation fixes Locale changes: * Remove unused eighth element on week arrays ) * Add Esperanto translation * Better Polish language date shortcuts translation and default date format * lowercase danish translation * Add Mongolian localization * update Hungarian translation Docs: * added day to end-date to avoid confusion about example * added setDatesDisabled method to documentation 1.4.0 ----- Features: * implemented beforeShowMonth option * Added option to disable touch keyboard input * All datepicker methods are chainable * Added a datesDisable option * Added option to prevent date picker to show when input field receives focus * adding option to define the container the datepicker will be appended to * Backported some placement fixes for the container option * Option default view date * Add toggleActive option * Added clear method * Added version property to datepicker object * Added option to not show datepicker on readonly field Bugfixes: * Removed blank space before the previous button when calendarWeeks is true; * Fixed date deselection with single date picker * Added case-neutral matching for text months * Changed input-daterange to full width for bs3 * Fix placement for RTL languages * fix for range picker when next date is before previous date * Fix for moving box on first selection * Do not show datepicker for readonly inputs * Fix getUTCDate when datepicker has no selected date * Only a linked today button should trigger the changeDate event * Fixed bug with keyboard navigation when startdate/enddate was defined * Right align calendar on right window edge conflict * On "ENTER" keydown on picker, prevent the closest form to be submitted too * fixed bower.json twitte bootstrap dependency * Replaced named entities with decimal entities * assigning plugin to a local variable to fix bug in noConflict Repo changes: * Added empty ignore option in bower.json. * Added .editorconfig * Reworked grunt tasks Translations: * Fix translation of French months * Update cambodia translations * added clear and weekStart to turkish translation * Days/months should start lowercase in dutch * Month/daynames should be lowercase in french * Add 'clear' and 'format' to Ukrainian locale * Added Montenegrin locale Docs: * added example for inputs option * added missing documentation for embedded mode * Add additional documentaion to update method 1.3.1 ----- Repo changes: * Automated screenshots have been added to the docs. These probably need to be documented so that contributors can add them when appropriate. * Grunt support * Missing description and keywords for Packagist * Composer: Include translation files into deployment dir * Add package name and version to npm package.json Bugfixes: * Remove font-family declaration for datepicker * Don't deselect date unless datepicker is multidate * Removed comment from compiled CSS. * Don't clear input after typing date and hitting Enter when keyboard nav is disabled * Fixing the ui displaying 'undefined nan' when typing dates in Firefox & IE * Reset tooltip to a default empty value * Fix colspan if calendarWeeks & clearBtn are true * Removed fixed width and height in large and small group addon * z-index calculation should not stop at first element * Fix IE8 bug with Array#splice with one argument Documentation: * ghpages: jQuery js not being loaded when using HTTPS * Adds clearBtn option to sandbox page * Minor fixes (typo's, links,...) Locale changes Updated languages: * Clear translation in czech * Dutch translation * Swedish translation * Japanese translation * Ukrainian translation fixes * Add spanish clear, week start and format * Added galician clear, week start and format * Added missing clear localization value for polish translation * Add clear zh-CN translation * Fixed Albanian translation typo's * Add missing clear and format localization value for Russian translation * Updated Serbian translation * Fixed Ukrainian iso code to uk instead of ua * Updated greek translation * Update Catalan and Spanish localizations * Added missing armenian translations New languages: * Basque * Khmer (Cambodia) * Bosnian * British english * Armenian * Faroese * Swiss Italian and Swiss French 1.3.0 ----- New features: * Bootstrap 3 support. Added build files `build/build_standalone3.less` and `build/build3.less`, and source files `less/datepicker3.less` and `css/datepicker3.css` (built from `build_standalone3.less`). * Multi-date functionality. This required rethinking several areas of the picker: * The internals have been modified to be completely multidate-centric. * Attributes and methods availabel on events have changed, but the old attributes and functions will still work. * Keyboard navigation has been revamped, as it didn't work at all properly with multidate selection. * The picker now explicitly supports "no selected date". Non-API changes: * Keyboard navigation has been changed. See `docs/keyboard.rst`. * Empty pickers in a range picker setup will be populated with the first date selected by the user to make finding the next date easier. Bug squashed: * Jan 1, 1970 is now highlighted when selected * `touchstart` added to document-bound picker-closing events (alongside `mousedown`) * Fixed a display bug with component add-on icons being vertically higher than they should have been. * Input is refocused after clicking the picker. * `changeDate` event is triggered when `setDate` is called. Locale changes: * Added Ukrainian, Belgium-Dutch, Welsh, Galician, Vietnamese, and Azerbaijani * `clear` for German, Danish, Italian, and Romanian * Fixed `weekStart` and `format` for Norwegian * `weekStart` and `format` for Georgian * Tweaks for Latvian, French, Vietnamese, Swedish, and Croatian * De-duplicated Ukrainian files from `uk` and `ua` to just `ua` Repository changes: * Documentation has been moved from the base `README.md` file to the `docs/` folder, and been re-written to use sphinx docs. The docs are now viewable online at https://bootstrap-datepicker.readthedocs.org/. The [gh-pages](https://uxsolutions.github.io/bootstrap-datepicker/) branch has been reduced to the sandbox demo. * Changed the js file header to point at repo/demo/docs urls instead of eyecon.ro * The css files are now the output of the standalone build scripts instead of `build/build.less` etc. * `composer.json` now supports component-installer * Added [JSHint](https://www.jshint.com/docs/) and [JSCS](https://github.com/mdevils/node-jscs) configurations 1.2.0 ----- New features: * Google Closure Compiler Compatibility * Smart orientation by default, and explicit picker orientation with the `orientation` option * Text inside the picker is no longer user-selectable * Packagist/Composer support (I think...) * No longer depends on glyphicons for arrows * `clearDate` event added, fired when the date is cleared Bug squashed: * `noConflict` fixed * Fix for large years causing an infinite loop in date parsing * Fixed cases where `changeYear` and `changeMonth` events were not being triggered * `component.js` moved to `bower.js` * Falsey values for `startDate` and `endDate` translate to `-Infinity` and `Infinity`, respectively (effectively, falsey values mean "no bounds") * Fixed `autoclose` for non-input, non-component elements * Fixed 50% param in `mix()` less function -- expands compatibility with less compilers * Fixed `update` method to update the selected date * `beforeShowDay` was getting UTC dates, now it gets local dates (all dates that developers are given should be in local time, not UTC). * `startDate` and `endDate` were a bit confused when given `new Date()` -- they would not allow today to be selected (the range should be inclusive), they would change whether it was selectable based on local time, etc. These quirks should be fixed now. They both also now expect local dates (which will then be time-zeroed and converted to UTC). * Fixed selected date not being automatically constrained to the specified range when `setStartDate` and `setEndDate` were called. * No longer uses jQuery's `.size()` (deprecated in favor of `.length`) * `changeDate` triggered during manual user input * `change` event fired when input value changed, it wasn't in some cases Locale changes: * Added Arabic, Norwegian, Georgian * `clear` for French * `today` and `clear` for Bahasa * `today` and `clear` for Portuguese (both `pt` and `pt-BR`) * `format` for Turkish * `format` and `weekStart` for Swedish * `format` and `weekStart` for Simplified Chinese; `today`, `format`, and `weekStart` for Traditional Chinese * Fixed typo in Serbian latin (`rs-latin`) * More appropriate use of Traditional Chinese habit in `zh-TW` 1.1.3 ---------- Clicking the clear button now triggers the input's `change` and datepicker's `changeDate` events. Fixed a bug that broke the event-attached `format` function. 1.1.2 ---------- Botched release, no change from 1.1.1 1.1.1 ---------- Fixes a bug when setting startDate or endDate during initialization. 1.1.0 ---------- New features: * Date range picker. * Data API / noConflict. * `getDate` and `setDate` methods. * `format` method for events; this allows you to easily format the `date` associated with the event. * New options: * `beforeShowDay` option: a dev-provided function that can enable/disable dates, add css classes, and add tooltips. * `clearBtn`, a button for resetting the picker. Internal changes: * Cleaner and more reliable method for extracting options from all potential sources (defaults, locale overrides, data-attrs, and instantiation options, in that order). This also populates `$.fn.datepicker.defaults` with the default values, and uses this hash as the actual source of defaults, meaning you can globally change the default value for a given option. Bugs squashed: * Resolved a conflict with bootstrap's native `.switch` class. * Fixed a bug with components where they would be stuck with a stale value when editing the value manually. * The `date` attributes on events are now local dates instead of internal UTC dates. * Separate `Date` objects for internal selected and view date references. * Clicking multiple times inside inputs no longer hides the picker. Minor improvements: * Better text color for highlighted "today" date. * Last year in decade view now marked as "new" instead of "old". * Formats now properly handle trailing separators. Locale changes: * Added Albanian, Estonian, and Macedonian * Added `weekStart` for Russian * Added `weekStart` and `format` for Finnish Potentially backward-incompatible changes: * Options revamp: * This fixes bugs in the correlation of some data-attrs to their associated option names. If you use `data-date-weekstart`, `data-date-startdate`, or `data-date-enddate`, you should update these to `data-date-week-start`, `data-date-start-date`, or `data-date-end-date`, respectively. * All options for datepicker are now properties on the datepicker's `o` property; options are no longer stored on the Datepicker instance itself. If you have code that accesses options stored on the datepicker instance (eg, `datepicker.format`), you will need to update it to access those options via the `o` property (eg, `datepicker.o.format`). "Raw" options are available via the `_o` property. 1.0.2 ---------- Small optimizations release * Reduced the number of times `update` is called on initialization. * Datepicker now detaches the picker dropdown when it is hidden, and appends it when shown. This removes the picker from the DOM when it is not in use. * No longer listens to document/window events unless picker is visible. v1.0.1 ------ * Support for [Bower](https://bower.io/) * Component pickers are now aligned under the input, not the add-on element. * Japanese locale now has "today" and "format". * "remove" method removes `.data().date` if the datepicker is on a non-input. * Events on initialized elements are no longer blocked from bubbling up the DOM (jQuery.live et al can now catch the events). * Component triggers now include `.btn` in addition to `.add-on`. * Updates to README contents. v1.0.0 ------ Initial release: * format option * weekStart option * calendarWeeks option * startDate / endDate options * daysOfWeekDisabled option * autoclose option * startView / mnViewMode options * todayBtn / todayHighlight options * keyboardNavigation option * language option * forceParse option ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at . All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.4, available at ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing ## Support requests The issue tracker is not the place for support requests. If you get stuck with bootstrap-datepicker, it's very likely that the fine folks at [StackOverflow](https://stackoverflow.com/) will be able to help you; simply describe the problem you're having and provide them a link to the repo (so they know what code you're using). Another option is to post to the [bootstrap-datepicker google group](https://groups.google.com/group/bootstrap-datepicker). ## Issues If you've found a bug in bootstrap-datepicker, we want to know about it! However, please keep the following in mind: * This is not the bootstrap-datepicker from [eyecon.ro](https://www.eyecon.ro/bootstrap-datepicker/). Stefan provided the initial code for bootstrap-datepicker, but this repo is divergent from his codebase. Please make sure you're using either the latest tagged version or the latest master from https://github.com/uxsolutions/bootstrap-datepicker/. * A working example of the bug you've found is *much* easier to work with than a description alone. If possible, please provide a link to a demonstration of the bug, perhaps using https://jsfiddle.net/ . * CDN-backed assets can be found at http://bsdp-assets.blackcherry.us/ . These should be used *only* for building test cases, as they may be removed or changed at any time. * Finally, it's possible someone else has already reported the same bug you have. Please search the issue tracker for similar issues before posting your own. Thanks! ## Pull Requests Patches welcome! For all cases, you should have your own fork of the repo. To submit a pull request for a **new feature**: 1. Run the tests. Every pull request for a new feature should have an accompanying unit test and docs changes. See the `README.md` in the `tests/` and `docs/` directories for details. 2. Create a new branch off of the `master` branch for your feature. This is particularly helpful when you want to submit multiple pull requests. 3. Add a test (or multiple tests) for your feature. Again, see `tests/README.md`. 4. Add your new feature, making the test pass. 5. Push to your fork and submit the pull request! To submit a **bug fix**: 1. Create a new branch off of the `master` branch. 2. Add a test that demonstrates the bug. 3. Make the test pass. 4. Push to your fork and submit the pull request! To submit a **documentation fix**: 1. Create a new branch off of the `master` branch. 2. Add your documentation fixes (no tests required). 3. Push to your fork and submit the pull request! ================================================ FILE: Gruntfile.js ================================================ module.exports = function(grunt){ 'use strict'; // Force use of Unix newlines grunt.util.linefeed = '\n'; // Project configuration. grunt.initConfig({ //Metadata pkg: grunt.file.readJSON('package.json'), banner: [ '/*!', ' * Datepicker for Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)', ' *', ' * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0)', ' */' ].join('\n') + '\n', // Task configuration. clean: { dist: ['dist', '*-dist.zip'] }, jshint: { options: { jshintrc: 'js/.jshintrc' }, main: { src: 'js/bootstrap-datepicker.js' }, locales: { src: 'js/locales/*.js' }, gruntfile: { options: { jshintrc: 'grunt/.jshintrc' }, src: 'Gruntfile.js' } }, jscs: { options: { config: 'js/.jscsrc' }, main: { src: 'js/bootstrap-datepicker.js' }, locales: { src: 'js/locales/*.js' }, gruntfile: { src: 'Gruntfile.js' } }, qunit: { main: 'tests/tests.html', timezone: 'tests/timezone.html', options: { console: false } }, concat: { options: { stripBanners: true }, main: { src: 'js/bootstrap-datepicker.js', dest: 'dist/js/<%= pkg.name %>.js' } }, uglify: { options: { preserveComments: 'some' }, main: { src: '<%= concat.main.dest %>', dest: 'dist/js/<%= pkg.name %>.min.js' }, locales: { files: [{ expand: true, cwd: 'js/locales/', src: '*.js', dest: 'dist/locales/', rename: function(dest, name){ return dest + name.replace(/\.js$/, '.min.js'); } }] } }, less: { options: { sourceMap: true, outputSourceFiles: true }, standalone_bs2: { options: { sourceMapURL: '<%= pkg.name %>.standalone.css.map' }, src: 'build/build_standalone.less', dest: 'dist/css/<%= pkg.name %>.standalone.css' }, standalone_bs3: { options: { sourceMapURL: '<%= pkg.name %>3.standalone.css.map' }, src: 'build/build_standalone3.less', dest: 'dist/css/<%= pkg.name %>3.standalone.css' }, main_bs2: { options: { sourceMapURL: '<%= pkg.name %>.css.map' }, src: 'build/build.less', dest: 'dist/css/<%= pkg.name %>.css' }, main_bs3: { options: { sourceMapURL: '<%= pkg.name %>3.css.map' }, src: 'build/build3.less', dest: 'dist/css/<%= pkg.name %>3.css' } }, usebanner: { options: { banner: '<%= banner %>' }, css: 'dist/css/*.css', js: 'dist/js/**/*.js' }, cssmin: { options: { compatibility: 'ie8', keepSpecialComments: '*', advanced: false }, main: { files: { 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css', 'dist/css/<%= pkg.name %>3.min.css': 'dist/css/<%= pkg.name %>3.css' } }, standalone: { files: { 'dist/css/<%= pkg.name %>.standalone.min.css': 'dist/css/<%= pkg.name %>.standalone.css', 'dist/css/<%= pkg.name %>3.standalone.min.css': 'dist/css/<%= pkg.name %>3.standalone.css' } } }, csslint: { options: { csslintrc: 'less/.csslintrc' }, dist: [ 'dist/css/bootstrap-datepicker.css', 'dist/css/bootstrap-datepicker3.css', 'dist/css/bootstrap-datepicker.standalone.css', 'dist/css/bootstrap-datepicker3.standalone.css' ] }, compress: { main: { options: { archive: '<%= pkg.name %>-<%= pkg.version %>-dist.zip', mode: 'zip', level: 9, pretty: true }, files: [ { expand: true, cwd: 'dist/', src: '**' } ] } }, 'string-replace': { js: { files: [{ src: 'js/bootstrap-datepicker.js', dest: 'js/bootstrap-datepicker.js' }], options: { replacements: [{ pattern: /\$(\.fn\.datepicker\.version)\s=\s*("|\')[0-9\.a-z].*("|');/gi, replacement: "$.fn.datepicker.version = '" + grunt.option('newver') + "';" }] } }, npm: { files: [{ src: 'package.json', dest: 'package.json' }], options: { replacements: [{ pattern: /\"version\":\s\"[0-9\.a-z].*",/gi, replacement: '"version": "' + grunt.option('newver') + '",' }] } } } }); // These plugins provide necessary tasks. require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); require('time-grunt')(grunt); // JS distribution task. grunt.registerTask('dist-js', ['concat', 'uglify:main', 'uglify:locales', 'usebanner:js']); // CSS distribution task. grunt.registerTask('less-compile', 'less'); grunt.registerTask('dist-css', ['less-compile', 'cssmin:main', 'cssmin:standalone', 'usebanner:css']); // Full distribution task. grunt.registerTask('dist', ['clean:dist', 'dist-js', 'dist-css']); // Code check tasks. grunt.registerTask('lint-js', 'Lint all js files with jshint and jscs', ['jshint', 'jscs']); grunt.registerTask('lint-css', 'Lint all css files', ['dist-css', 'csslint:dist']); grunt.registerTask('qunit-all', 'Run qunit tests', ['qunit:main', 'qunit-timezone']); grunt.registerTask('test', 'Lint files and run unit tests', ['lint-js', /*'lint-css',*/ 'qunit-all']); // Version numbering task. // grunt bump-version --newver=X.Y.Z grunt.registerTask('bump-version', 'string-replace'); grunt.registerTask('qunit-timezone', 'Run timezone tests', function(){ process.env.TZ = 'Europe/Moscow'; grunt.task.run('qunit:timezone'); }); }; ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ # bootstrap-datepicker [![Join the chat at https://gitter.im/uxsolutions/bootstrap-datepicker](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/uxsolutions/bootstrap-datepicker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/uxsolutions/bootstrap-datepicker.svg?branch=master)](https://travis-ci.org/uxsolutions/bootstrap-datepicker) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/uxsolutions/bootstrap-datepicker/master/LICENSE) [![npm](https://img.shields.io/npm/dt/bootstrap-datepicker.svg)](https://github.com/uxsolutions/bootstrap-datepicker) [![Twitter Follow](https://img.shields.io/twitter/follow/bsdatepicker.svg?style=social&label=Follow)](https://twitter.com/bsdatepicker) Versions are incremented according to [semver](https://semver.org/). ## CDN You can use the [CloudFlare](https://www.cloudflare.com) powered [cdnjs.com](https://cdnjs.com) on your website. [bootstrap-datepicker](https://cdnjs.com/libraries/bootstrap-datepicker) on cdnjs Please note: It might take a few hours until a new version is available on cdnjs. ## Links * [Online Demo](https://uxsolutions.github.io/bootstrap-datepicker/) * [Online Docs](https://bootstrap-datepicker.readthedocs.org/en/stable/) (ReadTheDocs.com) * [Google Group](https://groups.google.com/group/bootstrap-datepicker/) * [Travis CI](https://travis-ci.org/uxsolutions/bootstrap-datepicker) #### Snippets * [Booking demo with two pickers](https://jsfiddle.net/azaret/25bqa6ho/) ## Development Once you cloned the repo, you'll need to install [grunt](https://gruntjs.com/) and the development dependencies using a package manager: * [yarn](https://yarnpkg.com/) (recommended): ``` $ [sudo] yarn global add grunt-cli $ yarn install ``` * [npm](https://www.npmjs.com/): ``` $ [sudo] npm install --global grunt-cli $ npm install ``` ================================================ FILE: bower.json ================================================ { "name": "bootstrap-datepicker", "main": [ "dist/css/bootstrap-datepicker3.css", "dist/js/bootstrap-datepicker.js" ], "license": "Apache-2.0", "dependencies": { "jquery" : ">=1.7.1 <4.0.0" }, "ignore": [] } ================================================ FILE: build/build.less ================================================ // Datepicker .less buildfile. Includes select mixins/variables from bootstrap // and imports the included datepicker.less to output a minimal datepicker.css // // Usage: // lessc build.less datepicker.css // // Variables and mixins copied from bootstrap 2.0.2 // Variables @grayLight: #999; @grayLighter: #eee; @white: #fff; @linkColor: #08c; @btnPrimaryBackground: @linkColor; @orange: #f89406; @infoBackground: #d9edf7; @baseLineHeight: 18px; @baseBorderRadius: 4px; // Mixins // Border Radius .border-radius(@radius: 5px) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; } // Button backgrounds .buttonBackground(@startColor, @endColor) { .gradientBar(@startColor, @endColor); .reset-filter(); &:hover, &:active, &.active, &.disabled, &[disabled] { background-color: @endColor; } &:active, &.active { background-color: darken(@endColor, 10%) e("\9"); } } // Reset filters for IE .reset-filter() { filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } // Gradient Bar Colors for buttons and alerts .gradientBar(@primaryColor, @secondaryColor) { #gradient > .vertical(@primaryColor, @secondaryColor); border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%); border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); } // Gradients #gradient { .vertical(@startColor: #555, @endColor: #333) { background-color: mix(@startColor, @endColor, 60%); background-image: -moz-linear-gradient(to bottom, @startColor, @endColor); // FF 3.6+ background-image: -ms-linear-gradient(to bottom, @startColor, @endColor); // IE10 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ background-image: -webkit-linear-gradient(to bottom, @startColor, @endColor); // Safari 5.1+, Chrome 10+ background-image: -o-linear-gradient(to bottom, @startColor, @endColor); // Opera 11.10 background-image: linear-gradient(to bottom, @startColor, @endColor); // The standard background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down } } @import "../less/datepicker.less"; ================================================ FILE: build/build3.less ================================================ // Datepicker .less buildfile. Includes select mixins/variables from bootstrap // and imports the included datepicker.less to output a minimal datepicker.css // // Usage: // lessc build3.less datepicker.css // // Variables and mixins copied from Bootstrap 3.3.5 // Variables @gray: lighten(#000, 33.5%); // #555 @gray-light: lighten(#000, 46.7%); // #777 @gray-lighter: lighten(#000, 93.5%); // #eee @brand-primary: darken(#428bca, 6.5%); // #337ab7 @btn-primary-color: #fff; @btn-primary-bg: @brand-primary; @btn-primary-border: darken(@btn-primary-bg, 5%); @btn-link-disabled-color: @gray-light; @state-info-bg: #d9edf7; @line-height-base: 1.428571429; // 20/14 @border-radius-base: 4px; @dropdown-bg: #fff; @dropdown-border: rgba(0,0,0,.15); // Mixins // Button variants .button-variant(@color; @background; @border) { color: @color; background-color: @background; border-color: @border; &:focus, &.focus { color: @color; background-color: darken(@background, 10%); border-color: darken(@border, 25%); } &:hover { color: @color; background-color: darken(@background, 10%); border-color: darken(@border, 12%); } &:active, &.active { color: @color; background-color: darken(@background, 10%); border-color: darken(@border, 12%); &:hover, &:focus, &.focus { color: @color; background-color: darken(@background, 17%); border-color: darken(@border, 25%); } } &.disabled, &[disabled], fieldset[disabled] & { &:hover, &:focus, &.focus { background-color: @background; border-color: @border; } } } @import "../less/datepicker3.less"; ================================================ FILE: build/build_standalone.less ================================================ // Datepicker standalone .less buildfile. Includes all necessary mixins/variables/rules from bootstrap // and imports the included datepicker.less to output a minimal standalone datepicker.css // // Usage: // lessc build_standalone.less datepicker.css // // Variables, mixins, and rules copied from bootstrap 2.0.2 @import "build.less"; // Dropdown css @zindexDropdown: 1000; @grayDark: #333; @baseLineHeight: 20px; @tableBackground: transparent; // overall background-color @dropdownBackground: @white; @dropdownBorder: rgba(0,0,0,.2); @dropdownLinkColor: @grayDark; @dropdownLinkColorHover: @white; @dropdownLinkBackgroundHover: @linkColor; // Drop shadows .box-shadow(@shadow) { -webkit-box-shadow: @shadow; -moz-box-shadow: @shadow; box-shadow: @shadow; } // The dropdown menu (ul) // ---------------------- .datepicker{ &.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: @zindexDropdown; float: left; display: none; // none by default, but block on "open" of the menu min-width: 160px; list-style: none; background-color: @dropdownBackground; border: 1px solid #ccc; border: 1px solid rgba(0,0,0,.2); .border-radius(5px); .box-shadow(0 5px 10px rgba(0,0,0,.2)); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; *border-right-width: 2px; *border-bottom-width: 2px; // Normally inherited from bootstrap's `body` color: #333333; font-size:13px; line-height: @baseLineHeight; } &.dropdown-menu, &.datepicker-inline { th, td { padding: 4px 5px; } } } ================================================ FILE: build/build_standalone3.less ================================================ // Datepicker standalone .less buildfile. Includes all necessary mixins/variables/rules from bootstrap // and imports the included datepicker.less to output a minimal standalone datepicker.css // // Usage: // lessc build_standalone3.less datepicker.css // // Variables, mixins, and rules copied from Bootstrap 3.3.5 @import "build3.less"; // Dropdown css @zindex-dropdown: 1000; @dropdown-fallback-border: #ccc; // Drop shadows .box-shadow(@shadow) { -webkit-box-shadow: @shadow; -moz-box-shadow: @shadow; box-shadow: @shadow; } // The dropdown menu (ul) // ---------------------- .datepicker { &.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: @zindex-dropdown; display: none; // none by default, but block on "open" of the menu float: left; min-width: 160px; list-style: none; background-color: @dropdown-bg; border: 1px solid @dropdown-fallback-border; // IE8 fallback border: 1px solid @dropdown-border; border-radius: @border-radius-base; .box-shadow(0 6px 12px rgba(0,0,0,.175)); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; // Normally inherited from bootstrap's `body` color: #333333; font-size: 13px; line-height: @line-height-base; } &.dropdown-menu, &.datepicker-inline { th, td { padding: 0px 5px; } } } ================================================ FILE: composer.json ================================================ { "name": "eternicode/bootstrap-datepicker", "description": "A datepicker for Bootstrap", "license": "Apache-2.0", "keywords": [ "bootstrap", "datepicker" ], "authors": [ { "name": "Andrew Rowls", "email": "eternicode@gmail.com" }, { "name": "Community", "homepage": "https://github.com/uxsolutions/bootstrap-datepicker/contributors" } ], "type": "component", "require": { "robloach/component-installer": "*", "components/bootstrap" : ">=2.0, <4.0", "components/jquery": ">=1.7.1, <4.0.0" }, "extra": { "component": { "scripts": [ "js/bootstrap-datepicker.js" ], "styles": [ "dist/css/bootstrap-datepicker.css", "dist/css/bootstrap-datepicker3.css" ], "files": [ "js/locales/bootstrap-datepicker.*.js" ] } } } ================================================ FILE: dist/css/bootstrap-datepicker.css ================================================ /*! * Datepicker for Bootstrap v1.10.0 (https://github.com/uxsolutions/bootstrap-datepicker) * * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0) */ .datepicker { padding: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; direction: ltr; } .datepicker-inline { width: 220px; } .datepicker-rtl { direction: rtl; } .datepicker-rtl.dropdown-menu { left: auto; } .datepicker-rtl table tr td span { float: right; } .datepicker-dropdown { top: 0; left: 0; } .datepicker-dropdown:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #999; border-top: 0; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; } .datepicker-dropdown:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; border-top: 0; position: absolute; } .datepicker-dropdown.datepicker-orient-left:before { left: 6px; } .datepicker-dropdown.datepicker-orient-left:after { left: 7px; } .datepicker-dropdown.datepicker-orient-right:before { right: 6px; } .datepicker-dropdown.datepicker-orient-right:after { right: 7px; } .datepicker-dropdown.datepicker-orient-bottom:before { top: -7px; } .datepicker-dropdown.datepicker-orient-bottom:after { top: -6px; } .datepicker-dropdown.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid #999; } .datepicker-dropdown.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid #fff; } .datepicker table { margin: 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .datepicker td, .datepicker th { text-align: center; width: 20px; height: 20px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; border: none; } .table-striped .datepicker table tr td, .table-striped .datepicker table tr th { background-color: transparent; } .datepicker table tr td.day:hover, .datepicker table tr td.day.focused { background: #eee; cursor: pointer; } .datepicker table tr td.old, .datepicker table tr td.new { color: #999; } .datepicker table tr td.disabled, .datepicker table tr td.disabled:hover { background: none; color: #999; cursor: default; } .datepicker table tr td.highlighted { background: #d9edf7; border-radius: 0; } .datepicker table tr td.today, .datepicker table tr td.today:hover, .datepicker table tr td.today.disabled, .datepicker table tr td.today.disabled:hover { background-color: #fde19a; background-image: -moz-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: -ms-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); background-image: -webkit-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: -o-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: linear-gradient(to bottom, #fdd49a, #fdf59a); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); border-color: #fdf59a #fdf59a #fbed50; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #000; } .datepicker table tr td.today:hover, .datepicker table tr td.today:hover:hover, .datepicker table tr td.today.disabled:hover, .datepicker table tr td.today.disabled:hover:hover, .datepicker table tr td.today:active, .datepicker table tr td.today:hover:active, .datepicker table tr td.today.disabled:active, .datepicker table tr td.today.disabled:hover:active, .datepicker table tr td.today.active, .datepicker table tr td.today:hover.active, .datepicker table tr td.today.disabled.active, .datepicker table tr td.today.disabled:hover.active, .datepicker table tr td.today.disabled, .datepicker table tr td.today:hover.disabled, .datepicker table tr td.today.disabled.disabled, .datepicker table tr td.today.disabled:hover.disabled, .datepicker table tr td.today[disabled], .datepicker table tr td.today:hover[disabled], .datepicker table tr td.today.disabled[disabled], .datepicker table tr td.today.disabled:hover[disabled] { background-color: #fdf59a; } .datepicker table tr td.today:active, .datepicker table tr td.today:hover:active, .datepicker table tr td.today.disabled:active, .datepicker table tr td.today.disabled:hover:active, .datepicker table tr td.today.active, .datepicker table tr td.today:hover.active, .datepicker table tr td.today.disabled.active, .datepicker table tr td.today.disabled:hover.active { background-color: #fbf069 \9; } .datepicker table tr td.today:hover:hover { color: #000; } .datepicker table tr td.today.active:hover { color: #fff; } .datepicker table tr td.range, .datepicker table tr td.range:hover, .datepicker table tr td.range.disabled, .datepicker table tr td.range.disabled:hover { background: #eee; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .datepicker table tr td.range.today, .datepicker table tr td.range.today:hover, .datepicker table tr td.range.today.disabled, .datepicker table tr td.range.today.disabled:hover { background-color: #f3d17a; background-image: -moz-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: -ms-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a)); background-image: -webkit-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: -o-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: linear-gradient(to bottom, #f3c17a, #f3e97a); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0); border-color: #f3e97a #f3e97a #edde34; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .datepicker table tr td.range.today:hover, .datepicker table tr td.range.today:hover:hover, .datepicker table tr td.range.today.disabled:hover, .datepicker table tr td.range.today.disabled:hover:hover, .datepicker table tr td.range.today:active, .datepicker table tr td.range.today:hover:active, .datepicker table tr td.range.today.disabled:active, .datepicker table tr td.range.today.disabled:hover:active, .datepicker table tr td.range.today.active, .datepicker table tr td.range.today:hover.active, .datepicker table tr td.range.today.disabled.active, .datepicker table tr td.range.today.disabled:hover.active, .datepicker table tr td.range.today.disabled, .datepicker table tr td.range.today:hover.disabled, .datepicker table tr td.range.today.disabled.disabled, .datepicker table tr td.range.today.disabled:hover.disabled, .datepicker table tr td.range.today[disabled], .datepicker table tr td.range.today:hover[disabled], .datepicker table tr td.range.today.disabled[disabled], .datepicker table tr td.range.today.disabled:hover[disabled] { background-color: #f3e97a; } .datepicker table tr td.range.today:active, .datepicker table tr td.range.today:hover:active, .datepicker table tr td.range.today.disabled:active, .datepicker table tr td.range.today.disabled:hover:active, .datepicker table tr td.range.today.active, .datepicker table tr td.range.today:hover.active, .datepicker table tr td.range.today.disabled.active, .datepicker table tr td.range.today.disabled:hover.active { background-color: #efe24b \9; } .datepicker table tr td.selected, .datepicker table tr td.selected:hover, .datepicker table tr td.selected.disabled, .datepicker table tr td.selected.disabled:hover { background-color: #9e9e9e; background-image: -moz-linear-gradient(to bottom, #b3b3b3, #808080); background-image: -ms-linear-gradient(to bottom, #b3b3b3, #808080); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080)); background-image: -webkit-linear-gradient(to bottom, #b3b3b3, #808080); background-image: -o-linear-gradient(to bottom, #b3b3b3, #808080); background-image: linear-gradient(to bottom, #b3b3b3, #808080); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0); border-color: #808080 #808080 #595959; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.selected:hover, .datepicker table tr td.selected:hover:hover, .datepicker table tr td.selected.disabled:hover, .datepicker table tr td.selected.disabled:hover:hover, .datepicker table tr td.selected:active, .datepicker table tr td.selected:hover:active, .datepicker table tr td.selected.disabled:active, .datepicker table tr td.selected.disabled:hover:active, .datepicker table tr td.selected.active, .datepicker table tr td.selected:hover.active, .datepicker table tr td.selected.disabled.active, .datepicker table tr td.selected.disabled:hover.active, .datepicker table tr td.selected.disabled, .datepicker table tr td.selected:hover.disabled, .datepicker table tr td.selected.disabled.disabled, .datepicker table tr td.selected.disabled:hover.disabled, .datepicker table tr td.selected[disabled], .datepicker table tr td.selected:hover[disabled], .datepicker table tr td.selected.disabled[disabled], .datepicker table tr td.selected.disabled:hover[disabled] { background-color: #808080; } .datepicker table tr td.selected:active, .datepicker table tr td.selected:hover:active, .datepicker table tr td.selected.disabled:active, .datepicker table tr td.selected.disabled:hover:active, .datepicker table tr td.selected.active, .datepicker table tr td.selected:hover.active, .datepicker table tr td.selected.disabled.active, .datepicker table tr td.selected.disabled:hover.active { background-color: #666666 \9; } .datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td.active.disabled, .datepicker table tr td.active.disabled:hover { background-color: #006dcc; background-image: -moz-linear-gradient(to bottom, #08c, #0044cc); background-image: -ms-linear-gradient(to bottom, #08c, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0044cc)); background-image: -webkit-linear-gradient(to bottom, #08c, #0044cc); background-image: -o-linear-gradient(to bottom, #08c, #0044cc); background-image: linear-gradient(to bottom, #08c, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#08c', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.active:hover, .datepicker table tr td.active:hover:hover, .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active.disabled:hover:hover, .datepicker table tr td.active:active, .datepicker table tr td.active:hover:active, .datepicker table tr td.active.disabled:active, .datepicker table tr td.active.disabled:hover:active, .datepicker table tr td.active.active, .datepicker table tr td.active:hover.active, .datepicker table tr td.active.disabled.active, .datepicker table tr td.active.disabled:hover.active, .datepicker table tr td.active.disabled, .datepicker table tr td.active:hover.disabled, .datepicker table tr td.active.disabled.disabled, .datepicker table tr td.active.disabled:hover.disabled, .datepicker table tr td.active[disabled], .datepicker table tr td.active:hover[disabled], .datepicker table tr td.active.disabled[disabled], .datepicker table tr td.active.disabled:hover[disabled] { background-color: #0044cc; } .datepicker table tr td.active:active, .datepicker table tr td.active:hover:active, .datepicker table tr td.active.disabled:active, .datepicker table tr td.active.disabled:hover:active, .datepicker table tr td.active.active, .datepicker table tr td.active:hover.active, .datepicker table tr td.active.disabled.active, .datepicker table tr td.active.disabled:hover.active { background-color: #003399 \9; } .datepicker table tr td span { display: block; width: 23%; height: 54px; line-height: 54px; float: left; margin: 1%; cursor: pointer; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker table tr td span:hover, .datepicker table tr td span.focused { background: #eee; } .datepicker table tr td span.disabled, .datepicker table tr td span.disabled:hover { background: none; color: #999; cursor: default; } .datepicker table tr td span.active, .datepicker table tr td span.active:hover, .datepicker table tr td span.active.disabled, .datepicker table tr td span.active.disabled:hover { background-color: #006dcc; background-image: -moz-linear-gradient(to bottom, #08c, #0044cc); background-image: -ms-linear-gradient(to bottom, #08c, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0044cc)); background-image: -webkit-linear-gradient(to bottom, #08c, #0044cc); background-image: -o-linear-gradient(to bottom, #08c, #0044cc); background-image: linear-gradient(to bottom, #08c, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#08c', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td span.active:hover, .datepicker table tr td span.active:hover:hover, .datepicker table tr td span.active.disabled:hover, .datepicker table tr td span.active.disabled:hover:hover, .datepicker table tr td span.active:active, .datepicker table tr td span.active:hover:active, .datepicker table tr td span.active.disabled:active, .datepicker table tr td span.active.disabled:hover:active, .datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active, .datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active, .datepicker table tr td span.active.disabled, .datepicker table tr td span.active:hover.disabled, .datepicker table tr td span.active.disabled.disabled, .datepicker table tr td span.active.disabled:hover.disabled, .datepicker table tr td span.active[disabled], .datepicker table tr td span.active:hover[disabled], .datepicker table tr td span.active.disabled[disabled], .datepicker table tr td span.active.disabled:hover[disabled] { background-color: #0044cc; } .datepicker table tr td span.active:active, .datepicker table tr td span.active:hover:active, .datepicker table tr td span.active.disabled:active, .datepicker table tr td span.active.disabled:hover:active, .datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active, .datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active { background-color: #003399 \9; } .datepicker table tr td span.old, .datepicker table tr td span.new { color: #999; } .datepicker .datepicker-switch { width: 145px; } .datepicker .datepicker-switch, .datepicker .prev, .datepicker .next, .datepicker tfoot tr th { cursor: pointer; } .datepicker .datepicker-switch:hover, .datepicker .prev:hover, .datepicker .next:hover, .datepicker tfoot tr th:hover { background: #eee; } .datepicker .prev.disabled, .datepicker .next.disabled { visibility: hidden; } .datepicker .cw { font-size: 10px; width: 12px; padding: 0 2px 0 5px; vertical-align: middle; } .input-append.date .add-on, .input-prepend.date .add-on { cursor: pointer; } .input-append.date .add-on i, .input-prepend.date .add-on i { margin-top: 3px; } .input-daterange input { text-align: center; } .input-daterange input:first-child { -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-daterange input:last-child { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .input-daterange .add-on { display: inline-block; width: auto; min-width: 16px; height: 18px; padding: 4px 5px; font-weight: normal; line-height: 18px; text-align: center; text-shadow: 0 1px 0 #fff; vertical-align: middle; background-color: #eee; border: 1px solid #ccc; margin-left: -5px; margin-right: -5px; } /*# sourceMappingURL=bootstrap-datepicker.css.map */ ================================================ FILE: dist/css/bootstrap-datepicker.standalone.css ================================================ /*! * Datepicker for Bootstrap v1.10.0 (https://github.com/uxsolutions/bootstrap-datepicker) * * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0) */ .datepicker { padding: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; direction: ltr; } .datepicker-inline { width: 220px; } .datepicker-rtl { direction: rtl; } .datepicker-rtl.dropdown-menu { left: auto; } .datepicker-rtl table tr td span { float: right; } .datepicker-dropdown { top: 0; left: 0; } .datepicker-dropdown:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #999; border-top: 0; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; } .datepicker-dropdown:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; border-top: 0; position: absolute; } .datepicker-dropdown.datepicker-orient-left:before { left: 6px; } .datepicker-dropdown.datepicker-orient-left:after { left: 7px; } .datepicker-dropdown.datepicker-orient-right:before { right: 6px; } .datepicker-dropdown.datepicker-orient-right:after { right: 7px; } .datepicker-dropdown.datepicker-orient-bottom:before { top: -7px; } .datepicker-dropdown.datepicker-orient-bottom:after { top: -6px; } .datepicker-dropdown.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid #999; } .datepicker-dropdown.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid #fff; } .datepicker table { margin: 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .datepicker td, .datepicker th { text-align: center; width: 20px; height: 20px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; border: none; } .table-striped .datepicker table tr td, .table-striped .datepicker table tr th { background-color: transparent; } .datepicker table tr td.day:hover, .datepicker table tr td.day.focused { background: #eee; cursor: pointer; } .datepicker table tr td.old, .datepicker table tr td.new { color: #999; } .datepicker table tr td.disabled, .datepicker table tr td.disabled:hover { background: none; color: #999; cursor: default; } .datepicker table tr td.highlighted { background: #d9edf7; border-radius: 0; } .datepicker table tr td.today, .datepicker table tr td.today:hover, .datepicker table tr td.today.disabled, .datepicker table tr td.today.disabled:hover { background-color: #fde19a; background-image: -moz-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: -ms-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); background-image: -webkit-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: -o-linear-gradient(to bottom, #fdd49a, #fdf59a); background-image: linear-gradient(to bottom, #fdd49a, #fdf59a); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); border-color: #fdf59a #fdf59a #fbed50; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #000; } .datepicker table tr td.today:hover, .datepicker table tr td.today:hover:hover, .datepicker table tr td.today.disabled:hover, .datepicker table tr td.today.disabled:hover:hover, .datepicker table tr td.today:active, .datepicker table tr td.today:hover:active, .datepicker table tr td.today.disabled:active, .datepicker table tr td.today.disabled:hover:active, .datepicker table tr td.today.active, .datepicker table tr td.today:hover.active, .datepicker table tr td.today.disabled.active, .datepicker table tr td.today.disabled:hover.active, .datepicker table tr td.today.disabled, .datepicker table tr td.today:hover.disabled, .datepicker table tr td.today.disabled.disabled, .datepicker table tr td.today.disabled:hover.disabled, .datepicker table tr td.today[disabled], .datepicker table tr td.today:hover[disabled], .datepicker table tr td.today.disabled[disabled], .datepicker table tr td.today.disabled:hover[disabled] { background-color: #fdf59a; } .datepicker table tr td.today:active, .datepicker table tr td.today:hover:active, .datepicker table tr td.today.disabled:active, .datepicker table tr td.today.disabled:hover:active, .datepicker table tr td.today.active, .datepicker table tr td.today:hover.active, .datepicker table tr td.today.disabled.active, .datepicker table tr td.today.disabled:hover.active { background-color: #fbf069 \9; } .datepicker table tr td.today:hover:hover { color: #000; } .datepicker table tr td.today.active:hover { color: #fff; } .datepicker table tr td.range, .datepicker table tr td.range:hover, .datepicker table tr td.range.disabled, .datepicker table tr td.range.disabled:hover { background: #eee; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .datepicker table tr td.range.today, .datepicker table tr td.range.today:hover, .datepicker table tr td.range.today.disabled, .datepicker table tr td.range.today.disabled:hover { background-color: #f3d17a; background-image: -moz-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: -ms-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a)); background-image: -webkit-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: -o-linear-gradient(to bottom, #f3c17a, #f3e97a); background-image: linear-gradient(to bottom, #f3c17a, #f3e97a); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0); border-color: #f3e97a #f3e97a #edde34; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .datepicker table tr td.range.today:hover, .datepicker table tr td.range.today:hover:hover, .datepicker table tr td.range.today.disabled:hover, .datepicker table tr td.range.today.disabled:hover:hover, .datepicker table tr td.range.today:active, .datepicker table tr td.range.today:hover:active, .datepicker table tr td.range.today.disabled:active, .datepicker table tr td.range.today.disabled:hover:active, .datepicker table tr td.range.today.active, .datepicker table tr td.range.today:hover.active, .datepicker table tr td.range.today.disabled.active, .datepicker table tr td.range.today.disabled:hover.active, .datepicker table tr td.range.today.disabled, .datepicker table tr td.range.today:hover.disabled, .datepicker table tr td.range.today.disabled.disabled, .datepicker table tr td.range.today.disabled:hover.disabled, .datepicker table tr td.range.today[disabled], .datepicker table tr td.range.today:hover[disabled], .datepicker table tr td.range.today.disabled[disabled], .datepicker table tr td.range.today.disabled:hover[disabled] { background-color: #f3e97a; } .datepicker table tr td.range.today:active, .datepicker table tr td.range.today:hover:active, .datepicker table tr td.range.today.disabled:active, .datepicker table tr td.range.today.disabled:hover:active, .datepicker table tr td.range.today.active, .datepicker table tr td.range.today:hover.active, .datepicker table tr td.range.today.disabled.active, .datepicker table tr td.range.today.disabled:hover.active { background-color: #efe24b \9; } .datepicker table tr td.selected, .datepicker table tr td.selected:hover, .datepicker table tr td.selected.disabled, .datepicker table tr td.selected.disabled:hover { background-color: #9e9e9e; background-image: -moz-linear-gradient(to bottom, #b3b3b3, #808080); background-image: -ms-linear-gradient(to bottom, #b3b3b3, #808080); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080)); background-image: -webkit-linear-gradient(to bottom, #b3b3b3, #808080); background-image: -o-linear-gradient(to bottom, #b3b3b3, #808080); background-image: linear-gradient(to bottom, #b3b3b3, #808080); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0); border-color: #808080 #808080 #595959; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.selected:hover, .datepicker table tr td.selected:hover:hover, .datepicker table tr td.selected.disabled:hover, .datepicker table tr td.selected.disabled:hover:hover, .datepicker table tr td.selected:active, .datepicker table tr td.selected:hover:active, .datepicker table tr td.selected.disabled:active, .datepicker table tr td.selected.disabled:hover:active, .datepicker table tr td.selected.active, .datepicker table tr td.selected:hover.active, .datepicker table tr td.selected.disabled.active, .datepicker table tr td.selected.disabled:hover.active, .datepicker table tr td.selected.disabled, .datepicker table tr td.selected:hover.disabled, .datepicker table tr td.selected.disabled.disabled, .datepicker table tr td.selected.disabled:hover.disabled, .datepicker table tr td.selected[disabled], .datepicker table tr td.selected:hover[disabled], .datepicker table tr td.selected.disabled[disabled], .datepicker table tr td.selected.disabled:hover[disabled] { background-color: #808080; } .datepicker table tr td.selected:active, .datepicker table tr td.selected:hover:active, .datepicker table tr td.selected.disabled:active, .datepicker table tr td.selected.disabled:hover:active, .datepicker table tr td.selected.active, .datepicker table tr td.selected:hover.active, .datepicker table tr td.selected.disabled.active, .datepicker table tr td.selected.disabled:hover.active { background-color: #666666 \9; } .datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td.active.disabled, .datepicker table tr td.active.disabled:hover { background-color: #006dcc; background-image: -moz-linear-gradient(to bottom, #08c, #0044cc); background-image: -ms-linear-gradient(to bottom, #08c, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0044cc)); background-image: -webkit-linear-gradient(to bottom, #08c, #0044cc); background-image: -o-linear-gradient(to bottom, #08c, #0044cc); background-image: linear-gradient(to bottom, #08c, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#08c', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.active:hover, .datepicker table tr td.active:hover:hover, .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active.disabled:hover:hover, .datepicker table tr td.active:active, .datepicker table tr td.active:hover:active, .datepicker table tr td.active.disabled:active, .datepicker table tr td.active.disabled:hover:active, .datepicker table tr td.active.active, .datepicker table tr td.active:hover.active, .datepicker table tr td.active.disabled.active, .datepicker table tr td.active.disabled:hover.active, .datepicker table tr td.active.disabled, .datepicker table tr td.active:hover.disabled, .datepicker table tr td.active.disabled.disabled, .datepicker table tr td.active.disabled:hover.disabled, .datepicker table tr td.active[disabled], .datepicker table tr td.active:hover[disabled], .datepicker table tr td.active.disabled[disabled], .datepicker table tr td.active.disabled:hover[disabled] { background-color: #0044cc; } .datepicker table tr td.active:active, .datepicker table tr td.active:hover:active, .datepicker table tr td.active.disabled:active, .datepicker table tr td.active.disabled:hover:active, .datepicker table tr td.active.active, .datepicker table tr td.active:hover.active, .datepicker table tr td.active.disabled.active, .datepicker table tr td.active.disabled:hover.active { background-color: #003399 \9; } .datepicker table tr td span { display: block; width: 23%; height: 54px; line-height: 54px; float: left; margin: 1%; cursor: pointer; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker table tr td span:hover, .datepicker table tr td span.focused { background: #eee; } .datepicker table tr td span.disabled, .datepicker table tr td span.disabled:hover { background: none; color: #999; cursor: default; } .datepicker table tr td span.active, .datepicker table tr td span.active:hover, .datepicker table tr td span.active.disabled, .datepicker table tr td span.active.disabled:hover { background-color: #006dcc; background-image: -moz-linear-gradient(to bottom, #08c, #0044cc); background-image: -ms-linear-gradient(to bottom, #08c, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0044cc)); background-image: -webkit-linear-gradient(to bottom, #08c, #0044cc); background-image: -o-linear-gradient(to bottom, #08c, #0044cc); background-image: linear-gradient(to bottom, #08c, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#08c', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td span.active:hover, .datepicker table tr td span.active:hover:hover, .datepicker table tr td span.active.disabled:hover, .datepicker table tr td span.active.disabled:hover:hover, .datepicker table tr td span.active:active, .datepicker table tr td span.active:hover:active, .datepicker table tr td span.active.disabled:active, .datepicker table tr td span.active.disabled:hover:active, .datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active, .datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active, .datepicker table tr td span.active.disabled, .datepicker table tr td span.active:hover.disabled, .datepicker table tr td span.active.disabled.disabled, .datepicker table tr td span.active.disabled:hover.disabled, .datepicker table tr td span.active[disabled], .datepicker table tr td span.active:hover[disabled], .datepicker table tr td span.active.disabled[disabled], .datepicker table tr td span.active.disabled:hover[disabled] { background-color: #0044cc; } .datepicker table tr td span.active:active, .datepicker table tr td span.active:hover:active, .datepicker table tr td span.active.disabled:active, .datepicker table tr td span.active.disabled:hover:active, .datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active, .datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active { background-color: #003399 \9; } .datepicker table tr td span.old, .datepicker table tr td span.new { color: #999; } .datepicker .datepicker-switch { width: 145px; } .datepicker .datepicker-switch, .datepicker .prev, .datepicker .next, .datepicker tfoot tr th { cursor: pointer; } .datepicker .datepicker-switch:hover, .datepicker .prev:hover, .datepicker .next:hover, .datepicker tfoot tr th:hover { background: #eee; } .datepicker .prev.disabled, .datepicker .next.disabled { visibility: hidden; } .datepicker .cw { font-size: 10px; width: 12px; padding: 0 2px 0 5px; vertical-align: middle; } .input-append.date .add-on, .input-prepend.date .add-on { cursor: pointer; } .input-append.date .add-on i, .input-prepend.date .add-on i { margin-top: 3px; } .input-daterange input { text-align: center; } .input-daterange input:first-child { -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-daterange input:last-child { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .input-daterange .add-on { display: inline-block; width: auto; min-width: 16px; height: 20px; padding: 4px 5px; font-weight: normal; line-height: 20px; text-align: center; text-shadow: 0 1px 0 #fff; vertical-align: middle; background-color: #eee; border: 1px solid #ccc; margin-left: -5px; margin-right: -5px; } .datepicker.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; float: left; display: none; min-width: 160px; list-style: none; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; *border-right-width: 2px; *border-bottom-width: 2px; color: #333333; font-size: 13px; line-height: 20px; } .datepicker.dropdown-menu th, .datepicker.datepicker-inline th, .datepicker.dropdown-menu td, .datepicker.datepicker-inline td { padding: 4px 5px; } /*# sourceMappingURL=bootstrap-datepicker.standalone.css.map */ ================================================ FILE: dist/css/bootstrap-datepicker3.css ================================================ /*! * Datepicker for Bootstrap v1.10.0 (https://github.com/uxsolutions/bootstrap-datepicker) * * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0) */ .datepicker { border-radius: 4px; direction: ltr; } .datepicker-inline { width: 220px; } .datepicker-rtl { direction: rtl; } .datepicker-rtl.dropdown-menu { left: auto; } .datepicker-rtl table tr td span { float: right; } .datepicker-dropdown { top: 0; left: 0; padding: 4px; } .datepicker-dropdown:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid rgba(0, 0, 0, 0.15); border-top: 0; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; } .datepicker-dropdown:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; border-top: 0; position: absolute; } .datepicker-dropdown.datepicker-orient-left:before { left: 6px; } .datepicker-dropdown.datepicker-orient-left:after { left: 7px; } .datepicker-dropdown.datepicker-orient-right:before { right: 6px; } .datepicker-dropdown.datepicker-orient-right:after { right: 7px; } .datepicker-dropdown.datepicker-orient-bottom:before { top: -7px; } .datepicker-dropdown.datepicker-orient-bottom:after { top: -6px; } .datepicker-dropdown.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid rgba(0, 0, 0, 0.15); } .datepicker-dropdown.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid #fff; } .datepicker table { margin: 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .datepicker table tr td, .datepicker table tr th { text-align: center; width: 30px; height: 30px; border-radius: 4px; border: none; } .table-striped .datepicker table tr td, .table-striped .datepicker table tr th { background-color: transparent; } .datepicker table tr td.old, .datepicker table tr td.new { color: #777777; } .datepicker table tr td.day:hover, .datepicker table tr td.focused { background: #eeeeee; cursor: pointer; } .datepicker table tr td.disabled, .datepicker table tr td.disabled:hover { background: none; color: #777777; cursor: default; } .datepicker table tr td.highlighted { color: #000; background-color: #d9edf7; border-color: #85c5e5; border-radius: 0; } .datepicker table tr td.highlighted:focus, .datepicker table tr td.highlighted.focus { color: #000; background-color: #afd9ee; border-color: #298fc2; } .datepicker table tr td.highlighted:hover { color: #000; background-color: #afd9ee; border-color: #52addb; } .datepicker table tr td.highlighted:active, .datepicker table tr td.highlighted.active { color: #000; background-color: #afd9ee; border-color: #52addb; } .datepicker table tr td.highlighted:active:hover, .datepicker table tr td.highlighted.active:hover, .datepicker table tr td.highlighted:active:focus, .datepicker table tr td.highlighted.active:focus, .datepicker table tr td.highlighted:active.focus, .datepicker table tr td.highlighted.active.focus { color: #000; background-color: #91cbe8; border-color: #298fc2; } .datepicker table tr td.highlighted.disabled:hover, .datepicker table tr td.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.highlighted:hover, .datepicker table tr td.highlighted.disabled:focus, .datepicker table tr td.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.highlighted:focus, .datepicker table tr td.highlighted.disabled.focus, .datepicker table tr td.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.highlighted.focus { background-color: #d9edf7; border-color: #85c5e5; } .datepicker table tr td.highlighted.focused { background: #afd9ee; } .datepicker table tr td.highlighted.disabled, .datepicker table tr td.highlighted.disabled:active { background: #d9edf7; color: #777777; } .datepicker table tr td.today { color: #000; background-color: #ffdb99; border-color: #ffb733; } .datepicker table tr td.today:focus, .datepicker table tr td.today.focus { color: #000; background-color: #ffc966; border-color: #b37400; } .datepicker table tr td.today:hover { color: #000; background-color: #ffc966; border-color: #f59e00; } .datepicker table tr td.today:active, .datepicker table tr td.today.active { color: #000; background-color: #ffc966; border-color: #f59e00; } .datepicker table tr td.today:active:hover, .datepicker table tr td.today.active:hover, .datepicker table tr td.today:active:focus, .datepicker table tr td.today.active:focus, .datepicker table tr td.today:active.focus, .datepicker table tr td.today.active.focus { color: #000; background-color: #ffbc42; border-color: #b37400; } .datepicker table tr td.today.disabled:hover, .datepicker table tr td.today[disabled]:hover, fieldset[disabled] .datepicker table tr td.today:hover, .datepicker table tr td.today.disabled:focus, .datepicker table tr td.today[disabled]:focus, fieldset[disabled] .datepicker table tr td.today:focus, .datepicker table tr td.today.disabled.focus, .datepicker table tr td.today[disabled].focus, fieldset[disabled] .datepicker table tr td.today.focus { background-color: #ffdb99; border-color: #ffb733; } .datepicker table tr td.today.focused { background: #ffc966; } .datepicker table tr td.today.disabled, .datepicker table tr td.today.disabled:active { background: #ffdb99; color: #777777; } .datepicker table tr td.range { color: #000; background-color: #eeeeee; border-color: #bbbbbb; border-radius: 0; } .datepicker table tr td.range:focus, .datepicker table tr td.range.focus { color: #000; background-color: #d5d5d5; border-color: #7c7c7c; } .datepicker table tr td.range:hover { color: #000; background-color: #d5d5d5; border-color: #9d9d9d; } .datepicker table tr td.range:active, .datepicker table tr td.range.active { color: #000; background-color: #d5d5d5; border-color: #9d9d9d; } .datepicker table tr td.range:active:hover, .datepicker table tr td.range.active:hover, .datepicker table tr td.range:active:focus, .datepicker table tr td.range.active:focus, .datepicker table tr td.range:active.focus, .datepicker table tr td.range.active.focus { color: #000; background-color: #c3c3c3; border-color: #7c7c7c; } .datepicker table tr td.range.disabled:hover, .datepicker table tr td.range[disabled]:hover, fieldset[disabled] .datepicker table tr td.range:hover, .datepicker table tr td.range.disabled:focus, .datepicker table tr td.range[disabled]:focus, fieldset[disabled] .datepicker table tr td.range:focus, .datepicker table tr td.range.disabled.focus, .datepicker table tr td.range[disabled].focus, fieldset[disabled] .datepicker table tr td.range.focus { background-color: #eeeeee; border-color: #bbbbbb; } .datepicker table tr td.range.focused { background: #d5d5d5; } .datepicker table tr td.range.disabled, .datepicker table tr td.range.disabled:active { background: #eeeeee; color: #777777; } .datepicker table tr td.range.highlighted { color: #000; background-color: #e4eef3; border-color: #9dc1d3; } .datepicker table tr td.range.highlighted:focus, .datepicker table tr td.range.highlighted.focus { color: #000; background-color: #c1d7e3; border-color: #4b88a6; } .datepicker table tr td.range.highlighted:hover { color: #000; background-color: #c1d7e3; border-color: #73a6c0; } .datepicker table tr td.range.highlighted:active, .datepicker table tr td.range.highlighted.active { color: #000; background-color: #c1d7e3; border-color: #73a6c0; } .datepicker table tr td.range.highlighted:active:hover, .datepicker table tr td.range.highlighted.active:hover, .datepicker table tr td.range.highlighted:active:focus, .datepicker table tr td.range.highlighted.active:focus, .datepicker table tr td.range.highlighted:active.focus, .datepicker table tr td.range.highlighted.active.focus { color: #000; background-color: #a8c8d8; border-color: #4b88a6; } .datepicker table tr td.range.highlighted.disabled:hover, .datepicker table tr td.range.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.range.highlighted:hover, .datepicker table tr td.range.highlighted.disabled:focus, .datepicker table tr td.range.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.range.highlighted:focus, .datepicker table tr td.range.highlighted.disabled.focus, .datepicker table tr td.range.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.range.highlighted.focus { background-color: #e4eef3; border-color: #9dc1d3; } .datepicker table tr td.range.highlighted.focused { background: #c1d7e3; } .datepicker table tr td.range.highlighted.disabled, .datepicker table tr td.range.highlighted.disabled:active { background: #e4eef3; color: #777777; } .datepicker table tr td.range.today { color: #000; background-color: #f7ca77; border-color: #f1a417; } .datepicker table tr td.range.today:focus, .datepicker table tr td.range.today.focus { color: #000; background-color: #f4b747; border-color: #815608; } .datepicker table tr td.range.today:hover { color: #000; background-color: #f4b747; border-color: #bf800c; } .datepicker table tr td.range.today:active, .datepicker table tr td.range.today.active { color: #000; background-color: #f4b747; border-color: #bf800c; } .datepicker table tr td.range.today:active:hover, .datepicker table tr td.range.today.active:hover, .datepicker table tr td.range.today:active:focus, .datepicker table tr td.range.today.active:focus, .datepicker table tr td.range.today:active.focus, .datepicker table tr td.range.today.active.focus { color: #000; background-color: #f2aa25; border-color: #815608; } .datepicker table tr td.range.today.disabled:hover, .datepicker table tr td.range.today[disabled]:hover, fieldset[disabled] .datepicker table tr td.range.today:hover, .datepicker table tr td.range.today.disabled:focus, .datepicker table tr td.range.today[disabled]:focus, fieldset[disabled] .datepicker table tr td.range.today:focus, .datepicker table tr td.range.today.disabled.focus, .datepicker table tr td.range.today[disabled].focus, fieldset[disabled] .datepicker table tr td.range.today.focus { background-color: #f7ca77; border-color: #f1a417; } .datepicker table tr td.range.today.disabled, .datepicker table tr td.range.today.disabled:active { background: #f7ca77; color: #777777; } .datepicker table tr td.selected, .datepicker table tr td.selected.highlighted { color: #fff; background-color: #777777; border-color: #555555; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.selected:focus, .datepicker table tr td.selected.highlighted:focus, .datepicker table tr td.selected.focus, .datepicker table tr td.selected.highlighted.focus { color: #fff; background-color: #5e5e5e; border-color: #161616; } .datepicker table tr td.selected:hover, .datepicker table tr td.selected.highlighted:hover { color: #fff; background-color: #5e5e5e; border-color: #373737; } .datepicker table tr td.selected:active, .datepicker table tr td.selected.highlighted:active, .datepicker table tr td.selected.active, .datepicker table tr td.selected.highlighted.active { color: #fff; background-color: #5e5e5e; border-color: #373737; } .datepicker table tr td.selected:active:hover, .datepicker table tr td.selected.highlighted:active:hover, .datepicker table tr td.selected.active:hover, .datepicker table tr td.selected.highlighted.active:hover, .datepicker table tr td.selected:active:focus, .datepicker table tr td.selected.highlighted:active:focus, .datepicker table tr td.selected.active:focus, .datepicker table tr td.selected.highlighted.active:focus, .datepicker table tr td.selected:active.focus, .datepicker table tr td.selected.highlighted:active.focus, .datepicker table tr td.selected.active.focus, .datepicker table tr td.selected.highlighted.active.focus { color: #fff; background-color: #4c4c4c; border-color: #161616; } .datepicker table tr td.selected.disabled:hover, .datepicker table tr td.selected.highlighted.disabled:hover, .datepicker table tr td.selected[disabled]:hover, .datepicker table tr td.selected.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.selected:hover, fieldset[disabled] .datepicker table tr td.selected.highlighted:hover, .datepicker table tr td.selected.disabled:focus, .datepicker table tr td.selected.highlighted.disabled:focus, .datepicker table tr td.selected[disabled]:focus, .datepicker table tr td.selected.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.selected:focus, fieldset[disabled] .datepicker table tr td.selected.highlighted:focus, .datepicker table tr td.selected.disabled.focus, .datepicker table tr td.selected.highlighted.disabled.focus, .datepicker table tr td.selected[disabled].focus, .datepicker table tr td.selected.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.selected.focus, fieldset[disabled] .datepicker table tr td.selected.highlighted.focus { background-color: #777777; border-color: #555555; } .datepicker table tr td.active, .datepicker table tr td.active.highlighted { color: #fff; background-color: #337ab7; border-color: #2e6da4; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.active:focus, .datepicker table tr td.active.highlighted:focus, .datepicker table tr td.active.focus, .datepicker table tr td.active.highlighted.focus { color: #fff; background-color: #286090; border-color: #122b40; } .datepicker table tr td.active:hover, .datepicker table tr td.active.highlighted:hover { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td.active:active, .datepicker table tr td.active.highlighted:active, .datepicker table tr td.active.active, .datepicker table tr td.active.highlighted.active { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td.active:active:hover, .datepicker table tr td.active.highlighted:active:hover, .datepicker table tr td.active.active:hover, .datepicker table tr td.active.highlighted.active:hover, .datepicker table tr td.active:active:focus, .datepicker table tr td.active.highlighted:active:focus, .datepicker table tr td.active.active:focus, .datepicker table tr td.active.highlighted.active:focus, .datepicker table tr td.active:active.focus, .datepicker table tr td.active.highlighted:active.focus, .datepicker table tr td.active.active.focus, .datepicker table tr td.active.highlighted.active.focus { color: #fff; background-color: #204d74; border-color: #122b40; } .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active.highlighted.disabled:hover, .datepicker table tr td.active[disabled]:hover, .datepicker table tr td.active.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.active:hover, fieldset[disabled] .datepicker table tr td.active.highlighted:hover, .datepicker table tr td.active.disabled:focus, .datepicker table tr td.active.highlighted.disabled:focus, .datepicker table tr td.active[disabled]:focus, .datepicker table tr td.active.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.active:focus, fieldset[disabled] .datepicker table tr td.active.highlighted:focus, .datepicker table tr td.active.disabled.focus, .datepicker table tr td.active.highlighted.disabled.focus, .datepicker table tr td.active[disabled].focus, .datepicker table tr td.active.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.active.focus, fieldset[disabled] .datepicker table tr td.active.highlighted.focus { background-color: #337ab7; border-color: #2e6da4; } .datepicker table tr td span { display: block; width: 23%; height: 54px; line-height: 54px; float: left; margin: 1%; cursor: pointer; border-radius: 4px; } .datepicker table tr td span:hover, .datepicker table tr td span.focused { background: #eeeeee; } .datepicker table tr td span.disabled, .datepicker table tr td span.disabled:hover { background: none; color: #777777; cursor: default; } .datepicker table tr td span.active, .datepicker table tr td span.active:hover, .datepicker table tr td span.active.disabled, .datepicker table tr td span.active.disabled:hover { color: #fff; background-color: #337ab7; border-color: #2e6da4; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td span.active:focus, .datepicker table tr td span.active:hover:focus, .datepicker table tr td span.active.disabled:focus, .datepicker table tr td span.active.disabled:hover:focus, .datepicker table tr td span.active.focus, .datepicker table tr td span.active:hover.focus, .datepicker table tr td span.active.disabled.focus, .datepicker table tr td span.active.disabled:hover.focus { color: #fff; background-color: #286090; border-color: #122b40; } .datepicker table tr td span.active:hover, .datepicker table tr td span.active:hover:hover, .datepicker table tr td span.active.disabled:hover, .datepicker table tr td span.active.disabled:hover:hover { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td span.active:active, .datepicker table tr td span.active:hover:active, .datepicker table tr td span.active.disabled:active, .datepicker table tr td span.active.disabled:hover:active, .datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active, .datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td span.active:active:hover, .datepicker table tr td span.active:hover:active:hover, .datepicker table tr td span.active.disabled:active:hover, .datepicker table tr td span.active.disabled:hover:active:hover, .datepicker table tr td span.active.active:hover, .datepicker table tr td span.active:hover.active:hover, .datepicker table tr td span.active.disabled.active:hover, .datepicker table tr td span.active.disabled:hover.active:hover, .datepicker table tr td span.active:active:focus, .datepicker table tr td span.active:hover:active:focus, .datepicker table tr td span.active.disabled:active:focus, .datepicker table tr td span.active.disabled:hover:active:focus, .datepicker table tr td span.active.active:focus, .datepicker table tr td span.active:hover.active:focus, .datepicker table tr td span.active.disabled.active:focus, .datepicker table tr td span.active.disabled:hover.active:focus, .datepicker table tr td span.active:active.focus, .datepicker table tr td span.active:hover:active.focus, .datepicker table tr td span.active.disabled:active.focus, .datepicker table tr td span.active.disabled:hover:active.focus, .datepicker table tr td span.active.active.focus, .datepicker table tr td span.active:hover.active.focus, .datepicker table tr td span.active.disabled.active.focus, .datepicker table tr td span.active.disabled:hover.active.focus { color: #fff; background-color: #204d74; border-color: #122b40; } .datepicker table tr td span.active.disabled:hover, .datepicker table tr td span.active:hover.disabled:hover, .datepicker table tr td span.active.disabled.disabled:hover, .datepicker table tr td span.active.disabled:hover.disabled:hover, .datepicker table tr td span.active[disabled]:hover, .datepicker table tr td span.active:hover[disabled]:hover, .datepicker table tr td span.active.disabled[disabled]:hover, .datepicker table tr td span.active.disabled:hover[disabled]:hover, fieldset[disabled] .datepicker table tr td span.active:hover, fieldset[disabled] .datepicker table tr td span.active:hover:hover, fieldset[disabled] .datepicker table tr td span.active.disabled:hover, fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover, .datepicker table tr td span.active.disabled:focus, .datepicker table tr td span.active:hover.disabled:focus, .datepicker table tr td span.active.disabled.disabled:focus, .datepicker table tr td span.active.disabled:hover.disabled:focus, .datepicker table tr td span.active[disabled]:focus, .datepicker table tr td span.active:hover[disabled]:focus, .datepicker table tr td span.active.disabled[disabled]:focus, .datepicker table tr td span.active.disabled:hover[disabled]:focus, fieldset[disabled] .datepicker table tr td span.active:focus, fieldset[disabled] .datepicker table tr td span.active:hover:focus, fieldset[disabled] .datepicker table tr td span.active.disabled:focus, fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus, .datepicker table tr td span.active.disabled.focus, .datepicker table tr td span.active:hover.disabled.focus, .datepicker table tr td span.active.disabled.disabled.focus, .datepicker table tr td span.active.disabled:hover.disabled.focus, .datepicker table tr td span.active[disabled].focus, .datepicker table tr td span.active:hover[disabled].focus, .datepicker table tr td span.active.disabled[disabled].focus, .datepicker table tr td span.active.disabled:hover[disabled].focus, fieldset[disabled] .datepicker table tr td span.active.focus, fieldset[disabled] .datepicker table tr td span.active:hover.focus, fieldset[disabled] .datepicker table tr td span.active.disabled.focus, fieldset[disabled] .datepicker table tr td span.active.disabled:hover.focus { background-color: #337ab7; border-color: #2e6da4; } .datepicker table tr td span.old, .datepicker table tr td span.new { color: #777777; } .datepicker .datepicker-switch { width: 145px; } .datepicker .datepicker-switch, .datepicker .prev, .datepicker .next, .datepicker tfoot tr th { cursor: pointer; } .datepicker .datepicker-switch:hover, .datepicker .prev:hover, .datepicker .next:hover, .datepicker tfoot tr th:hover { background: #eeeeee; } .datepicker .prev.disabled, .datepicker .next.disabled { visibility: hidden; } .datepicker .cw { font-size: 10px; width: 12px; padding: 0 2px 0 5px; vertical-align: middle; } .input-group.date .input-group-addon { cursor: pointer; } .input-daterange { width: 100%; } .input-daterange input { text-align: center; } .input-daterange input:first-child { border-radius: 3px 0 0 3px; } .input-daterange input:last-child { border-radius: 0 3px 3px 0; } .input-daterange .input-group-addon { width: auto; min-width: 16px; padding: 4px 5px; line-height: 1.42857143; border-width: 1px 0; margin-left: -5px; margin-right: -5px; } /*# sourceMappingURL=bootstrap-datepicker3.css.map */ ================================================ FILE: dist/css/bootstrap-datepicker3.standalone.css ================================================ /*! * Datepicker for Bootstrap v1.10.0 (https://github.com/uxsolutions/bootstrap-datepicker) * * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0) */ .datepicker { border-radius: 4px; direction: ltr; } .datepicker-inline { width: 220px; } .datepicker-rtl { direction: rtl; } .datepicker-rtl.dropdown-menu { left: auto; } .datepicker-rtl table tr td span { float: right; } .datepicker-dropdown { top: 0; left: 0; padding: 4px; } .datepicker-dropdown:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid rgba(0, 0, 0, 0.15); border-top: 0; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; } .datepicker-dropdown:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; border-top: 0; position: absolute; } .datepicker-dropdown.datepicker-orient-left:before { left: 6px; } .datepicker-dropdown.datepicker-orient-left:after { left: 7px; } .datepicker-dropdown.datepicker-orient-right:before { right: 6px; } .datepicker-dropdown.datepicker-orient-right:after { right: 7px; } .datepicker-dropdown.datepicker-orient-bottom:before { top: -7px; } .datepicker-dropdown.datepicker-orient-bottom:after { top: -6px; } .datepicker-dropdown.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid rgba(0, 0, 0, 0.15); } .datepicker-dropdown.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid #fff; } .datepicker table { margin: 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .datepicker table tr td, .datepicker table tr th { text-align: center; width: 30px; height: 30px; border-radius: 4px; border: none; } .table-striped .datepicker table tr td, .table-striped .datepicker table tr th { background-color: transparent; } .datepicker table tr td.old, .datepicker table tr td.new { color: #777777; } .datepicker table tr td.day:hover, .datepicker table tr td.focused { background: #eeeeee; cursor: pointer; } .datepicker table tr td.disabled, .datepicker table tr td.disabled:hover { background: none; color: #777777; cursor: default; } .datepicker table tr td.highlighted { color: #000; background-color: #d9edf7; border-color: #85c5e5; border-radius: 0; } .datepicker table tr td.highlighted:focus, .datepicker table tr td.highlighted.focus { color: #000; background-color: #afd9ee; border-color: #298fc2; } .datepicker table tr td.highlighted:hover { color: #000; background-color: #afd9ee; border-color: #52addb; } .datepicker table tr td.highlighted:active, .datepicker table tr td.highlighted.active { color: #000; background-color: #afd9ee; border-color: #52addb; } .datepicker table tr td.highlighted:active:hover, .datepicker table tr td.highlighted.active:hover, .datepicker table tr td.highlighted:active:focus, .datepicker table tr td.highlighted.active:focus, .datepicker table tr td.highlighted:active.focus, .datepicker table tr td.highlighted.active.focus { color: #000; background-color: #91cbe8; border-color: #298fc2; } .datepicker table tr td.highlighted.disabled:hover, .datepicker table tr td.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.highlighted:hover, .datepicker table tr td.highlighted.disabled:focus, .datepicker table tr td.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.highlighted:focus, .datepicker table tr td.highlighted.disabled.focus, .datepicker table tr td.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.highlighted.focus { background-color: #d9edf7; border-color: #85c5e5; } .datepicker table tr td.highlighted.focused { background: #afd9ee; } .datepicker table tr td.highlighted.disabled, .datepicker table tr td.highlighted.disabled:active { background: #d9edf7; color: #777777; } .datepicker table tr td.today { color: #000; background-color: #ffdb99; border-color: #ffb733; } .datepicker table tr td.today:focus, .datepicker table tr td.today.focus { color: #000; background-color: #ffc966; border-color: #b37400; } .datepicker table tr td.today:hover { color: #000; background-color: #ffc966; border-color: #f59e00; } .datepicker table tr td.today:active, .datepicker table tr td.today.active { color: #000; background-color: #ffc966; border-color: #f59e00; } .datepicker table tr td.today:active:hover, .datepicker table tr td.today.active:hover, .datepicker table tr td.today:active:focus, .datepicker table tr td.today.active:focus, .datepicker table tr td.today:active.focus, .datepicker table tr td.today.active.focus { color: #000; background-color: #ffbc42; border-color: #b37400; } .datepicker table tr td.today.disabled:hover, .datepicker table tr td.today[disabled]:hover, fieldset[disabled] .datepicker table tr td.today:hover, .datepicker table tr td.today.disabled:focus, .datepicker table tr td.today[disabled]:focus, fieldset[disabled] .datepicker table tr td.today:focus, .datepicker table tr td.today.disabled.focus, .datepicker table tr td.today[disabled].focus, fieldset[disabled] .datepicker table tr td.today.focus { background-color: #ffdb99; border-color: #ffb733; } .datepicker table tr td.today.focused { background: #ffc966; } .datepicker table tr td.today.disabled, .datepicker table tr td.today.disabled:active { background: #ffdb99; color: #777777; } .datepicker table tr td.range { color: #000; background-color: #eeeeee; border-color: #bbbbbb; border-radius: 0; } .datepicker table tr td.range:focus, .datepicker table tr td.range.focus { color: #000; background-color: #d5d5d5; border-color: #7c7c7c; } .datepicker table tr td.range:hover { color: #000; background-color: #d5d5d5; border-color: #9d9d9d; } .datepicker table tr td.range:active, .datepicker table tr td.range.active { color: #000; background-color: #d5d5d5; border-color: #9d9d9d; } .datepicker table tr td.range:active:hover, .datepicker table tr td.range.active:hover, .datepicker table tr td.range:active:focus, .datepicker table tr td.range.active:focus, .datepicker table tr td.range:active.focus, .datepicker table tr td.range.active.focus { color: #000; background-color: #c3c3c3; border-color: #7c7c7c; } .datepicker table tr td.range.disabled:hover, .datepicker table tr td.range[disabled]:hover, fieldset[disabled] .datepicker table tr td.range:hover, .datepicker table tr td.range.disabled:focus, .datepicker table tr td.range[disabled]:focus, fieldset[disabled] .datepicker table tr td.range:focus, .datepicker table tr td.range.disabled.focus, .datepicker table tr td.range[disabled].focus, fieldset[disabled] .datepicker table tr td.range.focus { background-color: #eeeeee; border-color: #bbbbbb; } .datepicker table tr td.range.focused { background: #d5d5d5; } .datepicker table tr td.range.disabled, .datepicker table tr td.range.disabled:active { background: #eeeeee; color: #777777; } .datepicker table tr td.range.highlighted { color: #000; background-color: #e4eef3; border-color: #9dc1d3; } .datepicker table tr td.range.highlighted:focus, .datepicker table tr td.range.highlighted.focus { color: #000; background-color: #c1d7e3; border-color: #4b88a6; } .datepicker table tr td.range.highlighted:hover { color: #000; background-color: #c1d7e3; border-color: #73a6c0; } .datepicker table tr td.range.highlighted:active, .datepicker table tr td.range.highlighted.active { color: #000; background-color: #c1d7e3; border-color: #73a6c0; } .datepicker table tr td.range.highlighted:active:hover, .datepicker table tr td.range.highlighted.active:hover, .datepicker table tr td.range.highlighted:active:focus, .datepicker table tr td.range.highlighted.active:focus, .datepicker table tr td.range.highlighted:active.focus, .datepicker table tr td.range.highlighted.active.focus { color: #000; background-color: #a8c8d8; border-color: #4b88a6; } .datepicker table tr td.range.highlighted.disabled:hover, .datepicker table tr td.range.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.range.highlighted:hover, .datepicker table tr td.range.highlighted.disabled:focus, .datepicker table tr td.range.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.range.highlighted:focus, .datepicker table tr td.range.highlighted.disabled.focus, .datepicker table tr td.range.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.range.highlighted.focus { background-color: #e4eef3; border-color: #9dc1d3; } .datepicker table tr td.range.highlighted.focused { background: #c1d7e3; } .datepicker table tr td.range.highlighted.disabled, .datepicker table tr td.range.highlighted.disabled:active { background: #e4eef3; color: #777777; } .datepicker table tr td.range.today { color: #000; background-color: #f7ca77; border-color: #f1a417; } .datepicker table tr td.range.today:focus, .datepicker table tr td.range.today.focus { color: #000; background-color: #f4b747; border-color: #815608; } .datepicker table tr td.range.today:hover { color: #000; background-color: #f4b747; border-color: #bf800c; } .datepicker table tr td.range.today:active, .datepicker table tr td.range.today.active { color: #000; background-color: #f4b747; border-color: #bf800c; } .datepicker table tr td.range.today:active:hover, .datepicker table tr td.range.today.active:hover, .datepicker table tr td.range.today:active:focus, .datepicker table tr td.range.today.active:focus, .datepicker table tr td.range.today:active.focus, .datepicker table tr td.range.today.active.focus { color: #000; background-color: #f2aa25; border-color: #815608; } .datepicker table tr td.range.today.disabled:hover, .datepicker table tr td.range.today[disabled]:hover, fieldset[disabled] .datepicker table tr td.range.today:hover, .datepicker table tr td.range.today.disabled:focus, .datepicker table tr td.range.today[disabled]:focus, fieldset[disabled] .datepicker table tr td.range.today:focus, .datepicker table tr td.range.today.disabled.focus, .datepicker table tr td.range.today[disabled].focus, fieldset[disabled] .datepicker table tr td.range.today.focus { background-color: #f7ca77; border-color: #f1a417; } .datepicker table tr td.range.today.disabled, .datepicker table tr td.range.today.disabled:active { background: #f7ca77; color: #777777; } .datepicker table tr td.selected, .datepicker table tr td.selected.highlighted { color: #fff; background-color: #777777; border-color: #555555; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.selected:focus, .datepicker table tr td.selected.highlighted:focus, .datepicker table tr td.selected.focus, .datepicker table tr td.selected.highlighted.focus { color: #fff; background-color: #5e5e5e; border-color: #161616; } .datepicker table tr td.selected:hover, .datepicker table tr td.selected.highlighted:hover { color: #fff; background-color: #5e5e5e; border-color: #373737; } .datepicker table tr td.selected:active, .datepicker table tr td.selected.highlighted:active, .datepicker table tr td.selected.active, .datepicker table tr td.selected.highlighted.active { color: #fff; background-color: #5e5e5e; border-color: #373737; } .datepicker table tr td.selected:active:hover, .datepicker table tr td.selected.highlighted:active:hover, .datepicker table tr td.selected.active:hover, .datepicker table tr td.selected.highlighted.active:hover, .datepicker table tr td.selected:active:focus, .datepicker table tr td.selected.highlighted:active:focus, .datepicker table tr td.selected.active:focus, .datepicker table tr td.selected.highlighted.active:focus, .datepicker table tr td.selected:active.focus, .datepicker table tr td.selected.highlighted:active.focus, .datepicker table tr td.selected.active.focus, .datepicker table tr td.selected.highlighted.active.focus { color: #fff; background-color: #4c4c4c; border-color: #161616; } .datepicker table tr td.selected.disabled:hover, .datepicker table tr td.selected.highlighted.disabled:hover, .datepicker table tr td.selected[disabled]:hover, .datepicker table tr td.selected.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.selected:hover, fieldset[disabled] .datepicker table tr td.selected.highlighted:hover, .datepicker table tr td.selected.disabled:focus, .datepicker table tr td.selected.highlighted.disabled:focus, .datepicker table tr td.selected[disabled]:focus, .datepicker table tr td.selected.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.selected:focus, fieldset[disabled] .datepicker table tr td.selected.highlighted:focus, .datepicker table tr td.selected.disabled.focus, .datepicker table tr td.selected.highlighted.disabled.focus, .datepicker table tr td.selected[disabled].focus, .datepicker table tr td.selected.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.selected.focus, fieldset[disabled] .datepicker table tr td.selected.highlighted.focus { background-color: #777777; border-color: #555555; } .datepicker table tr td.active, .datepicker table tr td.active.highlighted { color: #fff; background-color: #337ab7; border-color: #2e6da4; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td.active:focus, .datepicker table tr td.active.highlighted:focus, .datepicker table tr td.active.focus, .datepicker table tr td.active.highlighted.focus { color: #fff; background-color: #286090; border-color: #122b40; } .datepicker table tr td.active:hover, .datepicker table tr td.active.highlighted:hover { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td.active:active, .datepicker table tr td.active.highlighted:active, .datepicker table tr td.active.active, .datepicker table tr td.active.highlighted.active { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td.active:active:hover, .datepicker table tr td.active.highlighted:active:hover, .datepicker table tr td.active.active:hover, .datepicker table tr td.active.highlighted.active:hover, .datepicker table tr td.active:active:focus, .datepicker table tr td.active.highlighted:active:focus, .datepicker table tr td.active.active:focus, .datepicker table tr td.active.highlighted.active:focus, .datepicker table tr td.active:active.focus, .datepicker table tr td.active.highlighted:active.focus, .datepicker table tr td.active.active.focus, .datepicker table tr td.active.highlighted.active.focus { color: #fff; background-color: #204d74; border-color: #122b40; } .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active.highlighted.disabled:hover, .datepicker table tr td.active[disabled]:hover, .datepicker table tr td.active.highlighted[disabled]:hover, fieldset[disabled] .datepicker table tr td.active:hover, fieldset[disabled] .datepicker table tr td.active.highlighted:hover, .datepicker table tr td.active.disabled:focus, .datepicker table tr td.active.highlighted.disabled:focus, .datepicker table tr td.active[disabled]:focus, .datepicker table tr td.active.highlighted[disabled]:focus, fieldset[disabled] .datepicker table tr td.active:focus, fieldset[disabled] .datepicker table tr td.active.highlighted:focus, .datepicker table tr td.active.disabled.focus, .datepicker table tr td.active.highlighted.disabled.focus, .datepicker table tr td.active[disabled].focus, .datepicker table tr td.active.highlighted[disabled].focus, fieldset[disabled] .datepicker table tr td.active.focus, fieldset[disabled] .datepicker table tr td.active.highlighted.focus { background-color: #337ab7; border-color: #2e6da4; } .datepicker table tr td span { display: block; width: 23%; height: 54px; line-height: 54px; float: left; margin: 1%; cursor: pointer; border-radius: 4px; } .datepicker table tr td span:hover, .datepicker table tr td span.focused { background: #eeeeee; } .datepicker table tr td span.disabled, .datepicker table tr td span.disabled:hover { background: none; color: #777777; cursor: default; } .datepicker table tr td span.active, .datepicker table tr td span.active:hover, .datepicker table tr td span.active.disabled, .datepicker table tr td span.active.disabled:hover { color: #fff; background-color: #337ab7; border-color: #2e6da4; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker table tr td span.active:focus, .datepicker table tr td span.active:hover:focus, .datepicker table tr td span.active.disabled:focus, .datepicker table tr td span.active.disabled:hover:focus, .datepicker table tr td span.active.focus, .datepicker table tr td span.active:hover.focus, .datepicker table tr td span.active.disabled.focus, .datepicker table tr td span.active.disabled:hover.focus { color: #fff; background-color: #286090; border-color: #122b40; } .datepicker table tr td span.active:hover, .datepicker table tr td span.active:hover:hover, .datepicker table tr td span.active.disabled:hover, .datepicker table tr td span.active.disabled:hover:hover { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td span.active:active, .datepicker table tr td span.active:hover:active, .datepicker table tr td span.active.disabled:active, .datepicker table tr td span.active.disabled:hover:active, .datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active, .datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active { color: #fff; background-color: #286090; border-color: #204d74; } .datepicker table tr td span.active:active:hover, .datepicker table tr td span.active:hover:active:hover, .datepicker table tr td span.active.disabled:active:hover, .datepicker table tr td span.active.disabled:hover:active:hover, .datepicker table tr td span.active.active:hover, .datepicker table tr td span.active:hover.active:hover, .datepicker table tr td span.active.disabled.active:hover, .datepicker table tr td span.active.disabled:hover.active:hover, .datepicker table tr td span.active:active:focus, .datepicker table tr td span.active:hover:active:focus, .datepicker table tr td span.active.disabled:active:focus, .datepicker table tr td span.active.disabled:hover:active:focus, .datepicker table tr td span.active.active:focus, .datepicker table tr td span.active:hover.active:focus, .datepicker table tr td span.active.disabled.active:focus, .datepicker table tr td span.active.disabled:hover.active:focus, .datepicker table tr td span.active:active.focus, .datepicker table tr td span.active:hover:active.focus, .datepicker table tr td span.active.disabled:active.focus, .datepicker table tr td span.active.disabled:hover:active.focus, .datepicker table tr td span.active.active.focus, .datepicker table tr td span.active:hover.active.focus, .datepicker table tr td span.active.disabled.active.focus, .datepicker table tr td span.active.disabled:hover.active.focus { color: #fff; background-color: #204d74; border-color: #122b40; } .datepicker table tr td span.active.disabled:hover, .datepicker table tr td span.active:hover.disabled:hover, .datepicker table tr td span.active.disabled.disabled:hover, .datepicker table tr td span.active.disabled:hover.disabled:hover, .datepicker table tr td span.active[disabled]:hover, .datepicker table tr td span.active:hover[disabled]:hover, .datepicker table tr td span.active.disabled[disabled]:hover, .datepicker table tr td span.active.disabled:hover[disabled]:hover, fieldset[disabled] .datepicker table tr td span.active:hover, fieldset[disabled] .datepicker table tr td span.active:hover:hover, fieldset[disabled] .datepicker table tr td span.active.disabled:hover, fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover, .datepicker table tr td span.active.disabled:focus, .datepicker table tr td span.active:hover.disabled:focus, .datepicker table tr td span.active.disabled.disabled:focus, .datepicker table tr td span.active.disabled:hover.disabled:focus, .datepicker table tr td span.active[disabled]:focus, .datepicker table tr td span.active:hover[disabled]:focus, .datepicker table tr td span.active.disabled[disabled]:focus, .datepicker table tr td span.active.disabled:hover[disabled]:focus, fieldset[disabled] .datepicker table tr td span.active:focus, fieldset[disabled] .datepicker table tr td span.active:hover:focus, fieldset[disabled] .datepicker table tr td span.active.disabled:focus, fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus, .datepicker table tr td span.active.disabled.focus, .datepicker table tr td span.active:hover.disabled.focus, .datepicker table tr td span.active.disabled.disabled.focus, .datepicker table tr td span.active.disabled:hover.disabled.focus, .datepicker table tr td span.active[disabled].focus, .datepicker table tr td span.active:hover[disabled].focus, .datepicker table tr td span.active.disabled[disabled].focus, .datepicker table tr td span.active.disabled:hover[disabled].focus, fieldset[disabled] .datepicker table tr td span.active.focus, fieldset[disabled] .datepicker table tr td span.active:hover.focus, fieldset[disabled] .datepicker table tr td span.active.disabled.focus, fieldset[disabled] .datepicker table tr td span.active.disabled:hover.focus { background-color: #337ab7; border-color: #2e6da4; } .datepicker table tr td span.old, .datepicker table tr td span.new { color: #777777; } .datepicker .datepicker-switch { width: 145px; } .datepicker .datepicker-switch, .datepicker .prev, .datepicker .next, .datepicker tfoot tr th { cursor: pointer; } .datepicker .datepicker-switch:hover, .datepicker .prev:hover, .datepicker .next:hover, .datepicker tfoot tr th:hover { background: #eeeeee; } .datepicker .prev.disabled, .datepicker .next.disabled { visibility: hidden; } .datepicker .cw { font-size: 10px; width: 12px; padding: 0 2px 0 5px; vertical-align: middle; } .input-group.date .input-group-addon { cursor: pointer; } .input-daterange { width: 100%; } .input-daterange input { text-align: center; } .input-daterange input:first-child { border-radius: 3px 0 0 3px; } .input-daterange input:last-child { border-radius: 0 3px 3px 0; } .input-daterange .input-group-addon { width: auto; min-width: 16px; padding: 4px 5px; line-height: 1.42857143; border-width: 1px 0; margin-left: -5px; margin-right: -5px; } .datepicker.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; list-style: none; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; color: #333333; font-size: 13px; line-height: 1.42857143; } .datepicker.dropdown-menu th, .datepicker.datepicker-inline th, .datepicker.dropdown-menu td, .datepicker.datepicker-inline td { padding: 0px 5px; } /*# sourceMappingURL=bootstrap-datepicker3.standalone.css.map */ ================================================ FILE: dist/js/bootstrap-datepicker.js ================================================ /*! * Datepicker for Bootstrap v1.10.0 (https://github.com/uxsolutions/bootstrap-datepicker) * * Licensed under the Apache License v2.0 (https://www.apache.org/licenses/LICENSE-2.0) */ (function(factory){ if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports === 'object') { factory(require('jquery')); } else { factory(jQuery); } }(function($, undefined){ function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } function UTCToday(){ var today = new Date(); return UTCDate(today.getFullYear(), today.getMonth(), today.getDate()); } function isUTCEquals(date1, date2) { return ( date1.getUTCFullYear() === date2.getUTCFullYear() && date1.getUTCMonth() === date2.getUTCMonth() && date1.getUTCDate() === date2.getUTCDate() ); } function alias(method, deprecationMsg){ return function(){ if (deprecationMsg !== undefined) { $.fn.datepicker.deprecated(deprecationMsg); } return this[method].apply(this, arguments); }; } function isValidDate(d) { return d && !isNaN(d.getTime()); } var DateArray = (function(){ var extras = { get: function(i){ return this.slice(i)[0]; }, contains: function(d){ // Array.indexOf is not cross-browser; // $.inArray doesn't work with Dates var val = d && d.valueOf(); for (var i=0, l=this.length; i < l; i++) // Use date arithmetic to allow dates with different times to match if (0 <= this[i].valueOf() - val && this[i].valueOf() - val < 1000*60*60*24) return i; return -1; }, remove: function(i){ this.splice(i,1); }, replace: function(new_array){ if (!new_array) return; if (!Array.isArray(new_array)) new_array = [new_array]; this.clear(); this.push.apply(this, new_array); }, clear: function(){ this.length = 0; }, copy: function(){ var a = new DateArray(); a.replace(this); return a; } }; return function(){ var a = []; a.push.apply(a, arguments); $.extend(a, extras); return a; }; })(); // Picker object var Datepicker = function(element, options){ $.data(element, 'datepicker', this); this._events = []; this._secondaryEvents = []; this._process_options(options); this.dates = new DateArray(); this.viewDate = this.o.defaultViewDate; this.focusDate = null; this.element = $(element); this.isInput = this.element.is('input'); this.inputField = this.isInput ? this.element : this.element.find('input'); this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn') : false; if (this.component && this.component.length === 0){ this.component = false; } if (this.o.isInline === null){ this.isInline = !this.component && !this.isInput; } else { this.isInline = this.o.isInline; } this.picker = $(DPGlobal.template); // Checking templates and inserting if (this._check_template(this.o.templates.leftArrow)) { this.picker.find('.prev').html(this.o.templates.leftArrow); } if (this._check_template(this.o.templates.rightArrow)) { this.picker.find('.next').html(this.o.templates.rightArrow); } this._buildEvents(); this._attachEvents(); if (this.isInline){ this.picker.addClass('datepicker-inline').appendTo(this.element); } else { this.picker.addClass('datepicker-dropdown dropdown-menu'); } if (this.o.rtl){ this.picker.addClass('datepicker-rtl'); } if (this.o.calendarWeeks) { this.picker.find('.datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear') .attr('colspan', function(i, val){ return Number(val) + 1; }); } this._process_options({ startDate: this._o.startDate, endDate: this._o.endDate, daysOfWeekDisabled: this.o.daysOfWeekDisabled, daysOfWeekHighlighted: this.o.daysOfWeekHighlighted, datesDisabled: this.o.datesDisabled }); this._allow_update = false; this.setViewMode(this.o.startView); this._allow_update = true; this.fillDow(); this.fillMonths(); this.update(); if (this.isInline){ this.show(); } }; Datepicker.prototype = { constructor: Datepicker, _resolveViewName: function(view){ $.each(DPGlobal.viewModes, function(i, viewMode){ if (view === i || $.inArray(view, viewMode.names) !== -1){ view = i; return false; } }); return view; }, _resolveDaysOfWeek: function(daysOfWeek){ if (!Array.isArray(daysOfWeek)) daysOfWeek = daysOfWeek.split(/[,\s]*/); return $.map(daysOfWeek, Number); }, _check_template: function(tmp){ try { // If empty if (tmp === undefined || tmp === "") { return false; } // If no html, everything ok if ((tmp.match(/[<>]/g) || []).length <= 0) { return true; } // Checking if html is fine var jDom = $(tmp); return jDom.length > 0; } catch (ex) { return false; } }, _process_options: function(opts){ // Store raw options for reference this._o = $.extend({}, this._o, opts); // Processed options var o = this.o = $.extend({}, this._o); // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" var lang = o.language; if (!dates[lang]){ lang = lang.split('-')[0]; if (!dates[lang]) lang = defaults.language; } o.language = lang; // Retrieve view index from any aliases o.startView = this._resolveViewName(o.startView); o.minViewMode = this._resolveViewName(o.minViewMode); o.maxViewMode = this._resolveViewName(o.maxViewMode); // Check view is between min and max o.startView = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, o.startView)); // true, false, or Number > 0 if (o.multidate !== true){ o.multidate = Number(o.multidate) || false; if (o.multidate !== false) o.multidate = Math.max(0, o.multidate); } o.multidateSeparator = String(o.multidateSeparator); o.weekStart %= 7; o.weekEnd = (o.weekStart + 6) % 7; var format = DPGlobal.parseFormat(o.format); if (o.startDate !== -Infinity){ if (!!o.startDate){ if (o.startDate instanceof Date) o.startDate = this._local_to_utc(this._zero_time(o.startDate)); else o.startDate = DPGlobal.parseDate(o.startDate, format, o.language, o.assumeNearbyYear); } else { o.startDate = -Infinity; } } if (o.endDate !== Infinity){ if (!!o.endDate){ if (o.endDate instanceof Date) o.endDate = this._local_to_utc(this._zero_time(o.endDate)); else o.endDate = DPGlobal.parseDate(o.endDate, format, o.language, o.assumeNearbyYear); } else { o.endDate = Infinity; } } o.daysOfWeekDisabled = this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]); o.daysOfWeekHighlighted = this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]); o.datesDisabled = o.datesDisabled||[]; if (!Array.isArray(o.datesDisabled)) { o.datesDisabled = o.datesDisabled.split(','); } o.datesDisabled = $.map(o.datesDisabled, function(d){ return DPGlobal.parseDate(d, format, o.language, o.assumeNearbyYear); }); var plc = String(o.orientation).toLowerCase().split(/\s+/g), _plc = o.orientation.toLowerCase(); plc = $.grep(plc, function(word){ return /^auto|left|right|top|bottom$/.test(word); }); o.orientation = {x: 'auto', y: 'auto'}; if (!_plc || _plc === 'auto') ; // no action else if (plc.length === 1){ switch (plc[0]){ case 'top': case 'bottom': o.orientation.y = plc[0]; break; case 'left': case 'right': o.orientation.x = plc[0]; break; } } else { _plc = $.grep(plc, function(word){ return /^left|right$/.test(word); }); o.orientation.x = _plc[0] || 'auto'; _plc = $.grep(plc, function(word){ return /^top|bottom$/.test(word); }); o.orientation.y = _plc[0] || 'auto'; } if (o.defaultViewDate instanceof Date || typeof o.defaultViewDate === 'string') { o.defaultViewDate = DPGlobal.parseDate(o.defaultViewDate, format, o.language, o.assumeNearbyYear); } else if (o.defaultViewDate) { var year = o.defaultViewDate.year || new Date().getFullYear(); var month = o.defaultViewDate.month || 0; var day = o.defaultViewDate.day || 1; o.defaultViewDate = UTCDate(year, month, day); } else { o.defaultViewDate = UTCToday(); } }, _applyEvents: function(evs){ for (var i=0, el, ch, ev; i < evs.length; i++){ el = evs[i][0]; if (evs[i].length === 2){ ch = undefined; ev = evs[i][1]; } else if (evs[i].length === 3){ ch = evs[i][1]; ev = evs[i][2]; } el.on(ev, ch); } }, _unapplyEvents: function(evs){ for (var i=0, el, ev, ch; i < evs.length; i++){ el = evs[i][0]; if (evs[i].length === 2){ ch = undefined; ev = evs[i][1]; } else if (evs[i].length === 3){ ch = evs[i][1]; ev = evs[i][2]; } el.off(ev, ch); } }, _buildEvents: function(){ var events = { keyup: $.proxy(function(e){ if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1) this.update(); }, this), keydown: $.proxy(this.keydown, this), paste: $.proxy(this.paste, this) }; if (this.o.showOnFocus === true) { events.focus = $.proxy(this.show, this); } if (this.isInput) { // single input this._events = [ [this.element, events] ]; } // component: input + button else if (this.component && this.inputField.length) { this._events = [ // For components that are not readonly, allow keyboard nav [this.inputField, events], [this.component, { click: $.proxy(this.show, this) }] ]; } else { this._events = [ [this.element, { click: $.proxy(this.show, this), keydown: $.proxy(this.keydown, this) }] ]; } this._events.push( // Component: listen for blur on element descendants [this.element, '*', { blur: $.proxy(function(e){ this._focused_from = e.target; }, this) }], // Input: listen for blur on element [this.element, { blur: $.proxy(function(e){ this._focused_from = e.target; }, this) }] ); if (this.o.immediateUpdates) { // Trigger input updates immediately on changed year/month this._events.push([this.element, { 'changeYear changeMonth': $.proxy(function(e){ this.update(e.date); }, this) }]); } this._secondaryEvents = [ [this.picker, { click: $.proxy(this.click, this) }], [this.picker, '.prev, .next', { click: $.proxy(this.navArrowsClick, this) }], [this.picker, '.day:not(.disabled)', { click: $.proxy(this.dayCellClick, this) }], [$(window), { resize: $.proxy(this.place, this) }], [$(document), { 'mousedown touchstart': $.proxy(function(e){ // Clicked outside the datepicker, hide it if (!( this.element.is(e.target) || this.element.find(e.target).length || this.picker.is(e.target) || this.picker.find(e.target).length || this.isInline )){ this.hide(); } }, this) }] ]; }, _attachEvents: function(){ this._detachEvents(); this._applyEvents(this._events); }, _detachEvents: function(){ this._unapplyEvents(this._events); }, _attachSecondaryEvents: function(){ this._detachSecondaryEvents(); this._applyEvents(this._secondaryEvents); }, _detachSecondaryEvents: function(){ this._unapplyEvents(this._secondaryEvents); }, _trigger: function(event, altdate){ var date = altdate || this.dates.get(-1), local_date = this._utc_to_local(date); this.element.trigger({ type: event, date: local_date, viewMode: this.viewMode, dates: $.map(this.dates, this._utc_to_local), format: $.proxy(function(ix, format){ if (arguments.length === 0){ ix = this.dates.length - 1; format = this.o.format; } else if (typeof ix === 'string'){ format = ix; ix = this.dates.length - 1; } format = format || this.o.format; var date = this.dates.get(ix); return DPGlobal.formatDate(date, format, this.o.language); }, this) }); }, show: function(){ if (this.inputField.is(':disabled') || (this.inputField.prop('readonly') && this.o.enableOnReadonly === false)) return; if (!this.isInline) this.picker.appendTo(this.o.container); this.place(); this.picker.show(); this._attachSecondaryEvents(); this._trigger('show'); if ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) { $(this.element).blur(); } return this; }, hide: function(){ if (this.isInline || !this.picker.is(':visible')) return this; this.focusDate = null; this.picker.hide().detach(); this._detachSecondaryEvents(); this.setViewMode(this.o.startView); if (this.o.forceParse && this.inputField.val()) this.setValue(); this._trigger('hide'); return this; }, destroy: function(){ this.hide(); this._detachEvents(); this._detachSecondaryEvents(); this.picker.remove(); delete this.element.data().datepicker; if (!this.isInput){ delete this.element.data().date; } return this; }, paste: function(e){ var dateString; if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.types && $.inArray('text/plain', e.originalEvent.clipboardData.types) !== -1) { dateString = e.originalEvent.clipboardData.getData('text/plain'); } else if (window.clipboardData) { dateString = window.clipboardData.getData('Text'); } else { return; } this.setDate(dateString); this.update(); e.preventDefault(); }, _utc_to_local: function(utc){ if (!utc) { return utc; } var local = new Date(utc.getTime() + (utc.getTimezoneOffset() * 60000)); if (local.getTimezoneOffset() !== utc.getTimezoneOffset()) { local = new Date(utc.getTime() + (local.getTimezoneOffset() * 60000)); } return local; }, _local_to_utc: function(local){ return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000)); }, _zero_time: function(local){ return local && new Date(local.getFullYear(), local.getMonth(), local.getDate()); }, _zero_utc_time: function(utc){ return utc && UTCDate(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()); }, getDates: function(){ return $.map(this.dates, this._utc_to_local); }, getUTCDates: function(){ return $.map(this.dates, function(d){ return new Date(d); }); }, getDate: function(){ return this._utc_to_local(this.getUTCDate()); }, getUTCDate: function(){ var selected_date = this.dates.get(-1); if (selected_date !== undefined) { return new Date(selected_date); } else { return null; } }, clearDates: function(){ this.inputField.val(''); this._trigger('changeDate'); this.update(); if (this.o.autoclose) { this.hide(); } }, setDates: function(){ var args = Array.isArray(arguments[0]) ? arguments[0] : arguments; this.update.apply(this, args); this._trigger('changeDate'); this.setValue(); return this; }, setUTCDates: function(){ var args = Array.isArray(arguments[0]) ? arguments[0] : arguments; this.setDates.apply(this, $.map(args, this._utc_to_local)); return this; }, setDate: alias('setDates'), setUTCDate: alias('setUTCDates'), remove: alias('destroy', 'Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead'), setValue: function(){ var formatted = this.getFormattedDate(); this.inputField.val(formatted); return this; }, getFormattedDate: function(format){ if (format === undefined) format = this.o.format; var lang = this.o.language; return $.map(this.dates, function(d){ return DPGlobal.formatDate(d, format, lang); }).join(this.o.multidateSeparator); }, getStartDate: function(){ return this.o.startDate; }, setStartDate: function(startDate){ this._process_options({startDate: startDate}); this.update(); this.updateNavArrows(); return this; }, getEndDate: function(){ return this.o.endDate; }, setEndDate: function(endDate){ this._process_options({endDate: endDate}); this.update(); this.updateNavArrows(); return this; }, setDaysOfWeekDisabled: function(daysOfWeekDisabled){ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); this.update(); return this; }, setDaysOfWeekHighlighted: function(daysOfWeekHighlighted){ this._process_options({daysOfWeekHighlighted: daysOfWeekHighlighted}); this.update(); return this; }, setDatesDisabled: function(datesDisabled){ this._process_options({datesDisabled: datesDisabled}); this.update(); return this; }, place: function(){ if (this.isInline) return this; var calendarWidth = this.picker.outerWidth(), calendarHeight = this.picker.outerHeight(), visualPadding = 10, container = $(this.o.container), windowWidth = container.width(), scrollTop = this.o.container === 'body' ? $(document).scrollTop() : container.scrollTop(), appendOffset = container.offset(); var parentsZindex = [0]; this.element.parents().each(function(){ var itemZIndex = $(this).css('z-index'); if (itemZIndex !== 'auto' && Number(itemZIndex) !== 0) parentsZindex.push(Number(itemZIndex)); }); var zIndex = Math.max.apply(Math, parentsZindex) + this.o.zIndexOffset; var offset = this.component ? this.component.parent().offset() : this.element.offset(); var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false); var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false); var left = offset.left - appendOffset.left; var top = offset.top - appendOffset.top; if (this.o.container !== 'body') { top += scrollTop; } this.picker.removeClass( 'datepicker-orient-top datepicker-orient-bottom '+ 'datepicker-orient-right datepicker-orient-left' ); if (this.o.orientation.x !== 'auto'){ this.picker.addClass('datepicker-orient-' + this.o.orientation.x); if (this.o.orientation.x === 'right') left -= calendarWidth - width; } // auto x orientation is best-placement: if it crosses a window // edge, fudge it sideways else { if (offset.left < 0) { // component is outside the window on the left side. Move it into visible range this.picker.addClass('datepicker-orient-left'); left -= offset.left - visualPadding; } else if (left + calendarWidth > windowWidth) { // the calendar passes the widow right edge. Align it to component right side this.picker.addClass('datepicker-orient-right'); left += width - calendarWidth; } else { if (this.o.rtl) { // Default to right this.picker.addClass('datepicker-orient-right'); } else { // Default to left this.picker.addClass('datepicker-orient-left'); } } } // auto y orientation is best-situation: top or bottom, no fudging, // decision based on which shows more of the calendar var yorient = this.o.orientation.y, top_overflow; if (yorient === 'auto'){ top_overflow = -scrollTop + top - calendarHeight; yorient = top_overflow < 0 ? 'bottom' : 'top'; } this.picker.addClass('datepicker-orient-' + yorient); if (yorient === 'top') top -= calendarHeight + parseInt(this.picker.css('padding-top')); else top += height; if (this.o.rtl) { var right = windowWidth - (left + width); this.picker.css({ top: top, right: right, zIndex: zIndex }); } else { this.picker.css({ top: top, left: left, zIndex: zIndex }); } return this; }, _allow_update: true, update: function(){ if (!this._allow_update) return this; var oldDates = this.dates.copy(), dates = [], fromArgs = false; if (arguments.length){ $.each(arguments, $.proxy(function(i, date){ if (date instanceof Date) date = this._local_to_utc(date); dates.push(date); }, this)); fromArgs = true; } else { dates = this.isInput ? this.element.val() : this.element.data('date') || this.inputField.val(); if (dates && this.o.multidate) dates = dates.split(this.o.multidateSeparator); else dates = [dates]; delete this.element.data().date; } dates = $.map(dates, $.proxy(function(date){ return DPGlobal.parseDate(date, this.o.format, this.o.language, this.o.assumeNearbyYear); }, this)); dates = $.grep(dates, $.proxy(function(date){ return ( !this.dateWithinRange(date) || !date ); }, this), true); this.dates.replace(dates); if (this.o.updateViewDate) { if (this.dates.length) this.viewDate = new Date(this.dates.get(-1)); else if (this.viewDate < this.o.startDate) this.viewDate = new Date(this.o.startDate); else if (this.viewDate > this.o.endDate) this.viewDate = new Date(this.o.endDate); else this.viewDate = this.o.defaultViewDate; } if (fromArgs){ // setting date by clicking this.setValue(); this.element.change(); } else if (this.dates.length){ // setting date by typing if (String(oldDates) !== String(this.dates) && fromArgs) { this._trigger('changeDate'); this.element.change(); } } if (!this.dates.length && oldDates.length) { this._trigger('clearDate'); this.element.change(); } this.fill(); return this; }, fillDow: function(){ if (this.o.showWeekDays) { var dowCnt = this.o.weekStart, html = ''; if (this.o.calendarWeeks){ html += ' '; } while (dowCnt < this.o.weekStart + 7){ html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+''; } html += ''; this.picker.find('.datepicker-days thead').append(html); } }, fillMonths: function(){ var localDate = this._utc_to_local(this.viewDate); var html = ''; var focused; for (var i = 0; i < 12; i++){ focused = localDate && localDate.getMonth() === i ? ' focused' : ''; html += '' + dates[this.o.language].monthsShort[i] + ''; } this.picker.find('.datepicker-months td').html(html); }, setRange: function(range){ if (!range || !range.length) delete this.range; else this.range = $.map(range, function(d){ return d.valueOf(); }); this.fill(); }, getClassNames: function(date){ var cls = [], year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(), today = UTCToday(); if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){ cls.push('old'); } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){ cls.push('new'); } if (this.focusDate && date.valueOf() === this.focusDate.valueOf()) cls.push('focused'); // Compare internal UTC date with UTC today, not local today if (this.o.todayHighlight && isUTCEquals(date, today)) { cls.push('today'); } if (this.dates.contains(date) !== -1) cls.push('active'); if (!this.dateWithinRange(date)){ cls.push('disabled'); } if (this.dateIsDisabled(date)){ cls.push('disabled', 'disabled-date'); } if ($.inArray(date.getUTCDay(), this.o.daysOfWeekHighlighted) !== -1){ cls.push('highlighted'); } if (this.range){ if (date > this.range[0] && date < this.range[this.range.length-1]){ cls.push('range'); } if ($.inArray(date.valueOf(), this.range) !== -1){ cls.push('selected'); } if (date.valueOf() === this.range[0]){ cls.push('range-start'); } if (date.valueOf() === this.range[this.range.length-1]){ cls.push('range-end'); } } return cls; }, _fill_yearsView: function(selector, cssClass, factor, year, startYear, endYear, beforeFn){ var html = ''; var step = factor / 10; var view = this.picker.find(selector); var startVal = Math.floor(year / factor) * factor; var endVal = startVal + step * 9; var focusedVal = Math.floor(this.viewDate.getFullYear() / step) * step; var selected = $.map(this.dates, function(d){ return Math.floor(d.getUTCFullYear() / step) * step; }); var classes, tooltip, before; for (var currVal = startVal - step; currVal <= endVal + step; currVal += step) { classes = [cssClass]; tooltip = null; if (currVal === startVal - step) { classes.push('old'); } else if (currVal === endVal + step) { classes.push('new'); } if ($.inArray(currVal, selected) !== -1) { classes.push('active'); } if (currVal < startYear || currVal > endYear) { classes.push('disabled'); } if (currVal === focusedVal) { classes.push('focused'); } if (beforeFn !== $.noop) { before = beforeFn(new Date(currVal, 0, 1)); if (before === undefined) { before = {}; } else if (typeof before === 'boolean') { before = {enabled: before}; } else if (typeof before === 'string') { before = {classes: before}; } if (before.enabled === false) { classes.push('disabled'); } if (before.classes) { classes = classes.concat(before.classes.split(/\s+/)); } if (before.tooltip) { tooltip = before.tooltip; } } html += '' + currVal + ''; } view.find('.datepicker-switch').text(startVal + '-' + endVal); view.find('td').html(html); }, fill: function(){ var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, todaytxt = dates[this.o.language].today || dates['en'].today || '', cleartxt = dates[this.o.language].clear || dates['en'].clear || '', titleFormat = dates[this.o.language].titleFormat || dates['en'].titleFormat, todayDate = UTCToday(), titleBtnVisible = (this.o.todayBtn === true || this.o.todayBtn === 'linked') && todayDate >= this.o.startDate && todayDate <= this.o.endDate && !this.weekOfDateIsDisabled(todayDate), tooltip, before; if (isNaN(year) || isNaN(month)) return; this.picker.find('.datepicker-days .datepicker-switch') .text(DPGlobal.formatDate(d, titleFormat, this.o.language)); this.picker.find('tfoot .today') .text(todaytxt) .css('display', titleBtnVisible ? 'table-cell' : 'none'); this.picker.find('tfoot .clear') .text(cleartxt) .css('display', this.o.clearBtn === true ? 'table-cell' : 'none'); this.picker.find('thead .datepicker-title') .text(this.o.title) .css('display', typeof this.o.title === 'string' && this.o.title !== '' ? 'table-cell' : 'none'); this.updateNavArrows(); this.fillMonths(); var prevMonth = UTCDate(year, month, 0), day = prevMonth.getUTCDate(); prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); var nextMonth = new Date(prevMonth); if (prevMonth.getUTCFullYear() < 100){ nextMonth.setUTCFullYear(prevMonth.getUTCFullYear()); } nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); nextMonth = nextMonth.valueOf(); var html = []; var weekDay, clsName; while (prevMonth.valueOf() < nextMonth){ weekDay = prevMonth.getUTCDay(); if (weekDay === this.o.weekStart){ html.push(''); if (this.o.calendarWeeks){ // ISO 8601: First week contains first thursday. // ISO also states week starts on Monday, but we can be more abstract here. var // Start of current week: based on weekstart/current date ws = new Date(+prevMonth + (this.o.weekStart - weekDay - 7) % 7 * 864e5), // Thursday of this week th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), // First Thursday of year, year from thursday yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay()) % 7 * 864e5), // Calendar week: ms between thursdays, div ms per day, div 7 days calWeek = (th - yth) / 864e5 / 7 + 1; html.push(''+ calWeek +''); } } clsName = this.getClassNames(prevMonth); clsName.push('day'); var content = prevMonth.getUTCDate(); if (this.o.beforeShowDay !== $.noop){ before = this.o.beforeShowDay(this._utc_to_local(prevMonth)); if (before === undefined) before = {}; else if (typeof before === 'boolean') before = {enabled: before}; else if (typeof before === 'string') before = {classes: before}; if (before.enabled === false) clsName.push('disabled'); if (before.classes) clsName = clsName.concat(before.classes.split(/\s+/)); if (before.tooltip) tooltip = before.tooltip; if (before.content) content = before.content; } //Check if uniqueSort exists (supported by jquery >=1.12 and >=2.2) //Fallback to unique function for older jquery versions if (typeof $.uniqueSort === "function") { clsName = $.uniqueSort(clsName); } else { clsName = $.unique(clsName); } html.push('' + content + ''); tooltip = null; if (weekDay === this.o.weekEnd){ html.push(''); } prevMonth.setUTCDate(prevMonth.getUTCDate() + 1); } this.picker.find('.datepicker-days tbody').html(html.join('')); var monthsTitle = dates[this.o.language].monthsTitle || dates['en'].monthsTitle || 'Months'; var months = this.picker.find('.datepicker-months') .find('.datepicker-switch') .text(this.o.maxViewMode < 2 ? monthsTitle : year) .end() .find('tbody span').removeClass('active'); $.each(this.dates, function(i, d){ if (d.getUTCFullYear() === year) months.eq(d.getUTCMonth()).addClass('active'); }); if (year < startYear || year > endYear){ months.addClass('disabled'); } if (year === startYear){ months.slice(0, startMonth).addClass('disabled'); } if (year === endYear){ months.slice(endMonth+1).addClass('disabled'); } if (this.o.beforeShowMonth !== $.noop){ var that = this; $.each(months, function(i, month){ var moDate = new Date(year, i, 1); var before = that.o.beforeShowMonth(moDate); if (before === undefined) before = {}; else if (typeof before === 'boolean') before = {enabled: before}; else if (typeof before === 'string') before = {classes: before}; if (before.enabled === false && !$(month).hasClass('disabled')) $(month).addClass('disabled'); if (before.classes) $(month).addClass(before.classes); if (before.tooltip) $(month).prop('title', before.tooltip); }); } // Generating decade/years picker this._fill_yearsView( '.datepicker-years', 'year', 10, year, startYear, endYear, this.o.beforeShowYear ); // Generating century/decades picker this._fill_yearsView( '.datepicker-decades', 'decade', 100, year, startYear, endYear, this.o.beforeShowDecade ); // Generating millennium/centuries picker this._fill_yearsView( '.datepicker-centuries', 'century', 1000, year, startYear, endYear, this.o.beforeShowCentury ); }, updateNavArrows: function(){ if (!this._allow_update) return; var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, prevIsDisabled, nextIsDisabled, factor = 1; switch (this.viewMode){ case 4: factor *= 10; /* falls through */ case 3: factor *= 10; /* falls through */ case 2: factor *= 10; /* falls through */ case 1: prevIsDisabled = Math.floor(year / factor) * factor <= startYear; nextIsDisabled = Math.floor(year / factor) * factor + factor > endYear; break; case 0: prevIsDisabled = year <= startYear && month <= startMonth; nextIsDisabled = year >= endYear && month >= endMonth; break; } this.picker.find('.prev').toggleClass('disabled', prevIsDisabled); this.picker.find('.next').toggleClass('disabled', nextIsDisabled); }, click: function(e){ e.preventDefault(); e.stopPropagation(); var target, dir, day, year, month; target = $(e.target); // Clicked on the switch if (target.hasClass('datepicker-switch') && this.viewMode !== this.o.maxViewMode){ this.setViewMode(this.viewMode + 1); } // Clicked on today button if (target.hasClass('today') && !target.hasClass('day')){ this.setViewMode(0); this._setDate(UTCToday(), this.o.todayBtn === 'linked' ? null : 'view'); } // Clicked on clear button if (target.hasClass('clear')){ this.clearDates(); } if (!target.hasClass('disabled')){ // Clicked on a month, year, decade, century if (target.hasClass('month') || target.hasClass('year') || target.hasClass('decade') || target.hasClass('century')) { this.viewDate.setUTCDate(1); day = 1; if (this.viewMode === 1){ month = target.parent().find('span').index(target); year = this.viewDate.getUTCFullYear(); this.viewDate.setUTCMonth(month); } else { month = 0; year = Number(target.text()); this.viewDate.setUTCFullYear(year); } this._trigger(DPGlobal.viewModes[this.viewMode - 1].e, this.viewDate); if (this.viewMode === this.o.minViewMode){ this._setDate(UTCDate(year, month, day)); } else { this.setViewMode(this.viewMode - 1); this.fill(); } } } if (this.picker.is(':visible') && this._focused_from){ this._focused_from.focus(); } delete this._focused_from; }, dayCellClick: function(e){ var $target = $(e.currentTarget); var timestamp = $target.data('date'); var date = new Date(timestamp); if (this.o.updateViewDate) { if (date.getUTCFullYear() !== this.viewDate.getUTCFullYear()) { this._trigger('changeYear', this.viewDate); } if (date.getUTCMonth() !== this.viewDate.getUTCMonth()) { this._trigger('changeMonth', this.viewDate); } } this._setDate(date); }, // Clicked on prev or next navArrowsClick: function(e){ var $target = $(e.currentTarget); var dir = $target.hasClass('prev') ? -1 : 1; if (this.viewMode !== 0){ dir *= DPGlobal.viewModes[this.viewMode].navStep * 12; } this.viewDate = this.moveMonth(this.viewDate, dir); this._trigger(DPGlobal.viewModes[this.viewMode].e, this.viewDate); this.fill(); }, _toggle_multidate: function(date){ var ix = this.dates.contains(date); if (!date){ this.dates.clear(); } if (ix !== -1){ if (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){ this.dates.remove(ix); } } else if (this.o.multidate === false) { this.dates.clear(); this.dates.push(date); } else { this.dates.push(date); } if (typeof this.o.multidate === 'number') while (this.dates.length > this.o.multidate) this.dates.remove(0); }, _setDate: function(date, which){ if (!which || which === 'date') this._toggle_multidate(date && new Date(date)); if ((!which && this.o.updateViewDate) || which === 'view') this.viewDate = date && new Date(date); this.fill(); this.setValue(); if (!which || which !== 'view') { this._trigger('changeDate'); } this.inputField.trigger('change'); if (this.o.autoclose && (!which || which === 'date')){ this.hide(); } }, moveDay: function(date, dir){ var newDate = new Date(date); newDate.setUTCDate(date.getUTCDate() + dir); return newDate; }, moveWeek: function(date, dir){ return this.moveDay(date, dir * 7); }, moveMonth: function(date, dir){ if (!isValidDate(date)) return this.o.defaultViewDate; if (!dir) return date; var new_date = new Date(date.valueOf()), day = new_date.getUTCDate(), month = new_date.getUTCMonth(), mag = Math.abs(dir), new_month, test; dir = dir > 0 ? 1 : -1; if (mag === 1){ test = dir === -1 // If going back one month, make sure month is not current month // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) ? function(){ return new_date.getUTCMonth() === month; } // If going forward one month, make sure month is as expected // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) : function(){ return new_date.getUTCMonth() !== new_month; }; new_month = month + dir; new_date.setUTCMonth(new_month); // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 new_month = (new_month + 12) % 12; } else { // For magnitudes >1, move one month at a time... for (var i=0; i < mag; i++) // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... new_date = this.moveMonth(new_date, dir); // ...then reset the day, keeping it in the new month new_month = new_date.getUTCMonth(); new_date.setUTCDate(day); test = function(){ return new_month !== new_date.getUTCMonth(); }; } // Common date-resetting loop -- if date is beyond end of month, make it // end of month while (test()){ new_date.setUTCDate(--day); new_date.setUTCMonth(new_month); } return new_date; }, moveYear: function(date, dir){ return this.moveMonth(date, dir*12); }, moveAvailableDate: function(date, dir, fn){ do { date = this[fn](date, dir); if (!this.dateWithinRange(date)) return false; fn = 'moveDay'; } while (this.dateIsDisabled(date)); return date; }, weekOfDateIsDisabled: function(date){ return $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1; }, dateIsDisabled: function(date){ return ( this.weekOfDateIsDisabled(date) || $.grep(this.o.datesDisabled, function(d){ return isUTCEquals(date, d); }).length > 0 ); }, dateWithinRange: function(date){ return date >= this.o.startDate && date <= this.o.endDate; }, keydown: function(e){ if (!this.picker.is(':visible')){ if (e.keyCode === 40 || e.keyCode === 27) { // allow down to re-show picker this.show(); e.stopPropagation(); } return; } var dateChanged = false, dir, newViewDate, focusDate = this.focusDate || this.viewDate; switch (e.keyCode){ case 27: // escape if (this.focusDate){ this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.fill(); } else this.hide(); e.preventDefault(); e.stopPropagation(); break; case 37: // left case 38: // up case 39: // right case 40: // down if (!this.o.keyboardNavigation || this.o.daysOfWeekDisabled.length === 7) break; dir = e.keyCode === 37 || e.keyCode === 38 ? -1 : 1; if (this.viewMode === 0) { if (e.ctrlKey){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear'); if (newViewDate) this._trigger('changeYear', this.viewDate); } else if (e.shiftKey){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth'); if (newViewDate) this._trigger('changeMonth', this.viewDate); } else if (e.keyCode === 37 || e.keyCode === 39){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveDay'); } else if (!this.weekOfDateIsDisabled(focusDate)){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveWeek'); } } else if (this.viewMode === 1) { if (e.keyCode === 38 || e.keyCode === 40) { dir = dir * 4; } newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth'); } else if (this.viewMode === 2) { if (e.keyCode === 38 || e.keyCode === 40) { dir = dir * 4; } newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear'); } if (newViewDate){ this.focusDate = this.viewDate = newViewDate; this.setValue(); this.fill(); e.preventDefault(); } break; case 13: // enter if (!this.o.forceParse) break; focusDate = this.focusDate || this.dates.get(-1) || this.viewDate; if (this.o.keyboardNavigation) { this._toggle_multidate(focusDate); dateChanged = true; } this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.setValue(); this.fill(); if (this.picker.is(':visible')){ e.preventDefault(); e.stopPropagation(); if (this.o.autoclose) this.hide(); } break; case 9: // tab this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.fill(); this.hide(); break; } if (dateChanged){ if (this.dates.length) this._trigger('changeDate'); else this._trigger('clearDate'); this.inputField.trigger('change'); } }, setViewMode: function(viewMode){ this.viewMode = viewMode; this.picker .children('div') .hide() .filter('.datepicker-' + DPGlobal.viewModes[this.viewMode].clsName) .show(); this.updateNavArrows(); this._trigger('changeViewMode', new Date(this.viewDate)); } }; var DateRangePicker = function(element, options){ $.data(element, 'datepicker', this); this.element = $(element); this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; }); delete options.inputs; this.keepEmptyValues = options.keepEmptyValues; delete options.keepEmptyValues; datepickerPlugin.call($(this.inputs), options) .on('changeDate', $.proxy(this.dateUpdated, this)); this.pickers = $.map(this.inputs, function(i){ return $.data(i, 'datepicker'); }); this.updateDates(); }; DateRangePicker.prototype = { updateDates: function(){ this.dates = $.map(this.pickers, function(i){ return i.getUTCDate(); }); this.updateRanges(); }, updateRanges: function(){ var range = $.map(this.dates, function(d){ return d.valueOf(); }); $.each(this.pickers, function(i, p){ p.setRange(range); }); }, clearDates: function(){ $.each(this.pickers, function(i, p){ p.clearDates(); }); }, dateUpdated: function(e){ // `this.updating` is a workaround for preventing infinite recursion // between `changeDate` triggering and `setUTCDate` calling. Until // there is a better mechanism. if (this.updating) return; this.updating = true; var dp = $.data(e.target, 'datepicker'); if (dp === undefined) { return; } var new_date = dp.getUTCDate(), keep_empty_values = this.keepEmptyValues, i = $.inArray(e.target, this.inputs), j = i - 1, k = i + 1, l = this.inputs.length; if (i === -1) return; $.each(this.pickers, function(i, p){ if (!p.getUTCDate() && (p === dp || !keep_empty_values)) p.setUTCDate(new_date); }); if (new_date < this.dates[j]){ // Date being moved earlier/left while (j >= 0 && new_date < this.dates[j] && (this.pickers[j].element.val() || "").length > 0) { this.pickers[j--].setUTCDate(new_date); } } else if (new_date > this.dates[k]){ // Date being moved later/right while (k < l && new_date > this.dates[k] && (this.pickers[k].element.val() || "").length > 0) { this.pickers[k++].setUTCDate(new_date); } } this.updateDates(); delete this.updating; }, destroy: function(){ $.map(this.pickers, function(p){ p.destroy(); }); $(this.inputs).off('changeDate', this.dateUpdated); delete this.element.data().datepicker; }, remove: alias('destroy', 'Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead') }; function opts_from_el(el, prefix){ // Derive options from element data-attrs var data = $(el).data(), out = {}, inkey, replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'); prefix = new RegExp('^' + prefix.toLowerCase()); function re_lower(_,a){ return a.toLowerCase(); } for (var key in data) if (prefix.test(key)){ inkey = key.replace(replace, re_lower); out[inkey] = data[key]; } return out; } function opts_from_locale(lang){ // Derive options from locale plugins var out = {}; // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" if (!dates[lang]){ lang = lang.split('-')[0]; if (!dates[lang]) return; } var d = dates[lang]; $.each(locale_opts, function(i,k){ if (k in d) out[k] = d[k]; }); return out; } var old = $.fn.datepicker; var datepickerPlugin = function(option){ var args = Array.apply(null, arguments); args.shift(); var internal_return; this.each(function(){ var $this = $(this), data = $this.data('datepicker'), options = typeof option === 'object' && option; if (!data){ var elopts = opts_from_el(this, 'date'), // Preliminary otions xopts = $.extend({}, defaults, elopts, options), locopts = opts_from_locale(xopts.language), // Options priority: js args, data-attrs, locales, defaults opts = $.extend({}, defaults, locopts, elopts, options); if ($this.hasClass('input-daterange') || opts.inputs){ $.extend(opts, { inputs: opts.inputs || $this.find('input').toArray() }); data = new DateRangePicker(this, opts); } else { data = new Datepicker(this, opts); } $this.data('datepicker', data); } if (typeof option === 'string' && typeof data[option] === 'function'){ internal_return = data[option].apply(data, args); } }); if ( internal_return === undefined || internal_return instanceof Datepicker || internal_return instanceof DateRangePicker ) return this; if (this.length > 1) throw new Error('Using only allowed for the collection of a single element (' + option + ' function)'); else return internal_return; }; $.fn.datepicker = datepickerPlugin; var defaults = $.fn.datepicker.defaults = { assumeNearbyYear: false, autoclose: false, beforeShowDay: $.noop, beforeShowMonth: $.noop, beforeShowYear: $.noop, beforeShowDecade: $.noop, beforeShowCentury: $.noop, calendarWeeks: false, clearBtn: false, toggleActive: false, daysOfWeekDisabled: [], daysOfWeekHighlighted: [], datesDisabled: [], endDate: Infinity, forceParse: true, format: 'mm/dd/yyyy', isInline: null, keepEmptyValues: false, keyboardNavigation: true, language: 'en', minViewMode: 0, maxViewMode: 4, multidate: false, multidateSeparator: ',', orientation: "auto", rtl: false, startDate: -Infinity, startView: 0, todayBtn: false, todayHighlight: false, updateViewDate: true, weekStart: 0, disableTouchKeyboard: false, enableOnReadonly: true, showOnFocus: true, zIndexOffset: 10, container: 'body', immediateUpdates: false, title: '', templates: { leftArrow: '«', rightArrow: '»' }, showWeekDays: true }; var locale_opts = $.fn.datepicker.locale_opts = [ 'format', 'rtl', 'weekStart' ]; $.fn.datepicker.Constructor = Datepicker; var dates = $.fn.datepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear", titleFormat: "MM yyyy" } }; var DPGlobal = { viewModes: [ { names: ['days', 'month'], clsName: 'days', e: 'changeMonth' }, { names: ['months', 'year'], clsName: 'months', e: 'changeYear', navStep: 1 }, { names: ['years', 'decade'], clsName: 'years', e: 'changeDecade', navStep: 10 }, { names: ['decades', 'century'], clsName: 'decades', e: 'changeCentury', navStep: 100 }, { names: ['centuries', 'millennium'], clsName: 'centuries', e: 'changeMillennium', navStep: 1000 } ], validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, nonpunctuation: /[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g, parseFormat: function(format){ if (typeof format.toValue === 'function' && typeof format.toDisplay === 'function') return format; // IE treats \0 as a string end in inputs (truncating the value), // so it's a bad format delimiter, anyway var separators = format.replace(this.validParts, '\0').split('\0'), parts = format.match(this.validParts); if (!separators || !separators.length || !parts || parts.length === 0){ throw new Error("Invalid date format."); } return {separators: separators, parts: parts}; }, parseDate: function(date, format, language, assumeNearby){ if (!date) return undefined; if (date instanceof Date) return date; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (format.toValue) return format.toValue(date, format, language); var fn_map = { d: 'moveDay', m: 'moveMonth', w: 'moveWeek', y: 'moveYear' }, dateAliases = { yesterday: '-1d', today: '+0d', tomorrow: '+1d' }, parts, part, dir, i, fn; if (date in dateAliases){ date = dateAliases[date]; } if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(date)){ parts = date.match(/([\-+]\d+)([dmwy])/gi); date = new Date(); for (i=0; i < parts.length; i++){ part = parts[i].match(/([\-+]\d+)([dmwy])/i); dir = Number(part[1]); fn = fn_map[part[2].toLowerCase()]; date = Datepicker.prototype[fn](date, dir); } return Datepicker.prototype._zero_utc_time(date); } parts = date && date.match(this.nonpunctuation) || []; function applyNearbyYear(year, threshold){ if (threshold === true) threshold = 10; // if year is 2 digits or less, than the user most likely is trying to get a recent century if (year < 100){ year += 2000; // if the new year is more than threshold years in advance, use last century if (year > ((new Date()).getFullYear()+threshold)){ year -= 100; } } return year; } var parsed = {}, setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], setters_map = { yyyy: function(d,v){ return d.setUTCFullYear(assumeNearby ? applyNearbyYear(v, assumeNearby) : v); }, m: function(d,v){ if (isNaN(d)) return d; v -= 1; while (v < 0) v += 12; v %= 12; d.setUTCMonth(v); while (d.getUTCMonth() !== v) d.setUTCDate(d.getUTCDate()-1); return d; }, d: function(d,v){ return d.setUTCDate(v); } }, val, filtered; setters_map['yy'] = setters_map['yyyy']; setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; setters_map['dd'] = setters_map['d']; date = UTCToday(); var fparts = format.parts.slice(); // Remove noop parts if (parts.length !== fparts.length){ fparts = $(fparts).filter(function(i,p){ return $.inArray(p, setters_order) !== -1; }).toArray(); } // Process remainder function match_part(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m.toLowerCase() === p.toLowerCase(); } if (parts.length === fparts.length){ var cnt; for (i=0, cnt = fparts.length; i < cnt; i++){ val = parseInt(parts[i], 10); part = fparts[i]; if (isNaN(val)){ switch (part){ case 'MM': filtered = $(dates[language].months).filter(match_part); val = $.inArray(filtered[0], dates[language].months) + 1; break; case 'M': filtered = $(dates[language].monthsShort).filter(match_part); val = $.inArray(filtered[0], dates[language].monthsShort) + 1; break; } } parsed[part] = val; } var _date, s; for (i=0; i < setters_order.length; i++){ s = setters_order[i]; if (s in parsed && !isNaN(parsed[s])){ _date = new Date(date); setters_map[s](_date, parsed[s]); if (!isNaN(_date)) date = _date; } } } return date; }, formatDate: function(date, format, language){ if (!date) return ''; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (format.toDisplay) return format.toDisplay(date, format, language); var val = { d: date.getUTCDate(), D: dates[language].daysShort[date.getUTCDay()], DD: dates[language].days[date.getUTCDay()], m: date.getUTCMonth() + 1, M: dates[language].monthsShort[date.getUTCMonth()], MM: dates[language].months[date.getUTCMonth()], yy: date.getUTCFullYear().toString().substring(2), yyyy: date.getUTCFullYear() }; val.dd = (val.d < 10 ? '0' : '') + val.d; val.mm = (val.m < 10 ? '0' : '') + val.m; date = []; var seps = $.extend([], format.separators); for (var i=0, cnt = format.parts.length; i <= cnt; i++){ if (seps.length) date.push(seps.shift()); date.push(val[format.parts[i]]); } return date.join(''); }, headTemplate: ''+ ''+ ''+ ''+ ''+ ''+defaults.templates.leftArrow+''+ ''+ ''+defaults.templates.rightArrow+''+ ''+ '', contTemplate: '', footTemplate: ''+ ''+ ''+ ''+ ''+ ''+ ''+ '' }; DPGlobal.template = '
'+ '
'+ ''+ DPGlobal.headTemplate+ ''+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'; $.fn.datepicker.DPGlobal = DPGlobal; /* DATEPICKER NO CONFLICT * =================== */ $.fn.datepicker.noConflict = function(){ $.fn.datepicker = old; return this; }; /* DATEPICKER VERSION * =================== */ $.fn.datepicker.version = '1.10.0'; $.fn.datepicker.deprecated = function(msg){ var console = window.console; if (console && console.warn) { console.warn('DEPRECATED: ' + msg); } }; /* DATEPICKER DATA-API * ================== */ $(document).on( 'focus.datepicker.data-api click.datepicker.data-api', '[data-provide="datepicker"]', function(e){ var $this = $(this); if ($this.data('datepicker')) return; e.preventDefault(); // component click requires us to explicitly show it datepickerPlugin.call($this, 'show'); } ); $(function(){ datepickerPlugin.call($('[data-provide="datepicker-inline"]')); }); })); ================================================ FILE: docs/Makefile ================================================ # Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/bootstrap-datepicker.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/bootstrap-datepicker.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/bootstrap-datepicker" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/bootstrap-datepicker" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." ================================================ FILE: docs/README.md ================================================ Documentation ============= Project documentation is built using [Sphinx docs](https://www.sphinx-doc.org/), which uses [reST](http://docutils.sourceforge.net/rst.html) for markup. This allows the docs to cover a vast amount of topics without using a thousand-line README file. Sphinx docs is pip-installable via `pip install sphinx`. Once installed, open a command line in the docs folder and run the following commands: ```bash $ sudo pip install -r requirements.txt ``` This will install the requirements needed for the generating the docs. Afterwards you can run: ```bash $ make html ``` The docs will be generated, the output files will be placed in the `_build/html/` directory, and can be browsed (locally) with any browser. The docs can also be found online at . ================================================ FILE: docs/_screenshots/assets/common.css ================================================ @import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css'); @import url('../../../dist/css/bootstrap-datepicker3.css'); body { /* Padding around all elements to allow space for screenshots */ padding: 10px; /* Transparent background for PNG screenshots */ background: none; } ================================================ FILE: docs/_screenshots/assets/common.js ================================================ document.write(""); document.write(""); ================================================ FILE: docs/_screenshots/demo_head.html ================================================
================================================ FILE: docs/_screenshots/markup_component.html ================================================
================================================ FILE: docs/_screenshots/markup_daterange.html ================================================
to
to
================================================ FILE: docs/_screenshots/markup_inline.html ================================================
================================================ FILE: docs/_screenshots/markup_input.html ================================================
================================================ FILE: docs/_screenshots/option_calendarweeks.html ================================================
================================================ FILE: docs/_screenshots/option_clearbtn.html ================================================
================================================ FILE: docs/_screenshots/option_daysofweekdisabled.html ================================================
================================================ FILE: docs/_screenshots/option_enddate.html ================================================
================================================ FILE: docs/_screenshots/option_language.html ================================================
================================================ FILE: docs/_screenshots/option_multidate.html ================================================
================================================ FILE: docs/_screenshots/option_showweekdays.html ================================================
================================================ FILE: docs/_screenshots/option_startdate.html ================================================
================================================ FILE: docs/_screenshots/option_todaybtn.html ================================================
================================================ FILE: docs/_screenshots/option_todayhighlight.html ================================================
================================================ FILE: docs/_screenshots/option_weekstart.html ================================================
================================================ FILE: docs/conf.py ================================================ # -*- coding: utf-8 -*- # # bootstrap-datepicker documentation build configuration file, created by # sphinx-quickstart on Fri Aug 2 14:45:57 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. #version = '' # The full version, including alpha/beta/rc tags. #release = '' import sphinx_rtd_theme # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' primary_domain = 'js' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'bootstrap-datepicker' copyright = u'2016, eternicode' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' highlight_language = 'javascript' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = ['_themes',] html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'bootstrap-datepickerdoc' # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'bootstrap-datepicker.tex', u'bootstrap-datepicker Documentation', u'eternicode', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'bootstrap-datepicker', u'bootstrap-datepicker Documentation', [u'eternicode'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'bootstrap-datepicker', u'bootstrap-datepicker Documentation', u'eternicode', 'bootstrap-datepicker', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' ================================================ FILE: docs/events.rst ================================================ Events ====== Datepicker triggers a number of events in certain circumstances. All events have extra data attached to the event object that is passed to any event handlers :: $('.datepicker').datepicker() .on(picker_event, function(e) { // `e` here contains the extra attributes }); * ``date``: the relevant Date object, in local timezone. For a multidate picker, this will be the latest date picked. * ``dates``: an Array of Date objects, in local timezone, when using a multidate picker. * ``format([ix], [format])``: a function to make formatting ``date`` easier. ``ix`` can be the index of a Date in the ``dates`` array to format; if absent, the last date selected will be used. ``format`` can be any format string that datepicker supports; if absent, the format set on the datepicker will be used. Both arguments are optional. show ---- Fired when the date picker is displayed. hide ---- Fired when the date picker is hidden. clearDate --------- Fired when the date is cleared, normally when the "clear" button (enabled with the ``clearBtn`` option) is pressed. changeDate ---------- Fired when the date is changed. changeMonth ----------- Fired when the *view* month is changed from year view. changeYear ---------- Fired when the *view* year is changed from decade view. changeDecade ------------ Fired when the *view* decade is changed from century view. changeCentury ------------- Fired when the *view* century is changed from millennium view. ================================================ FILE: docs/i18n.rst ================================================ I18N ==== The plugin supports i18n for the month and weekday names and the ``weekStart`` option. The default is English ("en"); other available translations are available in the ``js/locales/`` directory, simply include your desired locale after the plugin. To add more languages, simply add a key to ``$.fn.datepicker.dates``, before calling ``.datepicker()``. Example :: $.fn.datepicker.dates['en'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear", format: "mm/dd/yyyy", titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */ weekStart: 0 }; Right-to-left languages may also include ``rtl: true`` to make the calendar display appropriately. If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add ``charset="UTF-8"`` to your ``script`` tag: .. code-block:: html :: $('.datepicker').datepicker({ language: 'XX' }); .. figure:: _static/screenshots/option_language.png :align: center ================================================ FILE: docs/index.rst ================================================ bootstrap-datepicker ==================== Bootstrap-datepicker provides a flexible datepicker widget in the Bootstrap style. .. figure:: _static/screenshots/demo_head.png :align: center Versions are incremented according to `semver `_. `Online Demo `_ Requirements ------------ * `Bootstrap`_ 2.0.4+ * `jQuery`_ 1.7.1+ .. _Bootstrap: https://getbootstrap.com/ .. _jQuery: https://jquery.com/ These are the specific versions bootstrap-datepicker is tested against (``js`` files) and built against (``css`` files). Use other versions at your own risk. Dependencies ------------ Requires bootstrap's dropdown component (``dropdowns.less``) for some styles, and bootstrap's sprites (``sprites.less`` and associated images) for arrows. A standalone .css file (including necessary dropdown styles and alternative, text-based arrows) can be generated by running ``build/build_standalone.less`` through the ``lessc`` compiler:: $ lessc build/build_standalone.less datepicker.css Usage ----- Call the datepicker via javascript:: $('.datepicker').datepicker(); Data API ^^^^^^^^ As with bootstrap's own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set ``data-provide="datepicker"`` on the element you want to initialize, and it will be intialized lazily, in true bootstrap fashion. For inline datepickers, use ``data-provide="datepicker-inline"``; these will be immediately initialized on page load, and cannot be lazily loaded. .. code-block:: html Markup with component .. code-block:: html
You can disable datepicker's data-api in the same way as you would disable other bootstrap plugins:: $(document).off('.datepicker.data-api'); Configuration ^^^^^^^^^^^^^ :doc:`options` are passed to the ``datepicker`` function via an options hash at instantiation:: $('.datepicker').datepicker({ format: 'mm/dd/yyyy', startDate: '-3d' }); Most options may be provided as data-attributes on the target element: .. code-block:: html :: $('.datepicker').datepicker({ startDate: '-3d' }); Defaults for all options can be modified directly by changing values in the ``$.fn.datepicker.defaults`` hash:: $.fn.datepicker.defaults.format = "mm/dd/yyyy"; $('.datepicker').datepicker({ startDate: '-3d' }); Stylesheets ^^^^^^^^^^^ There are a few different stylesheets included in the library. This is an overview of what each file is to be used for: :code:`bootstrap-datepicker.css` gives legacy support for twitter bootstrap v2, :code:`bootstrap-datepicker3.css` is used for twitter bootstrap v3 support and :code:`bootstrap-datepicker.standalone.css` can be used to include the datepicker without depending on the twitter bootstrap library. No Conflict mode ^^^^^^^^^^^^^^^^ ``$.fn.datepicker.noConflict`` provides a way to avoid conflict with other jQuery datepicker plugins:: var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value $.fn.bootstrapDP = datepicker; // give $().bootstrapDP the bootstrap-datepicker functionality Table of Contents ----------------- .. toctree:: markup options methods events keyboard i18n ================================================ FILE: docs/keyboard.rst ================================================ Keyboard support ================ The datepicker includes keyboard navigation. The "focused date" is kept track of and highlighted (as with mouse hover) during keyboard nav, and is cleared when a date is toggled or the picker is hidden. up, down, left, right arrow keys -------------------------------- By themselves, left/right will move focus backward/forward one day, up/down will move focus back/forward one week. With the shift key, up/left will move focus backward one month, down/right will move focus forward one month. With the ctrl key, up/left will move focus backward one year, down/right will move focus forward one year. Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year. enter ----- When the picker is visible, enter will toggle the focused date (if there is one). When the picker is not visible, enter will have normal effects -- submitting the current form, etc. When the date is deselected, the ``clearDate`` event is triggered; otherwise, the ``changeDate`` event is triggered. If ``autoclose`` is enabled, the picker will be hidden after selection or deselection. escape ------ The escape key can be used to clear the focused date and hide and re-show the datepicker; hiding the picker is necessary if the user wants to manually edit the value. ================================================ FILE: docs/make.bat ================================================ @ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\bootstrap-datepicker.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\bootstrap-datepicker.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) :end ================================================ FILE: docs/markup.rst ================================================ Markup ======= The following are examples of supported markup. On their own, these will not provide a datepicker widget; you will need to instantiate the datepicker on the markup. input ----- The simplest case: focusing the input (clicking or tabbing into it) will show the picker. .. code-block:: html .. figure:: _static/screenshots/markup_input.png :align: center component --------- Adding the ``date`` class to an ``input-group`` bootstrap component will allow the ``input-group-addon`` elements to trigger the picker. .. code-block:: html
.. figure:: _static/screenshots/markup_component.png :align: center .. _daterange: date-range ---------- Using the ``input-daterange`` construct with multiple child inputs will instantiate one picker per input and link them together to allow selecting ranges. .. code-block:: html
to
.. figure:: _static/screenshots/markup_daterange.png :align: center Note that that ``input-daterange`` itself does not implement the ``datepicker`` methods. Methods should be directly called to the inputs. For example: :: $('.input-daterange input').each(function() { $(this).datepicker('clearDates'); }); inline or embedded ------------------ Instantiating the datepicker on a simple div will give an embedded picker that is always visible. .. code-block:: html
.. figure:: _static/screenshots/markup_inline.png :align: center Example to save the embedded datepicker value to a hidden field .. code-block:: html
:: $('#datepicker').datepicker(); $('#datepicker').on('changeDate', function() { $('#my_hidden_input').val( $('#datepicker').datepicker('getFormattedDate') ); }); ================================================ FILE: docs/methods.rst ================================================ Methods ======= Methods are called on a datepicker by calling the ``datepicker`` function with a string first argument, followed by any arguments the method takes :: $('.datepicker').datepicker('method', arg1, arg2); destroy ------- Arguments: None Remove the datepicker. Removes attached events, internal attached objects, and added HTML elements. *Alias: remove* show ---- Arguments: None Show the picker. hide ---- Arguments: None Hide the picker. update ------ Arguments: * date (String|Date|Array, optional) * date (String|Date, optional) * ... Update the datepicker with given arguments or the current input value. The arguments can be either an array of strings, an array of Date objects, multiples strings or multiples Date objects. If ``date`` arguments are provided and they are Date objects, it is assumed to be "local" Date objects, and will be converted to UTC for internal use. :: $('.datepicker').datepicker('update'); $('.datepicker').datepicker('update', '2011-03-05'); $('.datepicker').datepicker('update', '2011-03-05', '2011-03-07'); $('.datepicker').datepicker('update', new Date(2011, 2, 5)); $('.datepicker').datepicker('update', [new Date(2011, 2, 5), new Date(2011, 2, 7)]); To reset the datepicker and clear the selected date, pass an empty string with ``update``: :: $('.datepicker').datepicker('update', ''); setDate ------- Arguments: * date (Date) Sets the internal date. ``date`` is assumed to be a "local" date object, and will be converted to UTC for internal use. setUTCDate ---------- Arguments: * date (Date) Sets the internal date. ``date`` is assumed to be a UTC date object, and will not be converted. setDates -------- Arguments: * date[, date[, ...]] (Date) or * [date[, date[, ...]]] (Array) Sets the internal date list; accepts multiple dates or a single array of dates as arguments. Each ``date`` is assumed to be a "local" date object, and will be converted to UTC for internal use. For use with multidate pickers. clearDates ---------- Arguments: None Clear dates. setUTCDates ----------- Arguments: * date[, date[, ...]] (Date) or * [date[, date[, ...]]] (Array) Sets the internal date list. Each ``date`` is assumed to be a UTC date object, and will not be converted. For use with multidate pickers. getDate ------- Arguments: None Returns a localized date object representing the internal date object of the first datepicker in the selection. For multidate pickers, returns the latest date selected. getUTCDate ---------- Arguments: None Returns the internal UTC date object, as-is and unconverted to local time, of the first datepicker in the selection. For multidate pickers, returns the latest date selected. getDates -------- Arguments: None Returns a list of localized date objects representing the internal date objects of the first datepicker in the selection. For use with multidate pickers. getUTCDates ----------- Arguments: None Returns the internal list of UTC date objects, as they are and unconverted to local time, of the first datepicker in the selection. For use with multidate pickers. getStartDate ------------ Arguments: None Returns the lower date limit on the datepicker. getEndDate ---------- Arguments: None Returns the upper date limit on the datepicker. setStartDate ------------ Arguments: * startDate (Date) Sets a new lower date limit on the datepicker. See :ref:`startDate` for valid values. Omit startDate (or provide an otherwise falsey value) to unset the limit. setEndDate ---------- Arguments: * endDate (Date) Sets a new upper date limit on the datepicker. See :ref:`endDate` for valid values. Omit endDate (or provide an otherwise falsey value) to unset the limit. setDatesDisabled ---------------- Arguments: * datesDisabled (String|Array) Sets the days that should be disabled. See :ref:`datesDisabled` for valid values. Omit datesDisabled (or provide an otherwise falsey value) to unset the disabled days. setDaysOfWeekDisabled --------------------- Arguments: * daysOfWeekDisabled (String|Array) Sets the days of week that should be disabled. See :ref:`daysOfWeekDisabled` for valid values. Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days of week. setDaysOfWeekHighlighted ------------------------ Arguments: * daysOfWeekHighlighted (String|Array) Sets the days of week that should be highlighted. See :ref:`daysOfWeekHighlighted` for valid values. Omit daysOfWeekHighlighted (or provide an otherwise falsey value) to unset the highlighted days of week. ================================================ FILE: docs/options.rst ================================================ Options ======= All options that take a "Date" can handle a ``Date`` object; a String formatted according to the given ``format``; or a timedelta relative to today, eg "-1d", "+6m +1y", etc, where valid units are "d" (day), "w" (week), "m" (month), and "y" (year). Use "0" as today. There are also aliases for the relative timedelta's: "yesterday" equals "-1d", "today" is equal to "+0d" and "tomorrow" is equal to "+1d". Most options can be provided via data-attributes. An option can be converted to a data-attribute by taking its name, replacing each uppercase letter with its lowercase equivalent preceded by a dash, and prepending "data-date-" to the result. For example, ``startDate`` would be ``data-date-start-date``, ``format`` would be ``data-date-format``, and ``daysOfWeekDisabled`` would be ``data-date-days-of-week-disabled``. See the `quick reference`_ for an overview of all options and their default values autoclose --------- Boolean. Default: false Whether or not to close the datepicker immediately when a date is selected. assumeNearbyYear ---------------- Boolean or Integer. Default: false If true, manually-entered dates with two-digit years, such as "5/1/15", will be parsed as "2015", not "15". If the year is less than 10 years in advance, the picker will use the current century, otherwise, it will use the previous one. For example "5/1/15" would parse to May 1st, 2015, but "5/1/97" would be May 1st, 1997. To configure the number of years in advance that the picker will still use the current century, use an Integer instead of the Boolean true. E.g. "assumeNearbyYear: 20" beforeShowDay ------------- Function(Date). Default: $.noop A function that takes a date as a parameter and returns one of the following values: * undefined to have no effect * A Boolean, indicating whether or not this date is selectable * A String representing additional CSS classes to apply to the date's cell * An object with the following properties: * ``enabled``: same as the Boolean value above * ``classes``: same as the String value above * ``tooltip``: a tooltip to apply to this date, via the ``title`` HTML attribute * ``content``: the content to display in the day cell, rather than the default (day of month as text) beforeShowMonth --------------- Function(Date). Default: $.noop A function that takes a date as a parameter and returns one of the following values: * undefined to have no effect * A Boolean, indicating whether or not this month is selectable * A String representing additional CSS classes to apply to the month's cell * An object with the following properties: * ``enabled``: same as the Boolean value above * ``classes``: same as the String value above * ``tooltip``: a tooltip to apply to this date, via the ``title`` HTML attribute beforeShowYear -------------- Function(Date). Default: $.noop A function that takes a date as a parameter and returns one of the following values: * undefined to have no effect * A Boolean, indicating whether or not this year is selectable * A String representing additional CSS classes to apply to the year's cell * An object with the following properties: * ``enabled``: same as the Boolean value above * ``classes``: same as the String value above * ``tooltip``: a tooltip to apply to this year, via the ``title`` HTML attribute beforeShowDecade ---------------- Function(Date). Default: $.noop A function that takes a date as a parameter and returns one of the following values: * undefined to have no effect * A Boolean, indicating whether or not this year is selectable * A String representing additional CSS classes to apply to the year's cell * An object with the following properties: * ``enabled``: same as the Boolean value above * ``classes``: same as the String value above * ``tooltip``: a tooltip to apply to this year, via the ``title`` HTML attribute beforeShowCentury ----------------- Function(Date). Default: $.noop A function that takes a date as a parameter and returns one of the following values: * undefined to have no effect * A Boolean, indicating whether or not this year is selectable * A String representing additional CSS classes to apply to the year's cell * An object with the following properties: * ``enabled``: same as the Boolean value above * ``classes``: same as the String value above * ``tooltip``: a tooltip to apply to this year, via the ``title`` HTML attribute calendarWeeks ------------- Boolean. Default: false Whether or not to show week numbers to the left of week rows. .. figure:: _static/screenshots/option_calendarweeks.png :align: center clearBtn -------- Boolean. Default: false If true, displays a "Clear" button at the bottom of the datepicker to clear the input value. If "autoclose" is also set to true, this button will also close the datepicker. .. figure:: _static/screenshots/option_clearbtn.png :align: center container --------- String. Default: "body" Appends the date picker popup to a specific element; eg: container: '#picker-container' (will default to "body") .. _datesDisabled: datesDisabled ------------- String, Array. Default: [] Array of date strings or a single date string formatted in the given date format .. _daysOfWeekDisabled: daysOfWeekDisabled ------------------ String, Array. Default: [] Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: ``'06'`` or ``'0,6'`` or ``[0,6]``. .. figure:: _static/screenshots/option_daysofweekdisabled.png :align: center .. _daysOfWeekHighlighted: daysOfWeekHighlighted --------------------- String, Array. Default: [] Days of the week that should be highlighted. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: highlight weekends: ``'06'`` or ``'0,6'`` or ``[0,6]``. defaultViewDate --------------- Date, String or Object with keys ``year``, ``month``, and ``day``. Default: today Date to view when initially opening the calendar. The internal value of the date remains today as default, but when the datepicker is first opened the calendar will open to ``defaultViewDate`` rather than today. If this option is not used, "today" remains the default view date. This option can be: * A date, which should be in local timezone. * A string which must be parsable with ``format``. * An object with keys ``year``, ``month`` and ``day`` (can't be set from a data attribute). If the given object is missing any of the required keys, their defaults are: * ``year``: the current year * ``month``: 0 (Note that it starts with 0 for January) * ``day``: 1 disableTouchKeyboard -------------------- Boolean. Default: false If true, no keyboard will show on mobile devices enableOnReadonly ---------------- Boolean. Default: true If false the datepicker will not show on a readonly datepicker field. .. _endDate: endDate ------- Date or String. Default: End of time The latest date that may be selected; all later dates will be disabled. Date should be in local timezone. String must be parsable with ``format``. .. figure:: _static/screenshots/option_enddate.png :align: center .. code-block:: html Will disable all dates after today. forceParse ---------- Boolean. Default: true Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given `format`. format ------ String. Default: "mm/dd/yyyy" The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy. * d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05. * D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday. * m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07. * M, MM: Abbreviated and full month names, respectively. Eg, Jan, January * yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012. Object. Custom formatting options * toDisplay: function (date, format, language) to convert date object to string, that will be stored in input field * toValue: function (date, format, language) to convert string object to date, that will be used in date selection :: $('.datepicker').datepicker({ format: { /* * Say our UI should display a week ahead, * but textbox should store the actual date. * This is useful if we need UI to select local dates, * but store in UTC */ toDisplay: function (date, format, language) { var d = new Date(date); d.setDate(d.getDate() - 7); return d.toISOString(); }, toValue: function (date, format, language) { var d = new Date(date); d.setDate(d.getDate() + 7); return new Date(d); } } }); immediateUpdates ---------------- Boolean. Default: false If true, selecting a year or month in the datepicker will update the input value immediately. Otherwise, only selecting a day of the month will update the input value immediately. inputs ------ Array, jQuery. Default: None A list of inputs to be used in a range picker, which will be attached to the selected element. Allows for explicitly creating a range picker on a non-standard element. .. code-block:: html
:: $('#event_period').datepicker({ inputs: $('.actual_range') }); keepEmptyValues --------------- Boolean. Default: false Only effective in a range picker. If true, the selected value does not get propagated to other, currently empty, pickers in the range. keyboardNavigation ------------------ Boolean. Default: true Whether or not to allow date navigation by arrow keys. Keyboard navigation is not supported at all for embedded / inline mode. Also it's not working if input element hasn't focus. This could be an issue if used as component or if opened by `show` method. language -------- String. Default: "en" The IETF code (eg "en" for English, "pt-BR" for Brazilian Portuguese) of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). If a full code (eg "de-DE") is supplied the picker will first check for an "de-DE" language and if not found will fallback and check for a "de" language. If an unknown language code is given, English will be used. See :doc:`i18n`. .. figure:: _static/screenshots/option_language.png :align: center maxViewMode ----------- Number, String. Default: 4, "centuries" Set a maximum limit for the view mode. Accepts: 0 or "days" or "month", 1 or "months" or "year", 2 or "years" or "decade", 3 or "decades" or "century", and 4 or "centuries" or "millennium". Gives the ability to pick only a day, a month, a year or a decade. The day is set to the 1st for "months", the month is set to January for "years", the year is set to the first year from the decade for "decades", and the year is set to the first from the millennium for "centuries". minViewMode ----------- Number, String. Default: 0, "days" Set a minimum limit for the view mode. Accepts: 0 or "days" or "month", 1 or "months" or "year", 2 or "years" or "decade", 3 or "decades" or "century", and 4 or "centuries" or "millennium". Gives the ability to pick only a month, a year or a decade. The day is set to the 1st for "months", and the month is set to January for "years", the year is set to the first year from the decade for "decades", and the year is set to the first from the millennium for "centuries". multidate --------- Boolean, Number. Default: false Enable multidate picking. Each date in month view acts as a toggle button, keeping track of which dates the user has selected in order. If a number is given, the picker will limit how many dates can be selected to that number, dropping the oldest dates from the list when the number is exceeded. ``true`` equates to no limit. The input's value (if present) is set to a string generated by joining the dates, formatted, with ``multidateSeparator``. For selecting 2 dates as a range please see :ref:`daterange` .. figure:: _static/screenshots/option_multidate.png :align: center multidateSeparator ------------------ String. Default: "," The string that will appear between dates when generating the input's value. When parsing the input's value for a multidate picker, this will also be used to split the incoming string to separate multiple formatted dates; as such, it is highly recommended that you not use a string that could be a substring of a formatted date (eg, using '-' to separate dates when your format is 'yyyy-mm-dd'). orientation ----------- String. Default: "auto" A space-separated string consisting of one or two of "left" or "right", "top" or "bottom", and "auto" (may be omitted); for example, "top left", "bottom" (horizontal orientation will default to "auto"), "right" (vertical orientation will default to "auto"), "auto top". Allows for fixed placement of the picker popup. "orientation" refers to the location of the picker popup's "anchor"; you can also think of it as the location of the trigger element (input, component, etc) relative to the picker. "auto" triggers "smart orientation" of the picker. Horizontal orientation will default to "left" and left offset will be tweaked to keep the picker inside the browser viewport; vertical orientation will simply choose "top" or "bottom", whichever will show more of the picker in the viewport. showOnFocus ----------- Boolean. Default: true If false, the datepicker will be prevented from showing when the input field associated with it receives focus. .. _startdate: startDate --------- Date or String. Default: Beginning of time The earliest date that may be selected; all earlier dates will be disabled. Date should be in local timezone. String must be parsable with ``format``. .. figure:: _static/screenshots/option_startdate.png :align: center startView --------- Number, String. Default: 0, "days" The view that the datepicker should show when it is opened. Accepts: 0 or "days" or "month", 1 or "months" or "year", 2 or "years" or "decade", 3 or "decades" or "century", and 4 or "centuries" or "millennium". Useful for date-of-birth datepickers. templates --------- Object. Default: :: { leftArrow: '«', rightArrow: '»' } The templates used to generate some parts of the picker. Each property must be a string with only text, or valid html. You can use this property to use custom icons libs. for example: :: { leftArrow: '', rightArrow: '' } showWeekDays ------------ Boolean. Default: true If false, the datepicker will not append the names of the weekdays to its view. Default behavior is appending the weekdays. .. figure:: _static/screenshots/option_showweekdays.png :align: center title ----- String. Default: "" The string that will appear on top of the datepicker. If empty the title will be hidden. todayBtn -------- Boolean, "linked". Default: false If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected. .. figure:: _static/screenshots/option_todaybtn.png :align: center todayHighlight -------------- Boolean. Default: false If true, highlights the current date. .. figure:: _static/screenshots/option_todayhighlight.png :align: center toggleActive ------------ Boolean. Default: false If true, selecting the currently active date in the datepicker will unset the respective date. This option is always true when the multidate option is being used. updateViewDate -------------- Boolean. Default: true If false viewDate is set according to `value` on initialization and updated * if a day in last oder next month is selected or * if dates are changed by `setDate`, `setDates`, `setUTCDate` and `setUTCDates` methods. If `multidate` option is `true` the last selected date or the last date in array passed to `setDates` or `setUTCDates` is used. weekStart --------- Integer. Default: 0 Day of the week start. 0 (Sunday) to 6 (Saturday) .. figure:: _static/screenshots/option_weekstart.png :align: center zIndexOffset ------------ Integer. Default: 10 The CSS z-index of the open datepicker is the maximum z-index of the input and all of its DOM ancestors *plus* the ``zIndexOffset``. Quick reference =============== This is a quick overview of all the options and their default values ===================== ============= Option Default value ===================== ============= autoclose false assumeNearbyYear false beforeShowDay beforeShowMonth beforeShowYear beforeShowDecade beforeShowCentury calendarWeeks false clearBtn false container 'body' datesDisabled [] daysOfWeekDisabled [] daysOfWeekHighlighted [] defaultViewDate today disableTouchKeyboard false enableOnReadonly true endDate Infinity forceParse true format 'mm/dd/yyyy' immediateUpdates false inputs keepEmptyValues false keyboardNavigation true language 'en' maxViewMode 4 'centuries' minViewMode 0 'days' multidate false multidateSeparator ',' orientation 'auto' showOnFocus true startDate -Infinity startView 0 'days' (current month) templates title '' todayBtn false todayHighlight false toggleActive false weekStart 0 (Sunday) zIndexOffset 10 ===================== ============= ================================================ FILE: docs/requirements.txt ================================================ sphinx_rtd_theme ================================================ FILE: docs/screenshots.js ================================================ const fs = require('fs'); const path = require('path'); const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch({ args: [ '--disable-gpu', '--disable-translate', '--disable-extensions', '--hide-scrollbars' ] }); const page = await browser.newPage(); const files = fs.readdirSync(`${__dirname}/_screenshots/`); for (const file of files) { const ext = path.extname(file); if (ext !== '.html') { continue; } const name = path.basename(file, ext); const url = `file://${__dirname}/_screenshots/${file}`; await page.goto(url, { waitUntil: 'networkidle2' }); const box = await page.evaluate(() => { const lefts = []; const rights = []; const tops = []; const bottoms = []; const padding = 10; // px const captureNodes = document.querySelectorAll(document.body.dataset.capture); for (const node of captureNodes) { const rect = node.getBoundingClientRect(); lefts.push(rect.left); rights.push(rect.right); tops.push(rect.top); bottoms.push(rect.bottom); } // Convert bounds to single bounding box const b = { top: Math.min.apply(Math, tops), left: Math.min.apply(Math, lefts) }; b.width = Math.max.apply(Math, rights) - b.left; b.height = Math.max.apply(Math, bottoms) - b.top; // Return bounding box return { y: Math.max(b.top - padding, 0), x: Math.max(b.left - padding, 0), width: b.width + 2 * padding, height: b.height + 2 * padding }; }); await page.screenshot({ path: `${__dirname}/_static/screenshots/${name}.png`, omitBackground: true, clip: box }); } await browser.close(); })(); ================================================ FILE: grunt/.jshintrc ================================================ { "extends" : "../js/.jshintrc", "asi" : false, "browser" : false, "es3" : false, "node" : true } ================================================ FILE: js/.jscsrc ================================================ { "requireSpaceAfterKeywords": [ "if", "else", "for", "while", "do", "switch", "return" ], "disallowSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, "disallowSpacesInsideObjectBrackets": true, "disallowSpacesInsideArrayBrackets": true, "disallowSpacesInsideParentheses": true, "disallowQuotedKeysInObjects": "allButReserved", "disallowSpaceAfterObjectKeys": true, "requireSpaceAfterBinaryOperators": ["==", "===", "!=", "!==", ">", "<", ">=", "<="], "requireSpaceBeforeBinaryOperators": ["==", "===", "!=", "!==", ">", "<", ">=", "<="], "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], "disallowSpaceBeforeBinaryOperators": [","], "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], "validateLineBreaks": "LF", "requireKeywordsOnNewLine": ["return", "break", "delete"], "requireLineFeedAtFileEnd": true } ================================================ FILE: js/.jshintrc ================================================ { // Extra globals. "predef" : [ "require", "define" ], "jquery": true, "browser": true, "eqeqeq": true, "freeze": true, //"indent": 4, // when we move to spaces "latedef": false, "undef": true, "unused": false, "immed": true, "trailing": true, "maxcomplexity": 50, // Can we get this under 5? //"maxlen": 120, "-W014": false, // Bad line breaking before ? (in tertiary operator) "-W065": false, // Missing radix parameter to parseInt (defaults to 10) "-W069": false, // Literal accessor is better written in dot notation "-W100": false // Silently deleted characters (in locales) } ================================================ FILE: js/bootstrap-datepicker.js ================================================ /* ========================================================= * bootstrap-datepicker.js * Repo: https://github.com/uxsolutions/bootstrap-datepicker/ * Demo: https://uxsolutions.github.io/bootstrap-datepicker/ * Docs: https://bootstrap-datepicker.readthedocs.org/ * ========================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================= */ (function(factory){ if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports === 'object') { factory(require('jquery')); } else { factory(jQuery); } }(function($, undefined){ function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } function UTCToday(){ var today = new Date(); return UTCDate(today.getFullYear(), today.getMonth(), today.getDate()); } function isUTCEquals(date1, date2) { return ( date1.getUTCFullYear() === date2.getUTCFullYear() && date1.getUTCMonth() === date2.getUTCMonth() && date1.getUTCDate() === date2.getUTCDate() ); } function alias(method, deprecationMsg){ return function(){ if (deprecationMsg !== undefined) { $.fn.datepicker.deprecated(deprecationMsg); } return this[method].apply(this, arguments); }; } function isValidDate(d) { return d && !isNaN(d.getTime()); } var DateArray = (function(){ var extras = { get: function(i){ return this.slice(i)[0]; }, contains: function(d){ // Array.indexOf is not cross-browser; // $.inArray doesn't work with Dates var val = d && d.valueOf(); for (var i=0, l=this.length; i < l; i++) // Use date arithmetic to allow dates with different times to match if (0 <= this[i].valueOf() - val && this[i].valueOf() - val < 1000*60*60*24) return i; return -1; }, remove: function(i){ this.splice(i,1); }, replace: function(new_array){ if (!new_array) return; if (!Array.isArray(new_array)) new_array = [new_array]; this.clear(); this.push.apply(this, new_array); }, clear: function(){ this.length = 0; }, copy: function(){ var a = new DateArray(); a.replace(this); return a; } }; return function(){ var a = []; a.push.apply(a, arguments); $.extend(a, extras); return a; }; })(); // Picker object var Datepicker = function(element, options){ $.data(element, 'datepicker', this); this._events = []; this._secondaryEvents = []; this._process_options(options); this.dates = new DateArray(); this.viewDate = this.o.defaultViewDate; this.focusDate = null; this.element = $(element); this.isInput = this.element.is('input'); this.inputField = this.isInput ? this.element : this.element.find('input'); this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn') : false; if (this.component && this.component.length === 0){ this.component = false; } if (this.o.isInline === null){ this.isInline = !this.component && !this.isInput; } else { this.isInline = this.o.isInline; } this.picker = $(DPGlobal.template); // Checking templates and inserting if (this._check_template(this.o.templates.leftArrow)) { this.picker.find('.prev').html(this.o.templates.leftArrow); } if (this._check_template(this.o.templates.rightArrow)) { this.picker.find('.next').html(this.o.templates.rightArrow); } this._buildEvents(); this._attachEvents(); if (this.isInline){ this.picker.addClass('datepicker-inline').appendTo(this.element); } else { this.picker.addClass('datepicker-dropdown dropdown-menu'); } if (this.o.rtl){ this.picker.addClass('datepicker-rtl'); } if (this.o.calendarWeeks) { this.picker.find('.datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear') .attr('colspan', function(i, val){ return Number(val) + 1; }); } this._process_options({ startDate: this._o.startDate, endDate: this._o.endDate, daysOfWeekDisabled: this.o.daysOfWeekDisabled, daysOfWeekHighlighted: this.o.daysOfWeekHighlighted, datesDisabled: this.o.datesDisabled }); this._allow_update = false; this.setViewMode(this.o.startView); this._allow_update = true; this.fillDow(); this.fillMonths(); this.update(); if (this.isInline){ this.show(); } }; Datepicker.prototype = { constructor: Datepicker, _resolveViewName: function(view){ $.each(DPGlobal.viewModes, function(i, viewMode){ if (view === i || $.inArray(view, viewMode.names) !== -1){ view = i; return false; } }); return view; }, _resolveDaysOfWeek: function(daysOfWeek){ if (!Array.isArray(daysOfWeek)) daysOfWeek = daysOfWeek.split(/[,\s]*/); return $.map(daysOfWeek, Number); }, _check_template: function(tmp){ try { // If empty if (tmp === undefined || tmp === "") { return false; } // If no html, everything ok if ((tmp.match(/[<>]/g) || []).length <= 0) { return true; } // Checking if html is fine var jDom = $(tmp); return jDom.length > 0; } catch (ex) { return false; } }, _process_options: function(opts){ // Store raw options for reference this._o = $.extend({}, this._o, opts); // Processed options var o = this.o = $.extend({}, this._o); // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" var lang = o.language; if (!dates[lang]){ lang = lang.split('-')[0]; if (!dates[lang]) lang = defaults.language; } o.language = lang; // Retrieve view index from any aliases o.startView = this._resolveViewName(o.startView); o.minViewMode = this._resolveViewName(o.minViewMode); o.maxViewMode = this._resolveViewName(o.maxViewMode); // Check view is between min and max o.startView = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, o.startView)); // true, false, or Number > 0 if (o.multidate !== true){ o.multidate = Number(o.multidate) || false; if (o.multidate !== false) o.multidate = Math.max(0, o.multidate); } o.multidateSeparator = String(o.multidateSeparator); o.weekStart %= 7; o.weekEnd = (o.weekStart + 6) % 7; var format = DPGlobal.parseFormat(o.format); if (o.startDate !== -Infinity){ if (!!o.startDate){ if (o.startDate instanceof Date) o.startDate = this._local_to_utc(this._zero_time(o.startDate)); else o.startDate = DPGlobal.parseDate(o.startDate, format, o.language, o.assumeNearbyYear); } else { o.startDate = -Infinity; } } if (o.endDate !== Infinity){ if (!!o.endDate){ if (o.endDate instanceof Date) o.endDate = this._local_to_utc(this._zero_time(o.endDate)); else o.endDate = DPGlobal.parseDate(o.endDate, format, o.language, o.assumeNearbyYear); } else { o.endDate = Infinity; } } o.daysOfWeekDisabled = this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]); o.daysOfWeekHighlighted = this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]); o.datesDisabled = o.datesDisabled||[]; if (!Array.isArray(o.datesDisabled)) { o.datesDisabled = o.datesDisabled.split(','); } o.datesDisabled = $.map(o.datesDisabled, function(d){ return DPGlobal.parseDate(d, format, o.language, o.assumeNearbyYear); }); var plc = String(o.orientation).toLowerCase().split(/\s+/g), _plc = o.orientation.toLowerCase(); plc = $.grep(plc, function(word){ return /^auto|left|right|top|bottom$/.test(word); }); o.orientation = {x: 'auto', y: 'auto'}; if (!_plc || _plc === 'auto') ; // no action else if (plc.length === 1){ switch (plc[0]){ case 'top': case 'bottom': o.orientation.y = plc[0]; break; case 'left': case 'right': o.orientation.x = plc[0]; break; } } else { _plc = $.grep(plc, function(word){ return /^left|right$/.test(word); }); o.orientation.x = _plc[0] || 'auto'; _plc = $.grep(plc, function(word){ return /^top|bottom$/.test(word); }); o.orientation.y = _plc[0] || 'auto'; } if (o.defaultViewDate instanceof Date || typeof o.defaultViewDate === 'string') { o.defaultViewDate = DPGlobal.parseDate(o.defaultViewDate, format, o.language, o.assumeNearbyYear); } else if (o.defaultViewDate) { var year = o.defaultViewDate.year || new Date().getFullYear(); var month = o.defaultViewDate.month || 0; var day = o.defaultViewDate.day || 1; o.defaultViewDate = UTCDate(year, month, day); } else { o.defaultViewDate = UTCToday(); } }, _applyEvents: function(evs){ for (var i=0, el, ch, ev; i < evs.length; i++){ el = evs[i][0]; if (evs[i].length === 2){ ch = undefined; ev = evs[i][1]; } else if (evs[i].length === 3){ ch = evs[i][1]; ev = evs[i][2]; } el.on(ev, ch); } }, _unapplyEvents: function(evs){ for (var i=0, el, ev, ch; i < evs.length; i++){ el = evs[i][0]; if (evs[i].length === 2){ ch = undefined; ev = evs[i][1]; } else if (evs[i].length === 3){ ch = evs[i][1]; ev = evs[i][2]; } el.off(ev, ch); } }, _buildEvents: function(){ var events = { keyup: $.proxy(function(e){ if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1) this.update(); }, this), keydown: $.proxy(this.keydown, this), paste: $.proxy(this.paste, this) }; if (this.o.showOnFocus === true) { events.focus = $.proxy(this.show, this); } if (this.isInput) { // single input this._events = [ [this.element, events] ]; } // component: input + button else if (this.component && this.inputField.length) { this._events = [ // For components that are not readonly, allow keyboard nav [this.inputField, events], [this.component, { click: $.proxy(this.show, this) }] ]; } else { this._events = [ [this.element, { click: $.proxy(this.show, this), keydown: $.proxy(this.keydown, this) }] ]; } this._events.push( // Component: listen for blur on element descendants [this.element, '*', { blur: $.proxy(function(e){ this._focused_from = e.target; }, this) }], // Input: listen for blur on element [this.element, { blur: $.proxy(function(e){ this._focused_from = e.target; }, this) }] ); if (this.o.immediateUpdates) { // Trigger input updates immediately on changed year/month this._events.push([this.element, { 'changeYear changeMonth': $.proxy(function(e){ this.update(e.date); }, this) }]); } this._secondaryEvents = [ [this.picker, { click: $.proxy(this.click, this) }], [this.picker, '.prev, .next', { click: $.proxy(this.navArrowsClick, this) }], [this.picker, '.day:not(.disabled)', { click: $.proxy(this.dayCellClick, this) }], [$(window), { resize: $.proxy(this.place, this) }], [$(document), { 'mousedown touchstart': $.proxy(function(e){ // Clicked outside the datepicker, hide it if (!( this.element.is(e.target) || this.element.find(e.target).length || this.picker.is(e.target) || this.picker.find(e.target).length || this.isInline )){ this.hide(); } }, this) }] ]; }, _attachEvents: function(){ this._detachEvents(); this._applyEvents(this._events); }, _detachEvents: function(){ this._unapplyEvents(this._events); }, _attachSecondaryEvents: function(){ this._detachSecondaryEvents(); this._applyEvents(this._secondaryEvents); }, _detachSecondaryEvents: function(){ this._unapplyEvents(this._secondaryEvents); }, _trigger: function(event, altdate){ var date = altdate || this.dates.get(-1), local_date = this._utc_to_local(date); this.element.trigger({ type: event, date: local_date, viewMode: this.viewMode, dates: $.map(this.dates, this._utc_to_local), format: $.proxy(function(ix, format){ if (arguments.length === 0){ ix = this.dates.length - 1; format = this.o.format; } else if (typeof ix === 'string'){ format = ix; ix = this.dates.length - 1; } format = format || this.o.format; var date = this.dates.get(ix); return DPGlobal.formatDate(date, format, this.o.language); }, this) }); }, show: function(){ if (this.inputField.is(':disabled') || (this.inputField.prop('readonly') && this.o.enableOnReadonly === false)) return; if (!this.isInline) this.picker.appendTo(this.o.container); this.place(); this.picker.show(); this._attachSecondaryEvents(); this._trigger('show'); if ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) { $(this.element).blur(); } return this; }, hide: function(){ if (this.isInline || !this.picker.is(':visible')) return this; this.focusDate = null; this.picker.hide().detach(); this._detachSecondaryEvents(); this.setViewMode(this.o.startView); if (this.o.forceParse && this.inputField.val()) this.setValue(); this._trigger('hide'); return this; }, destroy: function(){ this.hide(); this._detachEvents(); this._detachSecondaryEvents(); this.picker.remove(); delete this.element.data().datepicker; if (!this.isInput){ delete this.element.data().date; } return this; }, paste: function(e){ var dateString; if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.types && $.inArray('text/plain', e.originalEvent.clipboardData.types) !== -1) { dateString = e.originalEvent.clipboardData.getData('text/plain'); } else if (window.clipboardData) { dateString = window.clipboardData.getData('Text'); } else { return; } this.setDate(dateString); this.update(); e.preventDefault(); }, _utc_to_local: function(utc){ if (!utc) { return utc; } var local = new Date(utc.getTime() + (utc.getTimezoneOffset() * 60000)); if (local.getTimezoneOffset() !== utc.getTimezoneOffset()) { local = new Date(utc.getTime() + (local.getTimezoneOffset() * 60000)); } return local; }, _local_to_utc: function(local){ return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000)); }, _zero_time: function(local){ return local && new Date(local.getFullYear(), local.getMonth(), local.getDate()); }, _zero_utc_time: function(utc){ return utc && UTCDate(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()); }, getDates: function(){ return $.map(this.dates, this._utc_to_local); }, getUTCDates: function(){ return $.map(this.dates, function(d){ return new Date(d); }); }, getDate: function(){ return this._utc_to_local(this.getUTCDate()); }, getUTCDate: function(){ var selected_date = this.dates.get(-1); if (selected_date !== undefined) { return new Date(selected_date); } else { return null; } }, clearDates: function(){ this.inputField.val(''); this._trigger('changeDate'); this.update(); if (this.o.autoclose) { this.hide(); } }, setDates: function(){ var args = Array.isArray(arguments[0]) ? arguments[0] : arguments; this.update.apply(this, args); this._trigger('changeDate'); this.setValue(); return this; }, setUTCDates: function(){ var args = Array.isArray(arguments[0]) ? arguments[0] : arguments; this.setDates.apply(this, $.map(args, this._utc_to_local)); return this; }, setDate: alias('setDates'), setUTCDate: alias('setUTCDates'), remove: alias('destroy', 'Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead'), setValue: function(){ var formatted = this.getFormattedDate(); this.inputField.val(formatted); return this; }, getFormattedDate: function(format){ if (format === undefined) format = this.o.format; var lang = this.o.language; return $.map(this.dates, function(d){ return DPGlobal.formatDate(d, format, lang); }).join(this.o.multidateSeparator); }, getStartDate: function(){ return this.o.startDate; }, setStartDate: function(startDate){ this._process_options({startDate: startDate}); this.update(); this.updateNavArrows(); return this; }, getEndDate: function(){ return this.o.endDate; }, setEndDate: function(endDate){ this._process_options({endDate: endDate}); this.update(); this.updateNavArrows(); return this; }, setDaysOfWeekDisabled: function(daysOfWeekDisabled){ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); this.update(); return this; }, setDaysOfWeekHighlighted: function(daysOfWeekHighlighted){ this._process_options({daysOfWeekHighlighted: daysOfWeekHighlighted}); this.update(); return this; }, setDatesDisabled: function(datesDisabled){ this._process_options({datesDisabled: datesDisabled}); this.update(); return this; }, place: function(){ if (this.isInline) return this; var calendarWidth = this.picker.outerWidth(), calendarHeight = this.picker.outerHeight(), visualPadding = 10, container = $(this.o.container), windowWidth = container.width(), scrollTop = this.o.container === 'body' ? $(document).scrollTop() : container.scrollTop(), appendOffset = container.offset(); var parentsZindex = [0]; this.element.parents().each(function(){ var itemZIndex = $(this).css('z-index'); if (itemZIndex !== 'auto' && Number(itemZIndex) !== 0) parentsZindex.push(Number(itemZIndex)); }); var zIndex = Math.max.apply(Math, parentsZindex) + this.o.zIndexOffset; var offset = this.component ? this.component.parent().offset() : this.element.offset(); var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false); var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false); var left = offset.left - appendOffset.left; var top = offset.top - appendOffset.top; if (this.o.container !== 'body') { top += scrollTop; } this.picker.removeClass( 'datepicker-orient-top datepicker-orient-bottom '+ 'datepicker-orient-right datepicker-orient-left' ); if (this.o.orientation.x !== 'auto'){ this.picker.addClass('datepicker-orient-' + this.o.orientation.x); if (this.o.orientation.x === 'right') left -= calendarWidth - width; } // auto x orientation is best-placement: if it crosses a window // edge, fudge it sideways else { if (offset.left < 0) { // component is outside the window on the left side. Move it into visible range this.picker.addClass('datepicker-orient-left'); left -= offset.left - visualPadding; } else if (left + calendarWidth > windowWidth) { // the calendar passes the widow right edge. Align it to component right side this.picker.addClass('datepicker-orient-right'); left += width - calendarWidth; } else { if (this.o.rtl) { // Default to right this.picker.addClass('datepicker-orient-right'); } else { // Default to left this.picker.addClass('datepicker-orient-left'); } } } // auto y orientation is best-situation: top or bottom, no fudging, // decision based on which shows more of the calendar var yorient = this.o.orientation.y, top_overflow; if (yorient === 'auto'){ top_overflow = -scrollTop + top - calendarHeight; yorient = top_overflow < 0 ? 'bottom' : 'top'; } this.picker.addClass('datepicker-orient-' + yorient); if (yorient === 'top') top -= calendarHeight + parseInt(this.picker.css('padding-top')); else top += height; if (this.o.rtl) { var right = windowWidth - (left + width); this.picker.css({ top: top, right: right, zIndex: zIndex }); } else { this.picker.css({ top: top, left: left, zIndex: zIndex }); } return this; }, _allow_update: true, update: function(){ if (!this._allow_update) return this; var oldDates = this.dates.copy(), dates = [], fromArgs = false; if (arguments.length){ $.each(arguments, $.proxy(function(i, date){ if (date instanceof Date) date = this._local_to_utc(date); dates.push(date); }, this)); fromArgs = true; } else { dates = this.isInput ? this.element.val() : this.element.data('date') || this.inputField.val(); if (dates && this.o.multidate) dates = dates.split(this.o.multidateSeparator); else dates = [dates]; delete this.element.data().date; } dates = $.map(dates, $.proxy(function(date){ return DPGlobal.parseDate(date, this.o.format, this.o.language, this.o.assumeNearbyYear); }, this)); dates = $.grep(dates, $.proxy(function(date){ return ( !this.dateWithinRange(date) || !date ); }, this), true); this.dates.replace(dates); if (this.o.updateViewDate) { if (this.dates.length) this.viewDate = new Date(this.dates.get(-1)); else if (this.viewDate < this.o.startDate) this.viewDate = new Date(this.o.startDate); else if (this.viewDate > this.o.endDate) this.viewDate = new Date(this.o.endDate); else this.viewDate = this.o.defaultViewDate; } if (fromArgs){ // setting date by clicking this.setValue(); this.element.change(); } else if (this.dates.length){ // setting date by typing if (String(oldDates) !== String(this.dates) && fromArgs) { this._trigger('changeDate'); this.element.change(); } } if (!this.dates.length && oldDates.length) { this._trigger('clearDate'); this.element.change(); } this.fill(); return this; }, fillDow: function(){ if (this.o.showWeekDays) { var dowCnt = this.o.weekStart, html = ''; if (this.o.calendarWeeks){ html += ' '; } while (dowCnt < this.o.weekStart + 7){ html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+''; } html += ''; this.picker.find('.datepicker-days thead').append(html); } }, fillMonths: function(){ var localDate = this._utc_to_local(this.viewDate); var html = ''; var focused; for (var i = 0; i < 12; i++){ focused = localDate && localDate.getMonth() === i ? ' focused' : ''; html += '' + dates[this.o.language].monthsShort[i] + ''; } this.picker.find('.datepicker-months td').html(html); }, setRange: function(range){ if (!range || !range.length) delete this.range; else this.range = $.map(range, function(d){ return d.valueOf(); }); this.fill(); }, getClassNames: function(date){ var cls = [], year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(), today = UTCToday(); if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){ cls.push('old'); } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){ cls.push('new'); } if (this.focusDate && date.valueOf() === this.focusDate.valueOf()) cls.push('focused'); // Compare internal UTC date with UTC today, not local today if (this.o.todayHighlight && isUTCEquals(date, today)) { cls.push('today'); } if (this.dates.contains(date) !== -1) cls.push('active'); if (!this.dateWithinRange(date)){ cls.push('disabled'); } if (this.dateIsDisabled(date)){ cls.push('disabled', 'disabled-date'); } if ($.inArray(date.getUTCDay(), this.o.daysOfWeekHighlighted) !== -1){ cls.push('highlighted'); } if (this.range){ if (date > this.range[0] && date < this.range[this.range.length-1]){ cls.push('range'); } if ($.inArray(date.valueOf(), this.range) !== -1){ cls.push('selected'); } if (date.valueOf() === this.range[0]){ cls.push('range-start'); } if (date.valueOf() === this.range[this.range.length-1]){ cls.push('range-end'); } } return cls; }, _fill_yearsView: function(selector, cssClass, factor, year, startYear, endYear, beforeFn){ var html = ''; var step = factor / 10; var view = this.picker.find(selector); var startVal = Math.floor(year / factor) * factor; var endVal = startVal + step * 9; var focusedVal = Math.floor(this.viewDate.getFullYear() / step) * step; var selected = $.map(this.dates, function(d){ return Math.floor(d.getUTCFullYear() / step) * step; }); var classes, tooltip, before; for (var currVal = startVal - step; currVal <= endVal + step; currVal += step) { classes = [cssClass]; tooltip = null; if (currVal === startVal - step) { classes.push('old'); } else if (currVal === endVal + step) { classes.push('new'); } if ($.inArray(currVal, selected) !== -1) { classes.push('active'); } if (currVal < startYear || currVal > endYear) { classes.push('disabled'); } if (currVal === focusedVal) { classes.push('focused'); } if (beforeFn !== $.noop) { before = beforeFn(new Date(currVal, 0, 1)); if (before === undefined) { before = {}; } else if (typeof before === 'boolean') { before = {enabled: before}; } else if (typeof before === 'string') { before = {classes: before}; } if (before.enabled === false) { classes.push('disabled'); } if (before.classes) { classes = classes.concat(before.classes.split(/\s+/)); } if (before.tooltip) { tooltip = before.tooltip; } } html += '' + currVal + ''; } view.find('.datepicker-switch').text(startVal + '-' + endVal); view.find('td').html(html); }, fill: function(){ var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, todaytxt = dates[this.o.language].today || dates['en'].today || '', cleartxt = dates[this.o.language].clear || dates['en'].clear || '', titleFormat = dates[this.o.language].titleFormat || dates['en'].titleFormat, todayDate = UTCToday(), titleBtnVisible = (this.o.todayBtn === true || this.o.todayBtn === 'linked') && todayDate >= this.o.startDate && todayDate <= this.o.endDate && !this.weekOfDateIsDisabled(todayDate), tooltip, before; if (isNaN(year) || isNaN(month)) return; this.picker.find('.datepicker-days .datepicker-switch') .text(DPGlobal.formatDate(d, titleFormat, this.o.language)); this.picker.find('tfoot .today') .text(todaytxt) .css('display', titleBtnVisible ? 'table-cell' : 'none'); this.picker.find('tfoot .clear') .text(cleartxt) .css('display', this.o.clearBtn === true ? 'table-cell' : 'none'); this.picker.find('thead .datepicker-title') .text(this.o.title) .css('display', typeof this.o.title === 'string' && this.o.title !== '' ? 'table-cell' : 'none'); this.updateNavArrows(); this.fillMonths(); var prevMonth = UTCDate(year, month, 0), day = prevMonth.getUTCDate(); prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); var nextMonth = new Date(prevMonth); if (prevMonth.getUTCFullYear() < 100){ nextMonth.setUTCFullYear(prevMonth.getUTCFullYear()); } nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); nextMonth = nextMonth.valueOf(); var html = []; var weekDay, clsName; while (prevMonth.valueOf() < nextMonth){ weekDay = prevMonth.getUTCDay(); if (weekDay === this.o.weekStart){ html.push(''); if (this.o.calendarWeeks){ // ISO 8601: First week contains first thursday. // ISO also states week starts on Monday, but we can be more abstract here. var // Start of current week: based on weekstart/current date ws = new Date(+prevMonth + (this.o.weekStart - weekDay - 7) % 7 * 864e5), // Thursday of this week th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), // First Thursday of year, year from thursday yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay()) % 7 * 864e5), // Calendar week: ms between thursdays, div ms per day, div 7 days calWeek = (th - yth) / 864e5 / 7 + 1; html.push(''+ calWeek +''); } } clsName = this.getClassNames(prevMonth); clsName.push('day'); var content = prevMonth.getUTCDate(); if (this.o.beforeShowDay !== $.noop){ before = this.o.beforeShowDay(this._utc_to_local(prevMonth)); if (before === undefined) before = {}; else if (typeof before === 'boolean') before = {enabled: before}; else if (typeof before === 'string') before = {classes: before}; if (before.enabled === false) clsName.push('disabled'); if (before.classes) clsName = clsName.concat(before.classes.split(/\s+/)); if (before.tooltip) tooltip = before.tooltip; if (before.content) content = before.content; } //Check if uniqueSort exists (supported by jquery >=1.12 and >=2.2) //Fallback to unique function for older jquery versions if (typeof $.uniqueSort === "function") { clsName = $.uniqueSort(clsName); } else { clsName = $.unique(clsName); } html.push('' + content + ''); tooltip = null; if (weekDay === this.o.weekEnd){ html.push(''); } prevMonth.setUTCDate(prevMonth.getUTCDate() + 1); } this.picker.find('.datepicker-days tbody').html(html.join('')); var monthsTitle = dates[this.o.language].monthsTitle || dates['en'].monthsTitle || 'Months'; var months = this.picker.find('.datepicker-months') .find('.datepicker-switch') .text(this.o.maxViewMode < 2 ? monthsTitle : year) .end() .find('tbody span').removeClass('active'); $.each(this.dates, function(i, d){ if (d.getUTCFullYear() === year) months.eq(d.getUTCMonth()).addClass('active'); }); if (year < startYear || year > endYear){ months.addClass('disabled'); } if (year === startYear){ months.slice(0, startMonth).addClass('disabled'); } if (year === endYear){ months.slice(endMonth+1).addClass('disabled'); } if (this.o.beforeShowMonth !== $.noop){ var that = this; $.each(months, function(i, month){ var moDate = new Date(year, i, 1); var before = that.o.beforeShowMonth(moDate); if (before === undefined) before = {}; else if (typeof before === 'boolean') before = {enabled: before}; else if (typeof before === 'string') before = {classes: before}; if (before.enabled === false && !$(month).hasClass('disabled')) $(month).addClass('disabled'); if (before.classes) $(month).addClass(before.classes); if (before.tooltip) $(month).prop('title', before.tooltip); }); } // Generating decade/years picker this._fill_yearsView( '.datepicker-years', 'year', 10, year, startYear, endYear, this.o.beforeShowYear ); // Generating century/decades picker this._fill_yearsView( '.datepicker-decades', 'decade', 100, year, startYear, endYear, this.o.beforeShowDecade ); // Generating millennium/centuries picker this._fill_yearsView( '.datepicker-centuries', 'century', 1000, year, startYear, endYear, this.o.beforeShowCentury ); }, updateNavArrows: function(){ if (!this._allow_update) return; var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, prevIsDisabled, nextIsDisabled, factor = 1; switch (this.viewMode){ case 4: factor *= 10; /* falls through */ case 3: factor *= 10; /* falls through */ case 2: factor *= 10; /* falls through */ case 1: prevIsDisabled = Math.floor(year / factor) * factor <= startYear; nextIsDisabled = Math.floor(year / factor) * factor + factor > endYear; break; case 0: prevIsDisabled = year <= startYear && month <= startMonth; nextIsDisabled = year >= endYear && month >= endMonth; break; } this.picker.find('.prev').toggleClass('disabled', prevIsDisabled); this.picker.find('.next').toggleClass('disabled', nextIsDisabled); }, click: function(e){ e.preventDefault(); e.stopPropagation(); var target, dir, day, year, month; target = $(e.target); // Clicked on the switch if (target.hasClass('datepicker-switch') && this.viewMode !== this.o.maxViewMode){ this.setViewMode(this.viewMode + 1); } // Clicked on today button if (target.hasClass('today') && !target.hasClass('day')){ this.setViewMode(0); this._setDate(UTCToday(), this.o.todayBtn === 'linked' ? null : 'view'); } // Clicked on clear button if (target.hasClass('clear')){ this.clearDates(); } if (!target.hasClass('disabled')){ // Clicked on a month, year, decade, century if (target.hasClass('month') || target.hasClass('year') || target.hasClass('decade') || target.hasClass('century')) { this.viewDate.setUTCDate(1); day = 1; if (this.viewMode === 1){ month = target.parent().find('span').index(target); year = this.viewDate.getUTCFullYear(); this.viewDate.setUTCMonth(month); } else { month = 0; year = Number(target.text()); this.viewDate.setUTCFullYear(year); } this._trigger(DPGlobal.viewModes[this.viewMode - 1].e, this.viewDate); if (this.viewMode === this.o.minViewMode){ this._setDate(UTCDate(year, month, day)); } else { this.setViewMode(this.viewMode - 1); this.fill(); } } } if (this.picker.is(':visible') && this._focused_from){ this._focused_from.focus(); } delete this._focused_from; }, dayCellClick: function(e){ var $target = $(e.currentTarget); var timestamp = $target.data('date'); var date = new Date(timestamp); if (this.o.updateViewDate) { if (date.getUTCFullYear() !== this.viewDate.getUTCFullYear()) { this._trigger('changeYear', this.viewDate); } if (date.getUTCMonth() !== this.viewDate.getUTCMonth()) { this._trigger('changeMonth', this.viewDate); } } this._setDate(date); }, // Clicked on prev or next navArrowsClick: function(e){ var $target = $(e.currentTarget); var dir = $target.hasClass('prev') ? -1 : 1; if (this.viewMode !== 0){ dir *= DPGlobal.viewModes[this.viewMode].navStep * 12; } this.viewDate = this.moveMonth(this.viewDate, dir); this._trigger(DPGlobal.viewModes[this.viewMode].e, this.viewDate); this.fill(); }, _toggle_multidate: function(date){ var ix = this.dates.contains(date); if (!date){ this.dates.clear(); } if (ix !== -1){ if (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){ this.dates.remove(ix); } } else if (this.o.multidate === false) { this.dates.clear(); this.dates.push(date); } else { this.dates.push(date); } if (typeof this.o.multidate === 'number') while (this.dates.length > this.o.multidate) this.dates.remove(0); }, _setDate: function(date, which){ if (!which || which === 'date') this._toggle_multidate(date && new Date(date)); if ((!which && this.o.updateViewDate) || which === 'view') this.viewDate = date && new Date(date); this.fill(); this.setValue(); if (!which || which !== 'view') { this._trigger('changeDate'); } this.inputField.trigger('change'); if (this.o.autoclose && (!which || which === 'date')){ this.hide(); } }, moveDay: function(date, dir){ var newDate = new Date(date); newDate.setUTCDate(date.getUTCDate() + dir); return newDate; }, moveWeek: function(date, dir){ return this.moveDay(date, dir * 7); }, moveMonth: function(date, dir){ if (!isValidDate(date)) return this.o.defaultViewDate; if (!dir) return date; var new_date = new Date(date.valueOf()), day = new_date.getUTCDate(), month = new_date.getUTCMonth(), mag = Math.abs(dir), new_month, test; dir = dir > 0 ? 1 : -1; if (mag === 1){ test = dir === -1 // If going back one month, make sure month is not current month // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) ? function(){ return new_date.getUTCMonth() === month; } // If going forward one month, make sure month is as expected // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) : function(){ return new_date.getUTCMonth() !== new_month; }; new_month = month + dir; new_date.setUTCMonth(new_month); // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 new_month = (new_month + 12) % 12; } else { // For magnitudes >1, move one month at a time... for (var i=0; i < mag; i++) // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... new_date = this.moveMonth(new_date, dir); // ...then reset the day, keeping it in the new month new_month = new_date.getUTCMonth(); new_date.setUTCDate(day); test = function(){ return new_month !== new_date.getUTCMonth(); }; } // Common date-resetting loop -- if date is beyond end of month, make it // end of month while (test()){ new_date.setUTCDate(--day); new_date.setUTCMonth(new_month); } return new_date; }, moveYear: function(date, dir){ return this.moveMonth(date, dir*12); }, moveAvailableDate: function(date, dir, fn){ do { date = this[fn](date, dir); if (!this.dateWithinRange(date)) return false; fn = 'moveDay'; } while (this.dateIsDisabled(date)); return date; }, weekOfDateIsDisabled: function(date){ return $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1; }, dateIsDisabled: function(date){ return ( this.weekOfDateIsDisabled(date) || $.grep(this.o.datesDisabled, function(d){ return isUTCEquals(date, d); }).length > 0 ); }, dateWithinRange: function(date){ return date >= this.o.startDate && date <= this.o.endDate; }, keydown: function(e){ if (!this.picker.is(':visible')){ if (e.keyCode === 40 || e.keyCode === 27) { // allow down to re-show picker this.show(); e.stopPropagation(); } return; } var dateChanged = false, dir, newViewDate, focusDate = this.focusDate || this.viewDate; switch (e.keyCode){ case 27: // escape if (this.focusDate){ this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.fill(); } else this.hide(); e.preventDefault(); e.stopPropagation(); break; case 37: // left case 38: // up case 39: // right case 40: // down if (!this.o.keyboardNavigation || this.o.daysOfWeekDisabled.length === 7) break; dir = e.keyCode === 37 || e.keyCode === 38 ? -1 : 1; if (this.viewMode === 0) { if (e.ctrlKey){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear'); if (newViewDate) this._trigger('changeYear', this.viewDate); } else if (e.shiftKey){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth'); if (newViewDate) this._trigger('changeMonth', this.viewDate); } else if (e.keyCode === 37 || e.keyCode === 39){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveDay'); } else if (!this.weekOfDateIsDisabled(focusDate)){ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveWeek'); } } else if (this.viewMode === 1) { if (e.keyCode === 38 || e.keyCode === 40) { dir = dir * 4; } newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth'); } else if (this.viewMode === 2) { if (e.keyCode === 38 || e.keyCode === 40) { dir = dir * 4; } newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear'); } if (newViewDate){ this.focusDate = this.viewDate = newViewDate; this.setValue(); this.fill(); e.preventDefault(); } break; case 13: // enter if (!this.o.forceParse) break; focusDate = this.focusDate || this.dates.get(-1) || this.viewDate; if (this.o.keyboardNavigation) { this._toggle_multidate(focusDate); dateChanged = true; } this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.setValue(); this.fill(); if (this.picker.is(':visible')){ e.preventDefault(); e.stopPropagation(); if (this.o.autoclose) this.hide(); } break; case 9: // tab this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.fill(); this.hide(); break; } if (dateChanged){ if (this.dates.length) this._trigger('changeDate'); else this._trigger('clearDate'); this.inputField.trigger('change'); } }, setViewMode: function(viewMode){ this.viewMode = viewMode; this.picker .children('div') .hide() .filter('.datepicker-' + DPGlobal.viewModes[this.viewMode].clsName) .show(); this.updateNavArrows(); this._trigger('changeViewMode', new Date(this.viewDate)); } }; var DateRangePicker = function(element, options){ $.data(element, 'datepicker', this); this.element = $(element); this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; }); delete options.inputs; this.keepEmptyValues = options.keepEmptyValues; delete options.keepEmptyValues; datepickerPlugin.call($(this.inputs), options) .on('changeDate', $.proxy(this.dateUpdated, this)); this.pickers = $.map(this.inputs, function(i){ return $.data(i, 'datepicker'); }); this.updateDates(); }; DateRangePicker.prototype = { updateDates: function(){ this.dates = $.map(this.pickers, function(i){ return i.getUTCDate(); }); this.updateRanges(); }, updateRanges: function(){ var range = $.map(this.dates, function(d){ return d.valueOf(); }); $.each(this.pickers, function(i, p){ p.setRange(range); }); }, clearDates: function(){ $.each(this.pickers, function(i, p){ p.clearDates(); }); }, dateUpdated: function(e){ // `this.updating` is a workaround for preventing infinite recursion // between `changeDate` triggering and `setUTCDate` calling. Until // there is a better mechanism. if (this.updating) return; this.updating = true; var dp = $.data(e.target, 'datepicker'); if (dp === undefined) { return; } var new_date = dp.getUTCDate(), keep_empty_values = this.keepEmptyValues, i = $.inArray(e.target, this.inputs), j = i - 1, k = i + 1, l = this.inputs.length; if (i === -1) return; $.each(this.pickers, function(i, p){ if (!p.getUTCDate() && (p === dp || !keep_empty_values)) p.setUTCDate(new_date); }); if (new_date < this.dates[j]){ // Date being moved earlier/left while (j >= 0 && new_date < this.dates[j] && (this.pickers[j].element.val() || "").length > 0) { this.pickers[j--].setUTCDate(new_date); } } else if (new_date > this.dates[k]){ // Date being moved later/right while (k < l && new_date > this.dates[k] && (this.pickers[k].element.val() || "").length > 0) { this.pickers[k++].setUTCDate(new_date); } } this.updateDates(); delete this.updating; }, destroy: function(){ $.map(this.pickers, function(p){ p.destroy(); }); $(this.inputs).off('changeDate', this.dateUpdated); delete this.element.data().datepicker; }, remove: alias('destroy', 'Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead') }; function opts_from_el(el, prefix){ // Derive options from element data-attrs var data = $(el).data(), out = {}, inkey, replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'); prefix = new RegExp('^' + prefix.toLowerCase()); function re_lower(_,a){ return a.toLowerCase(); } for (var key in data) if (prefix.test(key)){ inkey = key.replace(replace, re_lower); out[inkey] = data[key]; } return out; } function opts_from_locale(lang){ // Derive options from locale plugins var out = {}; // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" if (!dates[lang]){ lang = lang.split('-')[0]; if (!dates[lang]) return; } var d = dates[lang]; $.each(locale_opts, function(i,k){ if (k in d) out[k] = d[k]; }); return out; } var old = $.fn.datepicker; var datepickerPlugin = function(option){ var args = Array.apply(null, arguments); args.shift(); var internal_return; this.each(function(){ var $this = $(this), data = $this.data('datepicker'), options = typeof option === 'object' && option; if (!data){ var elopts = opts_from_el(this, 'date'), // Preliminary otions xopts = $.extend({}, defaults, elopts, options), locopts = opts_from_locale(xopts.language), // Options priority: js args, data-attrs, locales, defaults opts = $.extend({}, defaults, locopts, elopts, options); if ($this.hasClass('input-daterange') || opts.inputs){ $.extend(opts, { inputs: opts.inputs || $this.find('input').toArray() }); data = new DateRangePicker(this, opts); } else { data = new Datepicker(this, opts); } $this.data('datepicker', data); } if (typeof option === 'string' && typeof data[option] === 'function'){ internal_return = data[option].apply(data, args); } }); if ( internal_return === undefined || internal_return instanceof Datepicker || internal_return instanceof DateRangePicker ) return this; if (this.length > 1) throw new Error('Using only allowed for the collection of a single element (' + option + ' function)'); else return internal_return; }; $.fn.datepicker = datepickerPlugin; var defaults = $.fn.datepicker.defaults = { assumeNearbyYear: false, autoclose: false, beforeShowDay: $.noop, beforeShowMonth: $.noop, beforeShowYear: $.noop, beforeShowDecade: $.noop, beforeShowCentury: $.noop, calendarWeeks: false, clearBtn: false, toggleActive: false, daysOfWeekDisabled: [], daysOfWeekHighlighted: [], datesDisabled: [], endDate: Infinity, forceParse: true, format: 'mm/dd/yyyy', isInline: null, keepEmptyValues: false, keyboardNavigation: true, language: 'en', minViewMode: 0, maxViewMode: 4, multidate: false, multidateSeparator: ',', orientation: "auto", rtl: false, startDate: -Infinity, startView: 0, todayBtn: false, todayHighlight: false, updateViewDate: true, weekStart: 0, disableTouchKeyboard: false, enableOnReadonly: true, showOnFocus: true, zIndexOffset: 10, container: 'body', immediateUpdates: false, title: '', templates: { leftArrow: '«', rightArrow: '»' }, showWeekDays: true }; var locale_opts = $.fn.datepicker.locale_opts = [ 'format', 'rtl', 'weekStart' ]; $.fn.datepicker.Constructor = Datepicker; var dates = $.fn.datepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear", titleFormat: "MM yyyy" } }; var DPGlobal = { viewModes: [ { names: ['days', 'month'], clsName: 'days', e: 'changeMonth' }, { names: ['months', 'year'], clsName: 'months', e: 'changeYear', navStep: 1 }, { names: ['years', 'decade'], clsName: 'years', e: 'changeDecade', navStep: 10 }, { names: ['decades', 'century'], clsName: 'decades', e: 'changeCentury', navStep: 100 }, { names: ['centuries', 'millennium'], clsName: 'centuries', e: 'changeMillennium', navStep: 1000 } ], validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, nonpunctuation: /[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g, parseFormat: function(format){ if (typeof format.toValue === 'function' && typeof format.toDisplay === 'function') return format; // IE treats \0 as a string end in inputs (truncating the value), // so it's a bad format delimiter, anyway var separators = format.replace(this.validParts, '\0').split('\0'), parts = format.match(this.validParts); if (!separators || !separators.length || !parts || parts.length === 0){ throw new Error("Invalid date format."); } return {separators: separators, parts: parts}; }, parseDate: function(date, format, language, assumeNearby){ if (!date) return undefined; if (date instanceof Date) return date; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (format.toValue) return format.toValue(date, format, language); var fn_map = { d: 'moveDay', m: 'moveMonth', w: 'moveWeek', y: 'moveYear' }, dateAliases = { yesterday: '-1d', today: '+0d', tomorrow: '+1d' }, parts, part, dir, i, fn; if (date in dateAliases){ date = dateAliases[date]; } if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(date)){ parts = date.match(/([\-+]\d+)([dmwy])/gi); date = new Date(); for (i=0; i < parts.length; i++){ part = parts[i].match(/([\-+]\d+)([dmwy])/i); dir = Number(part[1]); fn = fn_map[part[2].toLowerCase()]; date = Datepicker.prototype[fn](date, dir); } return Datepicker.prototype._zero_utc_time(date); } parts = date && date.match(this.nonpunctuation) || []; function applyNearbyYear(year, threshold){ if (threshold === true) threshold = 10; // if year is 2 digits or less, than the user most likely is trying to get a recent century if (year < 100){ year += 2000; // if the new year is more than threshold years in advance, use last century if (year > ((new Date()).getFullYear()+threshold)){ year -= 100; } } return year; } var parsed = {}, setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], setters_map = { yyyy: function(d,v){ return d.setUTCFullYear(assumeNearby ? applyNearbyYear(v, assumeNearby) : v); }, m: function(d,v){ if (isNaN(d)) return d; v -= 1; while (v < 0) v += 12; v %= 12; d.setUTCMonth(v); while (d.getUTCMonth() !== v) d.setUTCDate(d.getUTCDate()-1); return d; }, d: function(d,v){ return d.setUTCDate(v); } }, val, filtered; setters_map['yy'] = setters_map['yyyy']; setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; setters_map['dd'] = setters_map['d']; date = UTCToday(); var fparts = format.parts.slice(); // Remove noop parts if (parts.length !== fparts.length){ fparts = $(fparts).filter(function(i,p){ return $.inArray(p, setters_order) !== -1; }).toArray(); } // Process remainder function match_part(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m.toLowerCase() === p.toLowerCase(); } if (parts.length === fparts.length){ var cnt; for (i=0, cnt = fparts.length; i < cnt; i++){ val = parseInt(parts[i], 10); part = fparts[i]; if (isNaN(val)){ switch (part){ case 'MM': filtered = $(dates[language].months).filter(match_part); val = $.inArray(filtered[0], dates[language].months) + 1; break; case 'M': filtered = $(dates[language].monthsShort).filter(match_part); val = $.inArray(filtered[0], dates[language].monthsShort) + 1; break; } } parsed[part] = val; } var _date, s; for (i=0; i < setters_order.length; i++){ s = setters_order[i]; if (s in parsed && !isNaN(parsed[s])){ _date = new Date(date); setters_map[s](_date, parsed[s]); if (!isNaN(_date)) date = _date; } } } return date; }, formatDate: function(date, format, language){ if (!date) return ''; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (format.toDisplay) return format.toDisplay(date, format, language); var val = { d: date.getUTCDate(), D: dates[language].daysShort[date.getUTCDay()], DD: dates[language].days[date.getUTCDay()], m: date.getUTCMonth() + 1, M: dates[language].monthsShort[date.getUTCMonth()], MM: dates[language].months[date.getUTCMonth()], yy: date.getUTCFullYear().toString().substring(2), yyyy: date.getUTCFullYear() }; val.dd = (val.d < 10 ? '0' : '') + val.d; val.mm = (val.m < 10 ? '0' : '') + val.m; date = []; var seps = $.extend([], format.separators); for (var i=0, cnt = format.parts.length; i <= cnt; i++){ if (seps.length) date.push(seps.shift()); date.push(val[format.parts[i]]); } return date.join(''); }, headTemplate: ''+ ''+ ''+ ''+ ''+ ''+defaults.templates.leftArrow+''+ ''+ ''+defaults.templates.rightArrow+''+ ''+ '', contTemplate: '', footTemplate: ''+ ''+ ''+ ''+ ''+ ''+ ''+ '' }; DPGlobal.template = '
'+ '
'+ ''+ DPGlobal.headTemplate+ ''+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'+ ''+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '
'+ '
'+ '
'; $.fn.datepicker.DPGlobal = DPGlobal; /* DATEPICKER NO CONFLICT * =================== */ $.fn.datepicker.noConflict = function(){ $.fn.datepicker = old; return this; }; /* DATEPICKER VERSION * =================== */ $.fn.datepicker.version = '1.10.0'; $.fn.datepicker.deprecated = function(msg){ var console = window.console; if (console && console.warn) { console.warn('DEPRECATED: ' + msg); } }; /* DATEPICKER DATA-API * ================== */ $(document).on( 'focus.datepicker.data-api click.datepicker.data-api', '[data-provide="datepicker"]', function(e){ var $this = $(this); if ($this.data('datepicker')) return; e.preventDefault(); // component click requires us to explicitly show it datepickerPlugin.call($this, 'show'); } ); $(function(){ datepickerPlugin.call($('[data-provide="datepicker-inline"]')); }); })); ================================================ FILE: js/locales/bootstrap-datepicker-en-CA.js ================================================ /** * Canadian English translation for bootstrap-datepicker * Mike Nacey * DEPRECATED: This filename doesn't follow the convention, use bootstrap-datepicker.en-CA.js instead */ ;(function($){ $.fn.datepicker.dates['en-CA'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 0, format: "yyyy-mm-dd" }; $.fn.datepicker.deprecated('This filename doesn\'t follow the convention, use bootstrap-datepicker.en-CA.js instead.'); }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ar-DZ.js ================================================ /** * Arabic-Algeria translation for bootstrap-datepicker * Rabah Saadi */ ;(function($){ $.fn.datepicker.dates['ar-DZ'] = { days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], months: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], monthsShort: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], today: "هذا اليوم", rtl: true, monthsTitle: "أشهر", clear: "إزالة", format: "yyyy/mm/dd", weekStart: 0 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ar-tn.js ================================================ /** * Arabic-Tunisia translation for bootstrap-datepicker * Souhaieb Besbes */ ;(function($){ $.fn.datepicker.dates['ar-tn'] = { days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], months: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], monthsShort: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], today: "هذا اليوم", rtl: true }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ar.js ================================================ /** * Arabic translation for bootstrap-datepicker * Mohammed Alshehri */ ;(function($){ $.fn.datepicker.dates['ar'] = { days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], today: "هذا اليوم", rtl: true }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.az.js ================================================ // Azerbaijani ;(function($){ $.fn.datepicker.dates['az'] = { days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"], daysShort: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], daysMin: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"], monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"], today: "Bu gün", weekStart: 1, clear: "Təmizlə", monthsTitle: 'Aylar' }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.bg.js ================================================ /** * Bulgarian translation for bootstrap-datepicker * Apostol Apostolov */ ;(function($){ $.fn.datepicker.dates['bg'] = { days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"], daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб"], daysMin: ["Н", "П", "В", "С", "Ч", "П", "С"], months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], today: "днес" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.bm.js ================================================ /** * Bamanankan (bm) translation for bootstrap-datepicker * Fatou Fall */ ;(function($){ $.fn.datepicker.dates['bm'] = { days: ["Kari","Ntɛnɛn","Tarata","Araba","Alamisa","Juma","Sibiri"], daysShort: ["Kar","Ntɛ","Tar","Ara","Ala","Jum","Sib"], daysMin: ["Ka","Nt","Ta","Ar","Al","Ju","Si"], months: ["Zanwuyekalo","Fewuruyekalo","Marisikalo","Awirilikalo","Mɛkalo","Zuwɛnkalo","Zuluyekalo","Utikalo","Sɛtanburukalo","ɔkutɔburukalo","Nowanburukalo","Desanburukalo"], monthsShort: ["Zan","Few","Mar","Awi","Mɛ","Zuw","Zul","Uti","Sɛt","ɔku","Now","Des"], today: "Bi", monthsTitle: "Kalo", clear: "Ka jɔsi", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.bn.js ================================================ /** * Bengali (Bangla) translation for bootstrap-datepicker * Karim Khan * Orif N. Jr. */ ;(function($){ $.fn.datepicker.dates['bn'] = { days: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"], daysShort: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"], daysMin: ["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"], months: ["জানুয়ারী","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"], monthsShort: ["জানুয়ারী","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"], today: "আজ", monthsTitle: "মাস", clear: "পরিষ্কার", weekStart: 0, format: "mm/dd/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.br.js ================================================ /** * Breton translation for bootstrap-datepicker * Gwenn Meynier */ ;(function($){ $.fn.datepicker.dates['br'] = { days: ["Sul", "Lun", "Meurzh", "Merc'her", "Yaou", "Gwener", "Sadorn"], daysShort: ["Sul", "Lun", "Meu.", "Mer.", "Yao.", "Gwe.", "Sad."], daysMin: ["Su", "L", "Meu", "Mer", "Y", "G", "Sa"], months: ["Genver", "C'hwevrer", "Meurzh", "Ebrel", "Mae", "Mezheven", "Gouere", "Eost", "Gwengolo", "Here", "Du", "Kerzu"], monthsShort: ["Genv.", "C'hw.", "Meur.", "Ebre.", "Mae", "Mezh.", "Goue.", "Eost", "Gwen.", "Here", "Du", "Kerz."], today: "Hiziv", monthsTitle: "Miz", clear: "Dilemel", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.bs.js ================================================ /** * Bosnian translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['bs'] = { days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], months: ["Januar", "Februar", "Mart", "April", "Maj", "Juni", "Juli", "August", "Septembar", "Oktobar", "Novembar", "Decembar"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], today: "Danas", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ca.js ================================================ /** * Catalan translation for bootstrap-datepicker * J. Garcia */ ;(function($){ $.fn.datepicker.dates['ca'] = { days: ["diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"], daysShort: ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."], daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds"], months: ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"], monthsShort: ["gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des."], today: "Avui", monthsTitle: "Mesos", clear: "Esborra", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.cs.js ================================================ /** * Czech translation for bootstrap-datepicker * Matěj Koubík * Fixes by Michal Remiš */ ;(function($){ $.fn.datepicker.dates['cs'] = { days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"], daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob"], daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"], months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"], today: "Dnes", clear: "Vymazat", monthsTitle: "Měsíc", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.cy.js ================================================ /** * Welsh translation for bootstrap-datepicker * S. Morris */ ;(function($){ $.fn.datepicker.dates['cy'] = { days: ["Sul", "Llun", "Mawrth", "Mercher", "Iau", "Gwener", "Sadwrn"], daysShort: ["Sul", "Llu", "Maw", "Mer", "Iau", "Gwe", "Sad"], daysMin: ["Su", "Ll", "Ma", "Me", "Ia", "Gwe", "Sa"], months: ["Ionawr", "Chewfror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorfennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"], monthsShort: ["Ion", "Chw", "Maw", "Ebr", "Mai", "Meh", "Gor", "Aws", "Med", "Hyd", "Tach", "Rha"], today: "Heddiw" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.da.js ================================================ /** * Danish translation for bootstrap-datepicker * Christian Pedersen * Ivan Mylyanyk */ ;(function($){ $.fn.datepicker.dates['da'] = { days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"], daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø"], months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], today: "I Dag", weekStart: 1, clear: "Nulstil", format: "dd/mm/yyyy", monthsTitle:"Måneder" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.de.js ================================================ /** * German translation for bootstrap-datepicker * Sam Zurcher */ ;(function($){ $.fn.datepicker.dates['de'] = { days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], daysShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], today: "Heute", monthsTitle: "Monate", clear: "Löschen", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.el.js ================================================ /** * Greek translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['el'] = { days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"], daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα"], months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], today: "Σήμερα", clear: "Καθαρισμός", weekStart: 1, format: "d/m/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-AU.js ================================================ /** * Australian English translation for bootstrap-datepicker * Steve Chapman */ ;(function($){ $.fn.datepicker.dates['en-AU'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 1, format: "d/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-CA.js ================================================ /** * Canadian English translation for bootstrap-datepicker * Mike Nacey */ ;(function($){ $.fn.datepicker.dates['en-CA'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 0, format: "yyyy-mm-dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-GB.js ================================================ /** * British English translation for bootstrap-datepicker * Xavier Dutreilh */ ;(function($){ $.fn.datepicker.dates['en-GB'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-IE.js ================================================ /** * Irish English translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['en-IE'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-NZ.js ================================================ /** * New Zealand English translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['en-NZ'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 1, format: "d/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-US.js ================================================ /** * American English translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['en-US'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 0, format: "m/d/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.en-ZA.js ================================================ /** * South African English translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['en-ZA'] = { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", monthsTitle: "Months", clear: "Clear", weekStart: 1, format: "yyyy/mm/d" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.eo.js ================================================ /** * Esperanto translation for bootstrap-datepicker * Emmanuel Debanne */ ;(function($){ $.fn.datepicker.dates['eo'] = { days: ["dimanĉo", "lundo", "mardo", "merkredo", "ĵaŭdo", "vendredo", "sabato"], daysShort: ["dim.", "lun.", "mar.", "mer.", "ĵaŭ.", "ven.", "sam."], daysMin: ["d", "l", "ma", "me", "ĵ", "v", "s"], months: ["januaro", "februaro", "marto", "aprilo", "majo", "junio", "julio", "aŭgusto", "septembro", "oktobro", "novembro", "decembro"], monthsShort: ["jan.", "feb.", "mar.", "apr.", "majo", "jun.", "jul.", "aŭg.", "sep.", "okt.", "nov.", "dec."], today: "Hodiaŭ", clear: "Nuligi", weekStart: 1, format: "yyyy-mm-dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.es.js ================================================ /** * Spanish translation for bootstrap-datepicker * Bruno Bonamin */ ;(function($){ $.fn.datepicker.dates['es'] = { days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], today: "Hoy", monthsTitle: "Meses", clear: "Borrar", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.et.js ================================================ /** * Estonian translation for bootstrap-datepicker * Ando Roots * Fixes by Illimar Tambek < */ ;(function($){ $.fn.datepicker.dates['et'] = { days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"], daysShort: ["Pühap", "Esmasp", "Teisip", "Kolmap", "Neljap", "Reede", "Laup"], daysMin: ["P", "E", "T", "K", "N", "R", "L"], months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"], monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], today: "Täna", clear: "Tühjenda", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.eu.js ================================================ /** * Basque translation for bootstrap-datepicker * Arkaitz Etxeberria */ ;(function($){ $.fn.datepicker.dates['eu'] = { days: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata'], daysShort: ['Ig', 'Al', 'Ar', 'Az', 'Og', 'Ol', 'Lr'], daysMin: ['Ig', 'Al', 'Ar', 'Az', 'Og', 'Ol', 'Lr'], months: ['Urtarrila', 'Otsaila', 'Martxoa', 'Apirila', 'Maiatza', 'Ekaina', 'Uztaila', 'Abuztua', 'Iraila', 'Urria', 'Azaroa', 'Abendua'], monthsShort: ['Urt', 'Ots', 'Mar', 'Api', 'Mai', 'Eka', 'Uzt', 'Abu', 'Ira', 'Urr', 'Aza', 'Abe'], today: "Gaur", monthsTitle: "Hilabeteak", clear: "Ezabatu", weekStart: 1, format: "yyyy/mm/dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.fa.js ================================================ /** * Persian translation for bootstrap-datepicker * Mostafa Rokooie */ ;(function($){ $.fn.datepicker.dates['fa'] = { days: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"], daysShort: ["یک", "دو", "سه", "چهار", "پنج", "جمعه", "شنبه", "یک"], daysMin: ["ی", "د", "س", "چ", "پ", "ج", "ش", "ی"], months: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], monthsShort: ["ژان", "فور", "مار", "آور", "مه", "ژون", "ژوی", "اوت", "سپت", "اکت", "نوا", "دسا"], today: "امروز", clear: "پاک کن", weekStart: 1, format: "yyyy/mm/dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.fi.js ================================================ /** * Finnish translation for bootstrap-datepicker * Jaakko Salonen */ ;(function($){ $.fn.datepicker.dates['fi'] = { days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"], daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau"], daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la"], months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], monthsShort: ["tammi", "helmi", "maalis", "huhti", "touko", "kesä", "heinä", "elo", "syys", "loka", "marras", "joulu"], today: "tänään", clear: "Tyhjennä", weekStart: 1, format: "d.m.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.fo.js ================================================ /** * Faroese translation for bootstrap-datepicker * Theodor Johannesen */ ;(function($){ $.fn.datepicker.dates['fo'] = { days: ["Sunnudagur", "Mánadagur", "Týsdagur", "Mikudagur", "Hósdagur", "Fríggjadagur", "Leygardagur"], daysShort: ["Sun", "Mán", "Týs", "Mik", "Hós", "Frí", "Ley"], daysMin: ["Su", "Má", "Tý", "Mi", "Hó", "Fr", "Le"], months: ["Januar", "Februar", "Marts", "Apríl", "Mei", "Juni", "Juli", "August", "Septembur", "Oktobur", "Novembur", "Desembur"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], today: "Í Dag", clear: "Reinsa" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.fr-CH.js ================================================ /** * French (Switzerland) translation for bootstrap-datepicker * Christoph Jossi * Based on * French translation for bootstrap-datepicker * Nico Mollet */ ;(function($){ $.fn.datepicker.dates['fr'] = { days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], daysMin: ["D", "L", "Ma", "Me", "J", "V", "S"], months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], monthsShort: ["Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc"], today: "Aujourd'hui", monthsTitle: "Mois", clear: "Effacer", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.fr.js ================================================ /** * French translation for bootstrap-datepicker * Nico Mollet */ ;(function($){ $.fn.datepicker.dates['fr'] = { days: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], daysShort: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], daysMin: ["d", "l", "ma", "me", "j", "v", "s"], months: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], monthsShort: ["janv.", "févr.", "mars", "avril", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], today: "Aujourd'hui", monthsTitle: "Mois", clear: "Effacer", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.gl.js ================================================ ;(function($){ $.fn.datepicker.dates['gl'] = { days: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"], daysShort: ["Dom", "Lun", "Mar", "Mér", "Xov", "Ven", "Sáb"], daysMin: ["Do", "Lu", "Ma", "Me", "Xo", "Ve", "Sa"], months: ["Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro"], monthsShort: ["Xan", "Feb", "Mar", "Abr", "Mai", "Xun", "Xul", "Ago", "Sep", "Out", "Nov", "Dec"], today: "Hoxe", clear: "Limpar", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.he.js ================================================ /** * Hebrew translation for bootstrap-datepicker * Sagie Maoz */ ;(function($){ $.fn.datepicker.dates['he'] = { days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], today: "היום", rtl: true }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.hi.js ================================================ /** * Hindi translation for bootstrap-datepicker * Visar Uruqi */ ; (function($){ $.fn.datepicker.dates['hi'] = { days: ["रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"], daysShort: ["सूर्य", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"], daysMin: ["र", "सो", "मं", "बु", "गु", "शु", "श"], months: ["जनवरी", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितम्बर", "अक्टूबर", "नवंबर", "दिसम्बर"], monthsShort: ["जन", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितं", "अक्टूबर", "नवं", "दिसम्बर"], today: "आज", monthsTitle: "महीने", clear: "साफ", weekStart: 1, format: "dd / mm / yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.hr.js ================================================ /** * Croatian localisation */ ;(function($){ $.fn.datepicker.dates['hr'] = { days: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], monthsShort: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"], today: "Danas" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.hu.js ================================================ /** * Hungarian translation for bootstrap-datepicker * Sotus László */ ;(function($){ $.fn.datepicker.dates['hu'] = { days: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"], daysShort: ["vas", "hét", "ked", "sze", "csü", "pén", "szo"], daysMin: ["V", "H", "K", "Sze", "Cs", "P", "Szo"], months: ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], monthsShort: ["jan", "feb", "már", "ápr", "máj", "jún", "júl", "aug", "sze", "okt", "nov", "dec"], today: "ma", weekStart: 1, clear: "töröl", titleFormat: "yyyy. MM", format: "yyyy.mm.dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.hy.js ================================================ /** * Armenian translation for bootstrap-datepicker * Hayk Chamyan */ ;(function($){ $.fn.datepicker.dates['hy'] = { days: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"], daysShort: ["Կիր", "Երկ", "Երե", "Չոր", "Հին", "Ուրբ", "Շաբ"], daysMin: ["Կի", "Եկ", "Եք", "Չո", "Հի", "Ու", "Շա"], months: ["Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"], monthsShort: ["Հնվ", "Փետ", "Մար", "Ապր", "Մայ", "Հուն", "Հուլ", "Օգս", "Սեպ", "Հոկ", "Նոյ", "Դեկ"], today: "Այսօր", clear: "Ջնջել", format: "dd.mm.yyyy", weekStart: 1, monthsTitle: 'Ամիսնէր' }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.id.js ================================================ /** * Bahasa translation for bootstrap-datepicker * Azwar Akbar * Ardeman */ ;(function($){ $.fn.datepicker.dates['id'] = { days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], daysShort: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"], daysMin: ["Mg", "Sn", "Sl", "Rb", "Km", "Jm", "Sb"], months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agt", "Sep", "Okt", "Nov", "Des"], today: "Hari Ini", monthsTitle: "Bulan", clear: "Kosongkan", weekStart: 0, format: "dd-mm-yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.is.js ================================================ /** * Icelandic translation for bootstrap-datepicker * Hinrik Örn Sigurðsson */ ;(function($){ $.fn.datepicker.dates['is'] = { days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"], daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau"], daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La"], months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], today: "Í Dag" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.it-CH.js ================================================ /** * Italian (Switzerland) translation for bootstrap-datepicker * Christoph Jossi * Based on * Italian translation for bootstrap-datepicker * Enrico Rubboli */ ;(function($){ $.fn.datepicker.dates['it'] = { days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"], months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], today: "Oggi", clear: "Cancella", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.it.js ================================================ /** * Italian translation for bootstrap-datepicker * Enrico Rubboli */ ;(function($){ $.fn.datepicker.dates['it'] = { days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"], months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], today: "Oggi", monthsTitle: "Mesi", clear: "Cancella", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ja.js ================================================ /** * Japanese translation for bootstrap-datepicker * Norio Suzuki */ ;(function($){ $.fn.datepicker.dates['ja'] = { days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"], daysShort: ["日", "月", "火", "水", "木", "金", "土"], daysMin: ["日", "月", "火", "水", "木", "金", "土"], months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], today: "今日", format: "yyyy/mm/dd", titleFormat: "yyyy年mm月", clear: "クリア" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ka.js ================================================ /** * Georgian translation for bootstrap-datepicker * Levan Melikishvili */ ;(function($){ $.fn.datepicker.dates['ka'] = { days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"], daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"], daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა"], months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], today: "დღეს", clear: "გასუფთავება", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.kh.js ================================================ /** * Cambodia (Khmer) translation for bootstrap-datepicker * Lytay TOUCH * * DEPRECATED: This language code 'kh' is deprecated and will be removed in 2.0. * Khmer support is now in a 'km' translation file to follow the ISO language * code - http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ ;(function($){ $.fn.datepicker.dates['kh'] = { days: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"], daysShort: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], daysMin: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], months: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], monthsShort: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], today: "ថ្ងៃនេះ", clear: "សំអាត" }; $.fn.datepicker.deprecated('The language code "kh" is deprecated and will be removed in 2.0. For Khmer support use "km" instead.'); }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.kk.js ================================================ /** * Kazakh translation for bootstrap-datepicker * Yerzhan Tolekov */ ;(function($){ $.fn.datepicker.dates['kk'] = { days: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"], daysShort: ["Жек", "Дүй", "Сей", "Сәр", "Бей", "Жұм", "Сен"], daysMin: ["Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сн"], months: ["Қаңтар", "Ақпан", "Наурыз", "Сәуір", "Мамыр", "Маусым", "Шілде", "Тамыз", "Қыркүйек", "Қазан", "Қараша", "Желтоқсан"], monthsShort: ["Қаң", "Ақп", "Нау", "Сәу", "Мам", "Мау", "Шіл", "Там", "Қыр", "Қаз", "Қар", "Жел"], today: "Бүгін", weekStart: 1 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.km.js ================================================ /** * Khmer translation for bootstrap-datepicker * This is the Updated Version of: https://github.com/uxsolutions/bootstrap-datepicker/blob/71308d42cce9524284c50c6fac50422d1790ac0f/js/locales/bootstrap-datepicker.kh.js */ ;(function($){ $.fn.datepicker.dates['km'] = { days: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"], daysShort: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], daysMin: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], months: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], monthsShort: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], today: "ថ្ងៃនេះ", clear: "សំអាត" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ko.js ================================================ /** * Korean translation for bootstrap-datepicker * This is a port from https://github.com/moment/moment/blob/develop/src/locale/ko.js */ ;(function($){ $.fn.datepicker.dates['ko'] = { days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], daysShort: ["일", "월", "화", "수", "목", "금", "토"], daysMin: ["일", "월", "화", "수", "목", "금", "토"], months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], today: "오늘", clear: "삭제", format: "yyyy-mm-dd", titleFormat: "yyyy년mm월", weekStart: 0 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.kr.js ================================================ /** * Korean translation for bootstrap-datepicker * Gu Youn * * DEPRECATED: This language code 'kr' is deprecated and will be removed in 2.0. * Korean support is now in a 'ko' translation file to follow the ISO language * code - http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ ;(function($){ $.fn.datepicker.dates['kr'] = { days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], daysShort: ["일", "월", "화", "수", "목", "금", "토"], daysMin: ["일", "월", "화", "수", "목", "금", "토"], months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"] }; $.fn.datepicker.deprecated('The language code "kr" is deprecated and will be removed in 2.0. For korean support use "ko" instead.'); }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.lt.js ================================================ /** * Lithuanian translation for bootstrap-datepicker * Šarūnas Gliebus */ ;(function($){ $.fn.datepicker.dates['lt'] = { days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"], daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š"], daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št"], months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"], monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"], today: "Šiandien", monthsTitle:"Mėnesiai", clear:"Išvalyti", weekStart: 1, format:"yyyy-mm-dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.lv.js ================================================ /** * Latvian translation for bootstrap-datepicker * Artis Avotins */ ;(function($){ $.fn.datepicker.dates['lv'] = { days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"], daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S"], daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se"], months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"], monthsTitle: "Mēneši", today: "Šodien", clear: "Nodzēst", weekStart: 1 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.me.js ================================================ /** * Montenegrin translation for bootstrap-datepicker * Miodrag Nikač */ ;(function($){ $.fn.datepicker.dates['me'] = { days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], today: "Danas", weekStart: 1, clear: "Izbriši", format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.mk.js ================================================ /** * Macedonian translation for bootstrap-datepicker * Marko Aleksic */ ;(function($){ $.fn.datepicker.dates['mk'] = { days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"], daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб"], daysMin: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са"], months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"], monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"], today: "Денес", format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.mn.js ================================================ /** * Mongolian translation for bootstrap-datepicker * Andrey Torsunov */ ;(function($){ $.fn.datepicker.dates['mn'] = { days: ["Ням", "Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба"], daysShort: ["Ням", "Дав", "Мяг", "Лха", "Пүр", "Баа", "Бям"], daysMin: ["Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"], months: ["Хулгана", "Үхэр", "Бар", "Туулай", "Луу", "Могой", "Морь", "Хонь", "Бич", "Тахиа", "Нохой", "Гахай"], monthsShort: ["Хул", "Үхэ", "Бар", "Туу", "Луу", "Мог", "Мор", "Хон", "Бич", "Тах", "Нох", "Гах"], today: "Өнөөдөр", clear: "Тодорхой", format: "yyyy.mm.dd", weekStart: 1 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.mr.js ================================================ /** * Marathi translation for bootstrap-datepicker * Sushant Pimple */ ; (function($){ $.fn.datepicker.dates['mar'] = { days: ["रविवार", "सोमवार", "मंगळवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"], daysShort: ["रवि", "सोम", "मंगळ", "बुध", "गुरु", "शुक्र", "शनि"], daysMin: ["र", "सो", "मं", "बु", "गु", "शु", "श"], months: ["जानेवारी", "फेब्रुवारी", "मार्च", "एप्रिल", "मे", "जून", "जुलै", "ऑगस्ट", "सप्टेंबर", "ऑक्टोबर", "नोव्हेंबर", "डिसेंबर"], monthsShort: ["जाने.", "फेब्रु.", "मार्च", "एप्रिल", "मे", "जून", "जुलै", "ऑगस्ट", "सप्टें.", "ऑक्टो.", "नोव्हें.", "डिसें."], today: "आज", monthsTitle: "महीने", clear: "हटवा", weekStart: 1, format: "dd / mm / yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ms.js ================================================ /** * Malay translation for bootstrap-datepicker * Ateman Faiz */ ;(function($){ $.fn.datepicker.dates['ms'] = { days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"], daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"], daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"], months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], today: "Hari Ini", clear: "Bersihkan" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.nl-BE.js ================================================ /** * Belgium-Dutch translation for bootstrap-datepicker * Julien Poulin */ ;(function($){ $.fn.datepicker.dates['nl-BE'] = { days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za"], daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za"], months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], today: "Vandaag", monthsTitle: "Maanden", clear: "Leegmaken", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.nl.js ================================================ /** * Dutch translation for bootstrap-datepicker * Reinier Goltstein */ ;(function($){ $.fn.datepicker.dates['nl'] = { days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za"], daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za"], months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], today: "Vandaag", monthsTitle: "Maanden", clear: "Wissen", weekStart: 1, format: "dd-mm-yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.no.js ================================================ /** * Norwegian translation for bootstrap-datepicker * George Gooding */ ;(function($){ $.fn.datepicker.dates['no'] = { days: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], daysShort: ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], daysMin: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], months: ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], monthsShort: ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], today: 'i dag', monthsTitle: 'Måneder', clear: 'Nullstill', weekStart: 1, format: 'dd.mm.yyyy' }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.oc.js ================================================ /** * Occitan translation for bootstrap-datepicker */ ;(function($){ $.fn.datepicker.dates['oc'] = { days: ["Dimenge", "Diluns", "Dimars", "Dimècres", "Dijòus", "Divendres", "Dissabte"], daysShort: ["Dim", "Dil", "Dmr", "Dmc", "Dij", "Div", "Dis"], daysMin: ["dg", "dl", "dr", "dc", "dj", "dv", "ds"], months: ["Genièr", "Febrièr", "Març", "Abrial", "Mai", "Junh", "Julhet", "Agost", "Setembre", "Octobre", "Novembre", "Decembre"], monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Dec"], today: "Uèi", monthsTitle: "Meses", clear: "Escafar", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.pl.js ================================================ /** * Polish translation for bootstrap-datepicker * Robert */ ;(function($){ $.fn.datepicker.dates['pl'] = { days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], daysShort: ["Niedz.", "Pon.", "Wt.", "Śr.", "Czw.", "Piąt.", "Sob."], daysMin: ["Ndz.", "Pn.", "Wt.", "Śr.", "Czw.", "Pt.", "Sob."], months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], monthsShort: ["Sty.", "Lut.", "Mar.", "Kwi.", "Maj", "Cze.", "Lip.", "Sie.", "Wrz.", "Paź.", "Lis.", "Gru."], today: "Dzisiaj", weekStart: 1, clear: "Wyczyść", format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.pt-BR.js ================================================ /** * Brazilian translation for bootstrap-datepicker * Cauan Cabral */ ;(function($){ $.fn.datepicker.dates['pt-BR'] = { days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], today: "Hoje", monthsTitle: "Meses", clear: "Limpar", format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.pt.js ================================================ /** * Portuguese translation for bootstrap-datepicker * Original code: Cauan Cabral * Tiago Melo */ ;(function($){ $.fn.datepicker.dates['pt'] = { days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], today: "Hoje", monthsTitle: "Meses", clear: "Limpar", format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ro.js ================================================ /** * Romanian translation for bootstrap-datepicker * Cristian Vasile */ ;(function($){ $.fn.datepicker.dates['ro'] = { days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"], daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"], daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"], months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Astăzi", clear: "Șterge", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.rs-latin.js ================================================ /** * Serbian latin translation for bootstrap-datepicker * Bojan Milosavlević * * DEPRECATED: This language code 'rs-latin' is deprecated (invalid serbian language code) and will be removed in 2.0. */ ;(function($){ $.fn.datepicker.dates['rs-latin'] = { days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"], daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], today: "Danas", weekStart: 1, format: "dd.mm.yyyy" }; $.fn.datepicker.deprecated('This language code "rs-latin" is deprecated (invalid serbian language code) and will be removed in 2.0. For Serbian latin support use "sr-latin" instead.'); }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.rs.js ================================================ /** * Serbian cyrillic translation for bootstrap-datepicker * Bojan Milosavlević * * DEPRECATED: This language code 'rs' is deprecated (invalid serbian language code) and will be removed in 2.0. */ ;(function($){ $.fn.datepicker.dates['rs'] = { days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"], daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб"], daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су"], months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], today: "Данас", weekStart: 1, format: "dd.mm.yyyy" }; $.fn.datepicker.deprecated('This language code "rs" is deprecated (invalid serbian language code) and will be removed in 2.0. For Serbian support use "sr" instead.'); }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ru.js ================================================ /** * Russian translation for bootstrap-datepicker * Victor Taranenko */ ;(function($){ $.fn.datepicker.dates['ru'] = { days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"], daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], today: "Сегодня", clear: "Очистить", format: "dd.mm.yyyy", weekStart: 1, monthsTitle: 'Месяцы' }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.si.js ================================================ /** * Sinhala translation for bootstrap-datepicker * Chanaka Fernando */ ;(function($){ $.fn.datepicker.dates['si'] = { days: ["ඉරිදා", "සඳුදා", "අඟහරුවාදා", "බදාදා", "බ්‍රහස්පතින්දා", "සිකුරාදා", "සෙනසුරාදා"], daysShort: ["ඉරි", "සඳු", "අඟ", "බදා", "බ්‍රහ", "සිකු", "සෙන"], daysMin: ["ඉ", "ස", "අ", "බ", "බ්‍ර", "සි", "සෙ"], months: ["ජනවාරි", "පෙබරවාරි", "මාර්තු", "අප්‍රේල්", "මැයි", "ජුනි", "ජූලි", "අගෝස්තු", "සැප්තැම්බර්", "ඔක්තෝබර්", "නොවැම්බර්", "දෙසැම්බර්"], monthsShort: ["ජන", "පෙබ", "මාර්", "අප්‍රේ", "මැයි", "ජුනි", "ජූලි", "අගෝ", "සැප්", "ඔක්", "නොවැ", "දෙසැ"], today: "අද", monthsTitle: "මාස", clear: "මකන්න", weekStart: 0, format: "yyyy-mm-dd" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sk.js ================================================ /** * Slovak translation for bootstrap-datepicker * Marek Lichtner * Fixes by Michal Remiš */ ;(function($){ $.fn.datepicker.dates["sk"] = { days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"], daysShort: ["Ned", "Pon", "Uto", "Str", "Štv", "Pia", "Sob"], daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pia", "So"], months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], today: "Dnes", clear: "Vymazať", weekStart: 1, format: "d.m.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sl.js ================================================ /** * Slovene translation for bootstrap-datepicker * Gregor Rudolf */ ;(function($){ $.fn.datepicker.dates['sl'] = { days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"], daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"], months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], today: "Danes", weekStart: 1 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sq.js ================================================ /** * Albanian translation for bootstrap-datepicker * Tomor Pupovci */ ;(function($){ $.fn.datepicker.dates['sq'] = { days: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"], daysShort: ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"], daysMin: ["Di", "Hë", "Ma", "Më", "En", "Pr", "Sht"], months: ["Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"], monthsShort: ["Jan", "Shk", "Mar", "Pri", "Maj", "Qer", "Korr", "Gu", "Sht", "Tet", "Nën", "Dhjet"], monthsTitle: "Muaj", today: "Sot", weekStart: 1, format: "dd/mm/yyyy", clear: "Pastro" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sr-latin.js ================================================ /** * Serbian latin translation for bootstrap-datepicker * Bojan Milosavlević */ ;(function($){ $.fn.datepicker.dates['sr-latin'] = { days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"], daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], today: "Danas", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sr.js ================================================ /** * Serbian cyrillic translation for bootstrap-datepicker * Bojan Milosavlević */ ;(function($){ $.fn.datepicker.dates['sr'] = { days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"], daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб"], daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су"], months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], today: "Данас", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sv.js ================================================ /** * Swedish translation for bootstrap-datepicker * Patrik Ragnarsson */ ;(function($){ $.fn.datepicker.dates['sv'] = { days: ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"], daysShort: ["sön", "mån", "tis", "ons", "tor", "fre", "lör"], daysMin: ["sö", "må", "ti", "on", "to", "fr", "lö"], months: ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], monthsShort: ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], today: "Idag", format: "yyyy-mm-dd", weekStart: 1, clear: "Rensa" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.sw.js ================================================ /** * Swahili translation for bootstrap-datepicker * Edwin Mugendi * Source: http://scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku */ ;(function($){ $.fn.datepicker.dates['sw'] = { days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"], daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1"], daysMin: ["2", "3", "4", "5", "A", "I", "1"], months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], today: "Leo" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.ta.js ================================================ /** * Tamil translation for bootstrap-datepicker * Abubacker Siddik A */ ;(function($){ $.fn.datepicker.dates['ta'] = { days: ["ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"], daysShort: ["ஞாயி", "திங்", "செவ்", "புத", "வியா", "வெள்", "சனி"], daysMin: ["ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"], months: ["ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்டு", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"], monthsShort: ["ஜன", "பிப்", "மார்", "ஏப்", "மே", "ஜூன்", "ஜூலை", "ஆக", "செப்", "அக்", "நவ", "டிச"], today: "இன்று", monthsTitle: "மாதங்கள்", clear: "நீக்கு", weekStart: 1, format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.tg.js ================================================ /** * Tajik (cyrillic) translation for bootstrap-datepicker * Bakhtiyor Bahritidinov * Orif N. Jr. */ ;(function($){ $.fn.datepicker.dates['tg'] = { days: ["Якшанбе", "Душанбе", "Сешанбе", "Чоршанбе", "Панҷшанбе", "Ҷумъа", "Шанбе"], daysShort: ["Яшб", "Дшб", "Сшб", "Чшб", "Пшб", "Ҷум", "Шнб"], daysMin: ["Яш", "Дш", "Сш", "Чш", "Пш", "Ҷм", "Шб"], months: ["Январ", "Феврал", "Март", "Апрел", "Май", "Июн", "Июл", "Август", "Сентябр", "Октябр", "Ноябр", "Декабр"], monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], today: "Имрӯз", monthsTitle: "Моҳҳо", clear: "Тоза намудан", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.th.js ================================================ /** * Thai translation for bootstrap-datepicker * Suchau Jiraprapot */ ;(function($){ $.fn.datepicker.dates['th'] = { days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], today: "วันนี้" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.tk.js ================================================ /** * Turkmen translation for bootstrap-datepicker * N'Bayramberdiyev */ ;(function($){ $.fn.datepicker.dates['tk'] = { days: ["Ýekşenbe", "Duşenbe", "Sişenbe", "Çarşenbe", "Penşenbe", "Anna", "Şenbe"], daysShort: ["Ýek", "Duş", "Siş", "Çar", "Pen", "Ann", "Şen"], daysMin: ["Ýe", "Du", "Si", "Ça", "Pe", "An", "Şe"], months: ["Ýanwar", "Fewral", "Mart", "Aprel", "Maý", "Iýun", "Iýul", "Awgust", "Sentýabr", "Oktýabr", "Noýabr", "Dekabr"], monthsShort: ["Ýan", "Few", "Mar", "Apr", "Maý", "Iýn", "Iýl", "Awg", "Sen", "Okt", "Noý", "Dek"], today: "Bu gün", monthsTitle: "Aýlar", clear: "Aýyr", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.tr.js ================================================ /** * Turkish translation for bootstrap-datepicker * Serkan Algur */ ;(function($){ $.fn.datepicker.dates['tr'] = { days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts"], daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct"], months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], today: "Bugün", clear: "Temizle", weekStart: 1, format: "dd.mm.yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.uk.js ================================================ /** * Ukrainian translation for bootstrap-datepicker * Igor Polynets */ ;(function($){ $.fn.datepicker.dates['uk'] = { days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], months: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], today: "Сьогодні", clear: "Очистити", format: "dd.mm.yyyy", weekStart: 1 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.uz-cyrl.js ================================================ /** * Uzbek latin translation for bootstrap-datepicker * Kakhramonov Javlonbek */ ;(function($){ $.fn.datepicker.dates['uz-cyrl'] = { days: ["Якшанба", "Душанба", "Сешанба", "Чоршанба", "Пайшанба", "Жума", "Шанба"], daysShort: ["Якш", "Ду", "Се", "Чор", "Пай", "Жу", "Ша"], daysMin: ["Як", "Ду", "Се", "Чо", "Па", "Жу", "Ша"], months: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"], monthsShort: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"], today: "Бугун", clear: "Ўчириш", format: "dd.mm.yyyy", weekStart: 1, monthsTitle: 'Ойлар' }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.uz-latn.js ================================================ /** * Uzbek latin translation for bootstrap-datepicker * Kakhramonov Javlonbek */ ;(function($){ $.fn.datepicker.dates['uz-latn'] = { days: ["Yakshanba", "Dushanba", "Seshanba", "Chorshanba", "Payshanba", "Juma", "Shanba"], daysShort: ["Yak", "Du", "Se", "Chor", "Pay", "Ju", "Sha"], daysMin: ["Ya", "Du", "Se", "Cho", "Pa", "Ju", "Sha"], months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avgust", "Sentabr", "Oktabr", "Noyabr", "Dekabr"], monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "Iyn", "Iyl", "Avg", "Sen", "Okt", "Noy", "Dek"], today: "Bugun", clear: "O'chirish", format: "dd.mm.yyyy", weekStart: 1, monthsTitle: 'Oylar' }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.vi.js ================================================ /** * Vietnamese translation for bootstrap-datepicker * An Vo */ ;(function($){ $.fn.datepicker.dates['vi'] = { days: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"], daysShort: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], daysMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], months: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"], monthsShort: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"], today: "Hôm nay", clear: "Xóa", format: "dd/mm/yyyy" }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.zh-CN.js ================================================ /** * Simplified Chinese translation for bootstrap-datepicker * Yuan Cheung */ ;(function($){ $.fn.datepicker.dates['zh-CN'] = { days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], daysMin: ["日", "一", "二", "三", "四", "五", "六"], months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], today: "今天", monthsTitle: "选择月份", clear: "清除", format: "yyyy-mm-dd", titleFormat: "yyyy年mm月", weekStart: 1 }; }(jQuery)); ================================================ FILE: js/locales/bootstrap-datepicker.zh-TW.js ================================================ /** * Traditional Chinese translation for bootstrap-datepicker * Rung-Sheng Jang * FrankWu Fix more appropriate use of Traditional Chinese habit */ ;(function($){ $.fn.datepicker.dates['zh-TW'] = { days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], daysShort: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"], daysMin: ["日", "一", "二", "三", "四", "五", "六"], months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], today: "今天", monthsTitle: "月份", format: "yyyy/mm/dd", weekStart: 0, titleFormat: "yyyy年mm月", clear: "清除" }; }(jQuery)); ================================================ FILE: less/.csslintrc ================================================ { "adjoining-classes": false, "box-sizing": false, "box-model": false, "compatible-vendor-prefixes": false, "floats": false, "font-sizes": false, "gradients": false, "important": false, "known-properties": false, "outline-none": false, "qualified-headings": false, "regex-selectors": false, "shorthand": false, "text-indent": false, "unique-headings": false, "universal-selector": false, "unqualified-attributes": false } ================================================ FILE: less/datepicker.less ================================================ .datepicker { padding: 4px; .border-radius(@baseBorderRadius); &-inline { width: 220px; } direction: ltr; &-rtl { direction: rtl; &.dropdown-menu { left: auto; } table tr td span { float: right; } } &-dropdown { top: 0; left: 0; &:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid @grayLight; border-top: 0; border-bottom-color: rgba(0,0,0,.2); position: absolute; } &:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid @white; border-top: 0; position: absolute; } &.datepicker-orient-left:before { left: 6px; } &.datepicker-orient-left:after { left: 7px; } &.datepicker-orient-right:before { right: 6px; } &.datepicker-orient-right:after { right: 7px; } &.datepicker-orient-bottom:before { top: -7px; } &.datepicker-orient-bottom:after { top: -6px; } &.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid @grayLight; } &.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid @white; } } table { margin: 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } td, th { text-align: center; width: 20px; height: 20px; .border-radius(4px); border: none; } // Inline display inside a table presents some problems with // border and background colors. .table-striped & table tr { td, th { background-color: transparent; } } table tr td { &.day:hover, &.day.focused { background: @grayLighter; cursor: pointer; } &.old, &.new { color: @grayLight; } &.disabled, &.disabled:hover { background: none; color: @grayLight; cursor: default; } &.highlighted { background: @infoBackground; border-radius: 0; } &.today, &.today:hover, &.today.disabled, &.today.disabled:hover { @todayBackground: lighten(@orange, 30%); .buttonBackground(@todayBackground, spin(@todayBackground, 20)); color: #000; } &.today:hover:hover { // Thank bootstrap 2.0 for this selector... // TODO: Bump min BS to 2.1, use @textColor in buttonBackground above color: #000; } &.today.active:hover { color: #fff; } &.range, &.range:hover, &.range.disabled, &.range.disabled:hover { background: @grayLighter; .border-radius(0); } &.range.today, &.range.today:hover, &.range.today.disabled, &.range.today.disabled:hover { @todayBackground: mix(@orange, @grayLighter, 50%); .buttonBackground(@todayBackground, spin(@todayBackground, 20)); .border-radius(0); } &.selected, &.selected:hover, &.selected.disabled, &.selected.disabled:hover { .buttonBackground(lighten(@grayLight, 10), darken(@grayLight, 10)); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.25); } &.active, &.active:hover, &.active.disabled, &.active.disabled:hover { .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.25); } span { display: block; width: 23%; height: 54px; line-height: 54px; float: left; margin: 1%; cursor: pointer; .border-radius(4px); &:hover, &.focused { background: @grayLighter; } &.disabled, &.disabled:hover { background: none; color: @grayLight; cursor: default; } &.active, &.active:hover, &.active.disabled, &.active.disabled:hover { .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.25); } &.old, &.new { color: @grayLight; } } } .datepicker-switch { width: 145px; } .datepicker-switch, .prev, .next, tfoot tr th { cursor: pointer; &:hover { background: @grayLighter; } } .prev, .next { &.disabled { visibility: hidden; } } // Basic styling for calendar-week cells .cw { font-size: 10px; width: 12px; padding: 0 2px 0 5px; vertical-align: middle; } } .input-append, .input-prepend { &.date .add-on { cursor: pointer; i { margin-top: 3px; } } } .input-daterange { input { text-align:center; } input:first-child { .border-radius(3px 0 0 3px); } input:last-child { .border-radius(0 3px 3px 0); } .add-on { display: inline-block; width: auto; min-width: 16px; height: @baseLineHeight; padding: 4px 5px; font-weight: normal; line-height: @baseLineHeight; text-align: center; text-shadow: 0 1px 0 @white; vertical-align: middle; background-color: @grayLighter; border: 1px solid #ccc; margin-left: -5px; margin-right: -5px; } } ================================================ FILE: less/datepicker3.less ================================================ .datepicker { border-radius: @border-radius-base; &-inline { width: 220px; } direction: ltr; &-rtl { direction: rtl; &.dropdown-menu { left: auto; } table tr td span { float: right; } } &-dropdown { top: 0; left: 0; padding: 4px; &:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid @dropdown-border; border-top: 0; border-bottom-color: rgba(0,0,0,.2); position: absolute; } &:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid @dropdown-bg; border-top: 0; position: absolute; } &.datepicker-orient-left:before { left: 6px; } &.datepicker-orient-left:after { left: 7px; } &.datepicker-orient-right:before { right: 6px; } &.datepicker-orient-right:after { right: 7px; } &.datepicker-orient-bottom:before { top: -7px; } &.datepicker-orient-bottom:after { top: -6px; } &.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid @dropdown-border; } &.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid @dropdown-bg; } } table { margin: 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; tr { td, th { text-align: center; width: 30px; height: 30px; border-radius: 4px; border: none; } } } // Inline display inside a table presents some problems with // border and background colors. .table-striped & table tr { td, th { background-color: transparent; } } table tr td { &.old, &.new { color: @btn-link-disabled-color; } &.day:hover, &.focused { background: @gray-lighter; cursor: pointer; } &.disabled, &.disabled:hover { background: none; color: @btn-link-disabled-color; cursor: default; } &.highlighted { @highlighted-bg: @state-info-bg; .button-variant(#000, @highlighted-bg, darken(@highlighted-bg, 20%)); border-radius: 0; &.focused { background: darken(@highlighted-bg, 10%); } &.disabled, &.disabled:active { background: @highlighted-bg; color: @btn-link-disabled-color; } } &.today { @today-bg: lighten(orange, 30%); .button-variant(#000, @today-bg, darken(@today-bg, 20%)); &.focused { background: darken(@today-bg, 10%); } &.disabled, &.disabled:active { background: @today-bg; color: @btn-link-disabled-color; } } &.range { @range-bg: @gray-lighter; .button-variant(#000, @range-bg, darken(@range-bg, 20%)); border-radius: 0; &.focused { background: darken(@range-bg, 10%); } &.disabled, &.disabled:active { background: @range-bg; color: @btn-link-disabled-color; } } &.range.highlighted { @range-highlighted-bg: mix(@state-info-bg, @gray-lighter, 50%); .button-variant(#000, @range-highlighted-bg, darken(@range-highlighted-bg, 20%)); &.focused { background: darken(@range-highlighted-bg, 10%); } &.disabled, &.disabled:active { background: @range-highlighted-bg; color: @btn-link-disabled-color; } } &.range.today { @range-today-bg: mix(orange, @gray-lighter, 50%); .button-variant(#000, @range-today-bg, darken(@range-today-bg, 20%)); &.disabled, &.disabled:active { background: @range-today-bg; color: @btn-link-disabled-color; } } &.selected, &.selected.highlighted { .button-variant(#fff, @gray-light, @gray); text-shadow: 0 -1px 0 rgba(0,0,0,.25); } &.active, &.active.highlighted { .button-variant(@btn-primary-color, @btn-primary-bg, @btn-primary-border); text-shadow: 0 -1px 0 rgba(0,0,0,.25); } span { display: block; width: 23%; height: 54px; line-height: 54px; float: left; margin: 1%; cursor: pointer; border-radius: 4px; &:hover, &.focused { background: @gray-lighter; } &.disabled, &.disabled:hover { background: none; color: @btn-link-disabled-color; cursor: default; } &.active, &.active:hover, &.active.disabled, &.active.disabled:hover { .button-variant(@btn-primary-color, @btn-primary-bg, @btn-primary-border); text-shadow: 0 -1px 0 rgba(0,0,0,.25); } &.old, &.new { color: @btn-link-disabled-color; } } } .datepicker-switch { width: 145px; } .datepicker-switch, .prev, .next, tfoot tr th { cursor: pointer; &:hover { background: @gray-lighter; } } .prev, .next { &.disabled { visibility: hidden; } } // Basic styling for calendar-week cells .cw { font-size: 10px; width: 12px; padding: 0 2px 0 5px; vertical-align: middle; } } .input-group.date .input-group-addon { cursor: pointer; } .input-daterange { width: 100%; input { text-align: center; } input:first-child { border-radius: 3px 0 0 3px; } input:last-child { border-radius: 0 3px 3px 0; } .input-group-addon { width: auto; min-width: 16px; padding: 4px 5px; line-height: @line-height-base; border-width: 1px 0; margin-left: -5px; margin-right: -5px; } } ================================================ FILE: package.json ================================================ { "name": "bootstrap-datepicker", "description": "A datepicker for Bootstrap", "version": "1.10.0", "license": "Apache-2.0", "keywords": [ "datepicker", "bootstrap" ], "main": "./dist/js/bootstrap-datepicker.js", "files": [ "build", "dist", "js/**/*.js", "less/*.less", "LICENSE" ], "homepage": "https://github.com/uxsolutions/bootstrap-datepicker", "author": "Andrew Rowls ", "scripts": { "test": "grunt test", "screenshots": "node ./docs/screenshots.js" }, "repository": { "type": "git", "url": "https://github.com/uxsolutions/bootstrap-datepicker.git" }, "dependencies": { "jquery": ">=3.4.0 <4.0.0" }, "devDependencies": { "grunt": "^1.0.4", "grunt-banner": "~0.6.0", "grunt-contrib-clean": "^1.0.0", "grunt-contrib-compress": "^1.5.0", "grunt-contrib-concat": "^1.0.1", "grunt-contrib-csslint": "^2.0.0", "grunt-contrib-cssmin": "^1.0.2", "grunt-contrib-jshint": "^1.1.0", "grunt-contrib-less": "^1.4.0", "grunt-contrib-qunit": "^1.2.0", "grunt-contrib-uglify": "^2.0.0", "grunt-jscs": "^3.0.1", "grunt-string-replace": "^1.3.1", "load-grunt-tasks": "^3.5.2", "puppeteer": "1.18.1", "time-grunt": "^1.4.0" } } ================================================ FILE: tests/README.md ================================================ Unit tests, written with [QUnit](https://qunitjs.com), are used to expose bugs for squashing, prevent bugs from respawning, and suppress new bugs when adding new features and making changes. # Running the tests The simplest way to run the tests is to open `tests/tests.html` in your browser. The test suites will automatically run themselves and present their results. To run the tests from the command line (after running jshint and jscs, which is recommended), install Grunt and run the `test` task from anywhere within the repo: $ grunt test # Adding tests Tests go in js files in the `tests/suites/` directory tree. QUnit organizes tests into suites called "modules"; there is one module per js file. If the tests you are adding do not fit into an existing module, create a new one at `tests/suites/.js`, where `` is a broad yet descriptive name for the suite. If tests have many year-specific cases (ie, behave differently in leap years vs normal years, or have specific buggy behavior in a certain year), create the module in a new directory, `tests/suites//.js`, where `` is the decriptive name and `` is the four-digit year the tests pertain to. In order for new tests to be run, they must be imported into `tests/tests.html`. Find the script includes headed by the html comment ``, and add a new one to the list which includes the new js files. ================================================ FILE: tests/assets/coverage.js ================================================ (function(){ //we want this at global scope so outside callers can find it. In a more realistic implementation we //should probably put it in a namespace. window.getCoverageByLine = function(silent) { var key = null; var lines = null; var source = null; //look for code coverage data if (typeof window._$jscoverage === 'object') { for (key in _$jscoverage) {} lines = _$jscoverage[key]; } if (!lines && !silent) { console.log('code coverage data is NOT available'); } return { 'key': key, 'lines': lines }; }; QUnit.done = function(t) { var cvgInfo = getCoverageByLine(true); if (!!cvgInfo.key) { var testableLines = 0; var testedLines = 0; var untestableLines = 0; for (lineIdx in cvgInfo.lines) { var cvg = cvgInfo.lines[lineIdx]; if (typeof cvg === 'number') { testableLines += 1; if (cvg > 0) { testedLines += 1; } } else { untestableLines += 1; } } var coverage = '' + Math.floor(100 * testedLines / testableLines) + '%'; var result = document.getElementById('qunit-testresult'); if (result != null) { result.innerHTML = result.innerHTML + ' ' + coverage + ' test coverage of ' + cvgInfo.key; } else { console.log('can\'t find test-result element to update'); } } }; }()); ================================================ FILE: tests/assets/mock.js ================================================ ;(function(){ window.patch_date = function(f){ const NativeDate = window.Date; const date = function date(y,m,d,h,i,s,j){ switch(arguments.length){ case 0: return new NativeDate(date.now()); case 1: return new NativeDate(y); case 2: return new NativeDate(y,m); case 3: return new NativeDate(y,m,d); case 4: return new NativeDate(y,m,d,h); case 5: return new NativeDate(y,m,d,h,i); case 6: return new NativeDate(y,m,d,h,i,s); case 7: return new NativeDate(y,y,m,d,h,i,s,j); } }; date.now = NativeDate.now; date.UTC = NativeDate.UTC; return function(){ Array.prototype.push.call(arguments, date); window.Date = date; f.apply(this, arguments); window.Date = NativeDate; }; }; window.patch_show_hide = function(f){ var oldShow = $.fn.show, newShow = function () { $(this).removeClass('foo'); return oldShow.apply(this, arguments); }; var oldHide = $.fn.hide, newHide = function () { $(this).addClass('foo'); return oldHide.apply(this, arguments); }; return function(){ $.fn.show = newShow; $.fn.hide = newHide; f.apply(this, arguments); $.fn.show = oldShow; $.fn.hide = oldHide; }; }; }()); ================================================ FILE: tests/assets/qunit-logging.js ================================================ // Dummy logging calls (ie, if tests are run in IE) window.console = window.console || {}; window.console.log = window.console.log || function(){}; window.console.debug = window.console.debug || function(){}; window.console.info = window.console.info || function(){}; window.console.warn = window.console.warn || function(){}; window.console.error = window.console.error || function(){}; (function() { var modName, testName; //arg: { name } QUnit.testStart = function(t) { modName = t.module; testName = t.name; }; //arg: { name, failed, passed, total } QUnit.testDone = function(t) { if (t.failed) console.log('Test "' + t.module + ': ' + t.name + '" completed: ' + (0 === t.failed ? 'pass' : 'FAIL') + '\n') }; //{ result, actual, expected, message } QUnit.log = function(t) { if (!t.result) console.log('Test "' + modName + ': ' + testName + '" assertion failed. Expected <' + t.expected + '> Actual <' + t.actual + '>' + (t.message ? ': \'' + t.message + '\'' : '')); }; }()); ================================================ FILE: tests/assets/qunit.css ================================================ /** * QUnit v1.5.0 - A JavaScript Unit Testing Framework * * http://docs.jquery.com/QUnit * * Copyright (c) 2012 John Resig, Jörn Zaefferer * Dual licensed under the MIT (MIT-LICENSE.txt) * or GPL (GPL-LICENSE.txt) licenses. */ /** Font Family and Sizes */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; } #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } /** Resets */ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { margin: 0; padding: 0; } /** Header */ #qunit-header { padding: 0.5em 0 0.5em 1em; color: #8699a4; background-color: #0d3349; font-size: 1.5em; line-height: 1em; font-weight: normal; border-radius: 15px 15px 0 0; -moz-border-radius: 15px 15px 0 0; -webkit-border-top-right-radius: 15px; -webkit-border-top-left-radius: 15px; } #qunit-header a { text-decoration: none; color: #c2ccd1; } #qunit-header a:hover, #qunit-header a:focus { color: #fff; } #qunit-header label { display: inline-block; } #qunit-banner { height: 5px; } #qunit-testrunner-toolbar { padding: 0.5em 0 0.5em 2em; color: #5E740B; background-color: #eee; } #qunit-userAgent { padding: 0.5em 0 0.5em 2.5em; background-color: #2b81af; color: #fff; text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; } /** Tests: Pass/Fail */ #qunit-tests { list-style-position: inside; } #qunit-tests li { padding: 0.4em 0.5em 0.4em 2.5em; border-bottom: 1px solid #fff; list-style-position: inside; } #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { display: none; } #qunit-tests li strong { cursor: pointer; } #qunit-tests li a { padding: 0.5em; color: #c2ccd1; text-decoration: none; } #qunit-tests li a:hover, #qunit-tests li a:focus { color: #000; } #qunit-tests ol { margin-top: 0.5em; padding: 0.5em; background-color: #fff; border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; box-shadow: inset 0px 2px 13px #999; -moz-box-shadow: inset 0px 2px 13px #999; -webkit-box-shadow: inset 0px 2px 13px #999; } #qunit-tests table { border-collapse: collapse; margin-top: .2em; } #qunit-tests th { text-align: right; vertical-align: top; padding: 0 .5em 0 0; } #qunit-tests td { vertical-align: top; } #qunit-tests pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; } #qunit-tests del { background-color: #e0f2be; color: #374e0c; text-decoration: none; } #qunit-tests ins { background-color: #ffcaca; color: #500; text-decoration: none; } /*** Test Counts */ #qunit-tests b.counts { color: black; } #qunit-tests b.passed { color: #5E740B; } #qunit-tests b.failed { color: #710909; } #qunit-tests li li { margin: 0.5em; padding: 0.4em 0.5em 0.4em 0.5em; background-color: #fff; border-bottom: none; list-style-position: inside; } /*** Passing Styles */ #qunit-tests li li.pass { color: #5E740B; background-color: #fff; border-left: 26px solid #C6E746; } #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } #qunit-tests .pass .test-name { color: #366097; } #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } #qunit-banner.qunit-pass { background-color: #C6E746; } /*** Failing Styles */ #qunit-tests li li.fail { color: #710909; background-color: #fff; border-left: 26px solid #EE5757; white-space: pre; } #qunit-tests > li:last-child { border-radius: 0 0 15px 15px; -moz-border-radius: 0 0 15px 15px; -webkit-border-bottom-right-radius: 15px; -webkit-border-bottom-left-radius: 15px; } #qunit-tests .fail { color: #000000; background-color: #EE5757; } #qunit-tests .fail .test-name, #qunit-tests .fail .module-name { color: #000000; } #qunit-tests .fail .test-actual { color: #EE5757; } #qunit-tests .fail .test-expected { color: green; } #qunit-banner.qunit-fail { background-color: #EE5757; } /** Result */ #qunit-testresult { padding: 0.5em 0.5em 0.5em 2.5em; color: #2b81af; background-color: #D2E0E6; border-bottom: 1px solid white; } #qunit-testresult .module-name { font-weight: bold; } /** Fixture */ #qunit-fixture { position: absolute; top: -10000px; left: -10000px; width: 1000px; height: 1000px; } ================================================ FILE: tests/assets/qunit.js ================================================ /** * QUnit v1.5.0 - A JavaScript Unit Testing Framework * * http://docs.jquery.com/QUnit * * Copyright (c) 2012 John Resig, Jörn Zaefferer * Dual licensed under the MIT (MIT-LICENSE.txt) * or GPL (GPL-LICENSE.txt) licenses. */ (function(window) { var defined = { setTimeout: typeof window.setTimeout !== "undefined", sessionStorage: (function() { var x = "qunit-test-string"; try { sessionStorage.setItem(x, x); sessionStorage.removeItem(x); return true; } catch(e) { return false; } }()) }; var testId = 0, toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty; var Test = function(name, testName, expected, async, callback) { this.name = name; this.testName = testName; this.expected = expected; this.async = async; this.callback = callback; this.assertions = []; }; Test.prototype = { init: function() { var tests = id("qunit-tests"); if (tests) { var b = document.createElement("strong"); b.innerHTML = "Running " + this.name; var li = document.createElement("li"); li.appendChild( b ); li.className = "running"; li.id = this.id = "test-output" + testId++; tests.appendChild( li ); } }, setup: function() { if (this.module != config.previousModule) { if ( config.previousModule ) { runLoggingCallbacks('moduleDone', QUnit, { name: config.previousModule, failed: config.moduleStats.bad, passed: config.moduleStats.all - config.moduleStats.bad, total: config.moduleStats.all } ); } config.previousModule = this.module; config.moduleStats = { all: 0, bad: 0 }; runLoggingCallbacks( 'moduleStart', QUnit, { name: this.module } ); } else if (config.autorun) { runLoggingCallbacks( 'moduleStart', QUnit, { name: this.module } ); } config.current = this; this.testEnvironment = extend({ setup: function() {}, teardown: function() {} }, this.moduleTestEnvironment); runLoggingCallbacks( 'testStart', QUnit, { name: this.testName, module: this.module }); // allow utility functions to access the current test environment // TODO why?? QUnit.current_testEnvironment = this.testEnvironment; if ( !config.pollution ) { saveGlobal(); } if ( config.notrycatch ) { this.testEnvironment.setup.call(this.testEnvironment); return; } try { this.testEnvironment.setup.call(this.testEnvironment); } catch(e) { QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); } }, run: function() { config.current = this; var running = id("qunit-testresult"); if ( running ) { running.innerHTML = "Running:
" + this.name; } if ( this.async ) { QUnit.stop(); } if ( config.notrycatch ) { this.callback.call(this.testEnvironment); return; } try { this.callback.call(this.testEnvironment); } catch(e) { QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + ": " + e.message, extractStacktrace( e, 1 ) ); // else next test will carry the responsibility saveGlobal(); // Restart the tests if they're blocking if ( config.blocking ) { QUnit.start(); } } }, teardown: function() { config.current = this; if ( config.notrycatch ) { this.testEnvironment.teardown.call(this.testEnvironment); return; } else { try { this.testEnvironment.teardown.call(this.testEnvironment); } catch(e) { QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); } } checkPollution(); }, finish: function() { config.current = this; if ( this.expected != null && this.expected != this.assertions.length ) { QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); } else if ( this.expected == null && !this.assertions.length ) { QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions." ); } var good = 0, bad = 0, li, i, tests = id("qunit-tests"); config.stats.all += this.assertions.length; config.moduleStats.all += this.assertions.length; if ( tests ) { var ol = document.createElement("ol"); for ( i = 0; i < this.assertions.length; i++ ) { var assertion = this.assertions[i]; li = document.createElement("li"); li.className = assertion.result ? "pass" : "fail"; li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); ol.appendChild( li ); if ( assertion.result ) { good++; } else { bad++; config.stats.bad++; config.moduleStats.bad++; } } // store result when possible if ( QUnit.config.reorder && defined.sessionStorage ) { if (bad) { sessionStorage.setItem("qunit-test-" + this.module + "-" + this.testName, bad); } else { sessionStorage.removeItem("qunit-test-" + this.module + "-" + this.testName); } } if (bad === 0) { ol.style.display = "none"; } var b = document.createElement("strong"); b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; var a = document.createElement("a"); a.innerHTML = "Rerun"; a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); addEvent(b, "click", function() { var next = b.nextSibling.nextSibling, display = next.style.display; next.style.display = display === "none" ? "block" : "none"; }); addEvent(b, "dblclick", function(e) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { target = target.parentNode; } if ( window.location && target.nodeName.toLowerCase() === "strong" ) { window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); } }); li = id(this.id); li.className = bad ? "fail" : "pass"; li.removeChild( li.firstChild ); li.appendChild( b ); li.appendChild( a ); li.appendChild( ol ); } else { for ( i = 0; i < this.assertions.length; i++ ) { if ( !this.assertions[i].result ) { bad++; config.stats.bad++; config.moduleStats.bad++; } } } QUnit.reset(); runLoggingCallbacks( 'testDone', QUnit, { name: this.testName, module: this.module, failed: bad, passed: this.assertions.length - bad, total: this.assertions.length } ); }, queue: function() { var test = this; synchronize(function() { test.init(); }); function run() { // each of these can by async synchronize(function() { test.setup(); }); synchronize(function() { test.run(); }); synchronize(function() { test.teardown(); }); synchronize(function() { test.finish(); }); } // defer when previous test run passed, if storage is available var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-test-" + this.module + "-" + this.testName); if (bad) { run(); } else { synchronize(run, true); } } }; var QUnit = { // call on start of module test to prepend name to all tests module: function(name, testEnvironment) { config.currentModule = name; config.currentModuleTestEnviroment = testEnvironment; }, asyncTest: function(testName, expected, callback) { if ( arguments.length === 2 ) { callback = expected; expected = null; } QUnit.test(testName, expected, callback, true); }, test: function(testName, expected, callback, async) { var name = '' + escapeInnerText(testName) + ''; if ( arguments.length === 2 ) { callback = expected; expected = null; } if ( config.currentModule ) { name = '' + config.currentModule + ": " + name; } if ( !validTest(config.currentModule + ": " + testName) ) { return; } var test = new Test(name, testName, expected, async, callback); test.module = config.currentModule; test.moduleTestEnvironment = config.currentModuleTestEnviroment; test.queue(); }, // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. expect: function(asserts) { config.current.expected = asserts; }, // Asserts true. // @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); ok: function(result, msg) { if (!config.current) { throw new Error("ok() assertion outside test context, was " + sourceFromStacktrace(2)); } result = !!result; var details = { result: result, message: msg }; msg = escapeInnerText(msg || (result ? "okay" : "failed")); if ( !result ) { var source = sourceFromStacktrace(2); if (source) { details.source = source; msg += '
Source:
' + escapeInnerText(source) + '
'; } } runLoggingCallbacks( 'log', QUnit, details ); config.current.assertions.push({ result: result, message: msg }); }, // Checks that the first two arguments are equal, with an optional message. Prints out both actual and expected values. // @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); equal: function(actual, expected, message) { QUnit.push(expected == actual, actual, expected, message); }, notEqual: function(actual, expected, message) { QUnit.push(expected != actual, actual, expected, message); }, deepEqual: function(actual, expected, message) { QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); }, notDeepEqual: function(actual, expected, message) { QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); }, strictEqual: function(actual, expected, message) { QUnit.push(expected === actual, actual, expected, message); }, notStrictEqual: function(actual, expected, message) { QUnit.push(expected !== actual, actual, expected, message); }, raises: function(block, expected, message) { var actual, ok = false; if (typeof expected === 'string') { message = expected; expected = null; } try { block.call(config.current.testEnvironment); } catch (e) { actual = e; } if (actual) { // we don't want to validate thrown error if (!expected) { ok = true; // expected is a regexp } else if (QUnit.objectType(expected) === "regexp") { ok = expected.test(actual); // expected is a constructor } else if (actual instanceof expected) { ok = true; // expected is a validation function which returns true is validation passed } else if (expected.call({}, actual) === true) { ok = true; } } QUnit.ok(ok, message); }, start: function(count) { config.semaphore -= count || 1; if (config.semaphore > 0) { // don't start until equal number of stop-calls return; } if (config.semaphore < 0) { // ignore if start is called more often then stop config.semaphore = 0; } // A slight delay, to avoid any current callbacks if ( defined.setTimeout ) { window.setTimeout(function() { if (config.semaphore > 0) { return; } if ( config.timeout ) { clearTimeout(config.timeout); } config.blocking = false; process(true); }, 13); } else { config.blocking = false; process(true); } }, stop: function(count) { config.semaphore += count || 1; config.blocking = true; if ( config.testTimeout && defined.setTimeout ) { clearTimeout(config.timeout); config.timeout = window.setTimeout(function() { QUnit.ok( false, "Test timed out" ); config.semaphore = 1; QUnit.start(); }, config.testTimeout); } } }; //We want access to the constructor's prototype (function() { function F(){} F.prototype = QUnit; QUnit = new F(); //Make F QUnit's constructor so that we can add to the prototype later QUnit.constructor = F; }()); // deprecated; still export them to window to provide clear error messages // next step: remove entirely QUnit.equals = function() { QUnit.push(false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead"); }; QUnit.same = function() { QUnit.push(false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead"); }; // Maintain internal state var config = { // The queue of tests to run queue: [], // block until document ready blocking: true, // when enabled, show only failing tests // gets persisted through sessionStorage and can be changed in UI via checkbox hidepassed: false, // by default, run previously failed tests first // very useful in combination with "Hide passed tests" checked reorder: true, // by default, modify document.title when suite is done altertitle: true, urlConfig: ['noglobals', 'notrycatch'], //logging callback queues begin: [], done: [], log: [], testStart: [], testDone: [], moduleStart: [], moduleDone: [] }; // Load paramaters (function() { var location = window.location || { search: "", protocol: "file:" }, params = location.search.slice( 1 ).split( "&" ), length = params.length, urlParams = {}, current; if ( params[ 0 ] ) { for ( var i = 0; i < length; i++ ) { current = params[ i ].split( "=" ); current[ 0 ] = decodeURIComponent( current[ 0 ] ); // allow just a key to turn on a flag, e.g., test.html?noglobals current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; urlParams[ current[ 0 ] ] = current[ 1 ]; } } QUnit.urlParams = urlParams; config.filter = urlParams.filter; // Figure out if we're running the tests from a server or not QUnit.isLocal = location.protocol === 'file:'; }()); // Expose the API as global variables, unless an 'exports' // object exists, in that case we assume we're in CommonJS - export everything at the end if ( typeof exports === "undefined" || typeof require === "undefined" ) { extend(window, QUnit); window.QUnit = QUnit; } // define these after exposing globals to keep them in these QUnit namespace only extend(QUnit, { config: config, // Initialize the configuration options init: function() { extend(config, { stats: { all: 0, bad: 0 }, moduleStats: { all: 0, bad: 0 }, started: +new Date(), updateRate: 1000, blocking: false, autostart: true, autorun: false, filter: "", queue: [], semaphore: 0 }); var qunit = id( "qunit" ); if ( qunit ) { qunit.innerHTML = '

' + escapeInnerText( document.title ) + '

' + '

' + '
' + '

' + '
    '; } var tests = id( "qunit-tests" ), banner = id( "qunit-banner" ), result = id( "qunit-testresult" ); if ( tests ) { tests.innerHTML = ""; } if ( banner ) { banner.className = ""; } if ( result ) { result.parentNode.removeChild( result ); } if ( tests ) { result = document.createElement( "p" ); result.id = "qunit-testresult"; result.className = "result"; tests.parentNode.insertBefore( result, tests ); result.innerHTML = 'Running...
     '; } }, // Resets the test setup. Useful for tests that modify the DOM. // If jQuery is available, uses jQuery's html(), otherwise just innerHTML. reset: function() { if ( window.jQuery ) { jQuery( "#qunit-fixture" ).html( config.fixture ); } else { var main = id( 'qunit-fixture' ); if ( main ) { main.innerHTML = config.fixture; } } }, // Trigger an event on an element. // @example triggerEvent( document.body, "click" ); triggerEvent: function( elem, type, event ) { if ( document.createEvent ) { event = document.createEvent("MouseEvents"); event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null); elem.dispatchEvent( event ); } else if ( elem.fireEvent ) { elem.fireEvent("on"+type); } }, // Safe object type checking is: function( type, obj ) { return QUnit.objectType( obj ) == type; }, objectType: function( obj ) { if (typeof obj === "undefined") { return "undefined"; // consider: typeof null === object } if (obj === null) { return "null"; } var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || ''; switch (type) { case 'Number': if (isNaN(obj)) { return "nan"; } return "number"; case 'String': case 'Boolean': case 'Array': case 'Date': case 'RegExp': case 'Function': return type.toLowerCase(); } if (typeof obj === "object") { return "object"; } return undefined; }, push: function(result, actual, expected, message) { if (!config.current) { throw new Error("assertion outside test context, was " + sourceFromStacktrace()); } var details = { result: result, message: message, actual: actual, expected: expected }; message = escapeInnerText(message) || (result ? "okay" : "failed"); message = '' + message + ""; var output = message; if (!result) { expected = escapeInnerText(QUnit.jsDump.parse(expected)); actual = escapeInnerText(QUnit.jsDump.parse(actual)); output += ''; if (actual != expected) { output += ''; output += ''; } var source = sourceFromStacktrace(); if (source) { details.source = source; output += ''; } output += "
    Expected:
    ' + expected + '
    Result:
    ' + actual + '
    Diff:
    ' + QUnit.diff(expected, actual) +'
    Source:
    ' + escapeInnerText(source) + '
    "; } runLoggingCallbacks( 'log', QUnit, details ); config.current.assertions.push({ result: !!result, message: output }); }, pushFailure: function(message, source) { var details = { result: false, message: message }; var output = escapeInnerText(message); if (source) { details.source = source; output += '
    Source:
    ' + escapeInnerText(source) + '
    '; } runLoggingCallbacks( 'log', QUnit, details ); config.current.assertions.push({ result: false, message: output }); }, url: function( params ) { params = extend( extend( {}, QUnit.urlParams ), params ); var querystring = "?", key; for ( key in params ) { if ( !hasOwn.call( params, key ) ) { continue; } querystring += encodeURIComponent( key ) + "=" + encodeURIComponent( params[ key ] ) + "&"; } return window.location.pathname + querystring.slice( 0, -1 ); }, extend: extend, id: id, addEvent: addEvent }); //QUnit.constructor is set to the empty F() above so that we can add to it's prototype later //Doing this allows us to tell if the following methods have been overwritten on the actual //QUnit object, which is a deprecated way of using the callbacks. extend(QUnit.constructor.prototype, { // Logging callbacks; all receive a single argument with the listed properties // run test/logs.html for any related changes begin: registerLoggingCallback('begin'), // done: { failed, passed, total, runtime } done: registerLoggingCallback('done'), // log: { result, actual, expected, message } log: registerLoggingCallback('log'), // testStart: { name } testStart: registerLoggingCallback('testStart'), // testDone: { name, failed, passed, total } testDone: registerLoggingCallback('testDone'), // moduleStart: { name } moduleStart: registerLoggingCallback('moduleStart'), // moduleDone: { name, failed, passed, total } moduleDone: registerLoggingCallback('moduleDone') }); if ( typeof document === "undefined" || document.readyState === "complete" ) { config.autorun = true; } QUnit.load = function() { runLoggingCallbacks( 'begin', QUnit, {} ); // Initialize the config, saving the execution queue var oldconfig = extend({}, config); QUnit.init(); extend(config, oldconfig); config.blocking = false; var urlConfigHtml = '', len = config.urlConfig.length; for ( var i = 0, val; i < len; i++ ) { val = config.urlConfig[i]; config[val] = QUnit.urlParams[val]; urlConfigHtml += ''; } var userAgent = id("qunit-userAgent"); if ( userAgent ) { userAgent.innerHTML = navigator.userAgent; } var banner = id("qunit-header"); if ( banner ) { banner.innerHTML = ' ' + banner.innerHTML + ' ' + urlConfigHtml; addEvent( banner, "change", function( event ) { var params = {}; params[ event.target.name ] = event.target.checked ? true : undefined; window.location = QUnit.url( params ); }); } var toolbar = id("qunit-testrunner-toolbar"); if ( toolbar ) { var filter = document.createElement("input"); filter.type = "checkbox"; filter.id = "qunit-filter-pass"; addEvent( filter, "click", function() { var ol = document.getElementById("qunit-tests"); if ( filter.checked ) { ol.className = ol.className + " hidepass"; } else { var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; ol.className = tmp.replace(/ hidepass /, " "); } if ( defined.sessionStorage ) { if (filter.checked) { sessionStorage.setItem("qunit-filter-passed-tests", "true"); } else { sessionStorage.removeItem("qunit-filter-passed-tests"); } } }); if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) { filter.checked = true; var ol = document.getElementById("qunit-tests"); ol.className = ol.className + " hidepass"; } toolbar.appendChild( filter ); var label = document.createElement("label"); label.setAttribute("for", "qunit-filter-pass"); label.innerHTML = "Hide passed tests"; toolbar.appendChild( label ); } var main = id('qunit-fixture'); if ( main ) { config.fixture = main.innerHTML; } if (config.autostart) { QUnit.start(); } }; addEvent(window, "load", QUnit.load); // addEvent(window, "error") gives us a useless event object window.onerror = function( message, file, line ) { if ( QUnit.config.current ) { QUnit.pushFailure( message, file + ":" + line ); } else { QUnit.test( "global failure", function() { QUnit.pushFailure( message, file + ":" + line ); }); } }; function done() { config.autorun = true; // Log the last module results if ( config.currentModule ) { runLoggingCallbacks( 'moduleDone', QUnit, { name: config.currentModule, failed: config.moduleStats.bad, passed: config.moduleStats.all - config.moduleStats.bad, total: config.moduleStats.all } ); } var banner = id("qunit-banner"), tests = id("qunit-tests"), runtime = +new Date() - config.started, passed = config.stats.all - config.stats.bad, html = [ 'Tests completed in ', runtime, ' milliseconds.
    ', '', passed, ' tests of ', config.stats.all, ' passed, ', config.stats.bad, ' failed.' ].join(''); if ( banner ) { banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); } if ( tests ) { id( "qunit-testresult" ).innerHTML = html; } if ( config.altertitle && typeof document !== "undefined" && document.title ) { // show ✖ for good, ✔ for bad suite result in title // use escape sequences in case file gets loaded with non-utf-8-charset document.title = [ (config.stats.bad ? "\u2716" : "\u2714"), document.title.replace(/^[\u2714\u2716] /i, "") ].join(" "); } // clear own sessionStorage items if all tests passed if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) { var key; for ( var i = 0; i < sessionStorage.length; i++ ) { key = sessionStorage.key( i++ ); if ( key.indexOf("qunit-test-") === 0 ) { sessionStorage.removeItem( key ); } } } runLoggingCallbacks( 'done', QUnit, { failed: config.stats.bad, passed: passed, total: config.stats.all, runtime: runtime } ); } function validTest( name ) { var filter = config.filter, run = false; if ( !filter ) { return true; } var not = filter.charAt( 0 ) === "!"; if ( not ) { filter = filter.slice( 1 ); } if ( name.indexOf( filter ) !== -1 ) { return !not; } if ( not ) { run = true; } return run; } // so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions) // Later Safari and IE10 are supposed to support error.stack as well // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack function extractStacktrace( e, offset ) { offset = offset || 3; if (e.stacktrace) { // Opera return e.stacktrace.split("\n")[offset + 3]; } else if (e.stack) { // Firefox, Chrome var stack = e.stack.split("\n"); if (/^error$/i.test(stack[0])) { stack.shift(); } return stack[offset]; } else if (e.sourceURL) { // Safari, PhantomJS // hopefully one day Safari provides actual stacktraces // exclude useless self-reference for generated Error objects if ( /qunit.js$/.test( e.sourceURL ) ) { return; } // for actual exceptions, this is useful return e.sourceURL + ":" + e.line; } } function sourceFromStacktrace(offset) { try { throw new Error(); } catch ( e ) { return extractStacktrace( e, offset ); } } function escapeInnerText(s) { if (!s) { return ""; } s = s + ""; return s.replace(/[\&<>]/g, function(s) { switch(s) { case "&": return "&"; case "<": return "<"; case ">": return ">"; default: return s; } }); } function synchronize( callback, last ) { config.queue.push( callback ); if ( config.autorun && !config.blocking ) { process(last); } } function process( last ) { function next() { process( last ); } var start = new Date().getTime(); config.depth = config.depth ? config.depth + 1 : 1; while ( config.queue.length && !config.blocking ) { if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { config.queue.shift()(); } else { window.setTimeout( next, 13 ); break; } } config.depth--; if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { done(); } } function saveGlobal() { config.pollution = []; if ( config.noglobals ) { for ( var key in window ) { if ( !hasOwn.call( window, key ) ) { continue; } config.pollution.push( key ); } } } function checkPollution( name ) { var old = config.pollution; saveGlobal(); var newGlobals = diff( config.pollution, old ); if ( newGlobals.length > 0 ) { QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") ); } var deletedGlobals = diff( old, config.pollution ); if ( deletedGlobals.length > 0 ) { QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") ); } } // returns a new Array with the elements that are in a but not in b function diff( a, b ) { var result = a.slice(); for ( var i = 0; i < result.length; i++ ) { for ( var j = 0; j < b.length; j++ ) { if ( result[i] === b[j] ) { result.splice(i, 1); i--; break; } } } return result; } function extend(a, b) { for ( var prop in b ) { if ( b[prop] === undefined ) { delete a[prop]; // Avoid "Member not found" error in IE8 caused by setting window.constructor } else if ( prop !== "constructor" || a !== window ) { a[prop] = b[prop]; } } return a; } function addEvent(elem, type, fn) { if ( elem.addEventListener ) { elem.addEventListener( type, fn, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, fn ); } else { fn(); } } function id(name) { return !!(typeof document !== "undefined" && document && document.getElementById) && document.getElementById( name ); } function registerLoggingCallback(key){ return function(callback){ config[key].push( callback ); }; } // Supports deprecated method of completely overwriting logging callbacks function runLoggingCallbacks(key, scope, args) { //debugger; var callbacks; if ( QUnit.hasOwnProperty(key) ) { QUnit[key].call(scope, args); } else { callbacks = config[key]; for( var i = 0; i < callbacks.length; i++ ) { callbacks[i].call( scope, args ); } } } // Test for equality any JavaScript type. // Author: Philippe Rathé QUnit.equiv = (function() { var innerEquiv; // the real equiv function var callers = []; // stack to decide between skip/abort functions var parents = []; // stack to avoiding loops from circular referencing // Call the o related callback with the given arguments. function bindCallbacks(o, callbacks, args) { var prop = QUnit.objectType(o); if (prop) { if (QUnit.objectType(callbacks[prop]) === "function") { return callbacks[prop].apply(callbacks, args); } else { return callbacks[prop]; // or undefined } } } var getProto = Object.getPrototypeOf || function (obj) { return obj.__proto__; }; var callbacks = (function () { // for string, boolean, number and null function useStrictEquality(b, a) { if (b instanceof a.constructor || a instanceof b.constructor) { // to catch short annotaion VS 'new' annotation of a // declaration // e.g. var i = 1; // var j = new Number(1); return a == b; } else { return a === b; } } return { "string" : useStrictEquality, "boolean" : useStrictEquality, "number" : useStrictEquality, "null" : useStrictEquality, "undefined" : useStrictEquality, "nan" : function(b) { return isNaN(b); }, "date" : function(b, a) { return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); }, "regexp" : function(b, a) { return QUnit.objectType(b) === "regexp" && // the regex itself a.source === b.source && // and its modifers a.global === b.global && // (gmi) ... a.ignoreCase === b.ignoreCase && a.multiline === b.multiline; }, // - skip when the property is a method of an instance (OOP) // - abort otherwise, // initial === would have catch identical references anyway "function" : function() { var caller = callers[callers.length - 1]; return caller !== Object && typeof caller !== "undefined"; }, "array" : function(b, a) { var i, j, loop; var len; // b could be an object literal here if (QUnit.objectType(b) !== "array") { return false; } len = a.length; if (len !== b.length) { // safe and faster return false; } // track reference to avoid circular references parents.push(a); for (i = 0; i < len; i++) { loop = false; for (j = 0; j < parents.length; j++) { if (parents[j] === a[i]) { loop = true;// dont rewalk array } } if (!loop && !innerEquiv(a[i], b[i])) { parents.pop(); return false; } } parents.pop(); return true; }, "object" : function(b, a) { var i, j, loop; var eq = true; // unless we can proove it var aProperties = [], bProperties = []; // collection of // strings // comparing constructors is more strict than using // instanceof if (a.constructor !== b.constructor) { // Allow objects with no prototype to be equivalent to // objects with Object as their constructor. if (!((getProto(a) === null && getProto(b) === Object.prototype) || (getProto(b) === null && getProto(a) === Object.prototype))) { return false; } } // stack constructor before traversing properties callers.push(a.constructor); // track reference to avoid circular references parents.push(a); for (i in a) { // be strict: don't ensures hasOwnProperty // and go deep loop = false; for (j = 0; j < parents.length; j++) { if (parents[j] === a[i]) { // don't go down the same path twice loop = true; } } aProperties.push(i); // collect a's properties if (!loop && !innerEquiv(a[i], b[i])) { eq = false; break; } } callers.pop(); // unstack, we are done parents.pop(); for (i in b) { bProperties.push(i); // collect b's properties } // Ensures identical properties name return eq && innerEquiv(aProperties.sort(), bProperties.sort()); } }; }()); innerEquiv = function() { // can take multiple arguments var args = Array.prototype.slice.apply(arguments); if (args.length < 2) { return true; // end transition } return (function(a, b) { if (a === b) { return true; // catch the most you can } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b)) { return false; // don't lose time with error prone cases } else { return bindCallbacks(a, callbacks, [ b, a ]); } // apply transition with (1..n) arguments }(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length - 1))); }; return innerEquiv; }()); /** * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | * http://flesler.blogspot.com Licensed under BSD * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008 * * @projectDescription Advanced and extensible data dumping for Javascript. * @version 1.0.0 * @author Ariel Flesler * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} */ QUnit.jsDump = (function() { function quote( str ) { return '"' + str.toString().replace(/"/g, '\\"') + '"'; } function literal( o ) { return o + ''; } function join( pre, arr, post ) { var s = jsDump.separator(), base = jsDump.indent(), inner = jsDump.indent(1); if ( arr.join ) { arr = arr.join( ',' + s + inner ); } if ( !arr ) { return pre + post; } return [ pre, inner + arr, base + post ].join(s); } function array( arr, stack ) { var i = arr.length, ret = new Array(i); this.up(); while ( i-- ) { ret[i] = this.parse( arr[i] , undefined , stack); } this.down(); return join( '[', ret, ']' ); } var reName = /^function (\w+)/; var jsDump = { parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance stack = stack || [ ]; var parser = this.parsers[ type || this.typeOf(obj) ]; type = typeof parser; var inStack = inArray(obj, stack); if (inStack != -1) { return 'recursion('+(inStack - stack.length)+')'; } //else if (type == 'function') { stack.push(obj); var res = parser.call( this, obj, stack ); stack.pop(); return res; } // else return (type == 'string') ? parser : this.parsers.error; }, typeOf: function( obj ) { var type; if ( obj === null ) { type = "null"; } else if (typeof obj === "undefined") { type = "undefined"; } else if (QUnit.is("RegExp", obj)) { type = "regexp"; } else if (QUnit.is("Date", obj)) { type = "date"; } else if (QUnit.is("Function", obj)) { type = "function"; } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") { type = "window"; } else if (obj.nodeType === 9) { type = "document"; } else if (obj.nodeType) { type = "node"; } else if ( // native arrays toString.call( obj ) === "[object Array]" || // NodeList objects ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) ) ) { type = "array"; } else { type = typeof obj; } return type; }, separator: function() { return this.multiline ? this.HTML ? '
    ' : '\n' : this.HTML ? ' ' : ' '; }, indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing if ( !this.multiline ) { return ''; } var chr = this.indentChar; if ( this.HTML ) { chr = chr.replace(/\t/g,' ').replace(/ /g,' '); } return new Array( this._depth_ + (extra||0) ).join(chr); }, up: function( a ) { this._depth_ += a || 1; }, down: function( a ) { this._depth_ -= a || 1; }, setParser: function( name, parser ) { this.parsers[name] = parser; }, // The next 3 are exposed so you can use them quote: quote, literal: literal, join: join, // _depth_: 1, // This is the list of parsers, to modify them, use jsDump.setParser parsers: { window: '[Window]', document: '[Document]', error: '[ERROR]', //when no parser is found, shouldn't happen unknown: '[Unknown]', 'null': 'null', 'undefined': 'undefined', 'function': function( fn ) { var ret = 'function', name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE if ( name ) { ret += ' ' + name; } ret += '('; ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); }, array: array, nodelist: array, 'arguments': array, object: function( map, stack ) { var ret = [ ], keys, key, val, i; QUnit.jsDump.up(); if (Object.keys) { keys = Object.keys( map ); } else { keys = []; for (key in map) { keys.push( key ); } } keys.sort(); for (i = 0; i < keys.length; i++) { key = keys[ i ]; val = map[ key ]; ret.push( QUnit.jsDump.parse( key, 'key' ) + ': ' + QUnit.jsDump.parse( val, undefined, stack ) ); } QUnit.jsDump.down(); return join( '{', ret, '}' ); }, node: function( node ) { var open = QUnit.jsDump.HTML ? '<' : '<', close = QUnit.jsDump.HTML ? '>' : '>'; var tag = node.nodeName.toLowerCase(), ret = open + tag; for ( var a in QUnit.jsDump.DOMAttrs ) { var val = node[QUnit.jsDump.DOMAttrs[a]]; if ( val ) { ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); } } return ret + close + open + '/' + tag + close; }, functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function var l = fn.length; if ( !l ) { return ''; } var args = new Array(l); while ( l-- ) { args[l] = String.fromCharCode(97+l);//97 is 'a' } return ' ' + args.join(', ') + ' '; }, key: quote, //object calls it internally, the key part of an item in a map functionCode: '[code]', //function calls it internally, it's the content of the function attribute: quote, //node calls it internally, it's an html attribute value string: quote, date: quote, regexp: literal, //regex number: literal, 'boolean': literal }, DOMAttrs:{//attributes to dump from nodes, name=>realName id:'id', name:'name', 'class':'className' }, HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) indentChar:' ',//indentation unit multiline:true //if true, items in a collection, are separated by a \n, else just a space. }; return jsDump; }()); // from Sizzle.js function getText( elems ) { var ret = "", elem; for ( var i = 0; elems[i]; i++ ) { elem = elems[i]; // Get the text from text nodes and CDATA nodes if ( elem.nodeType === 3 || elem.nodeType === 4 ) { ret += elem.nodeValue; // Traverse everything else, except comment nodes } else if ( elem.nodeType !== 8 ) { ret += getText( elem.childNodes ); } } return ret; } //from jquery.js function inArray( elem, array ) { if ( array.indexOf ) { return array.indexOf( elem ); } for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; } } return -1; } /* * Javascript Diff Algorithm * By John Resig (http://ejohn.org/) * Modified by Chu Alan "sprite" * * Released under the MIT license. * * More Info: * http://ejohn.org/projects/javascript-diff-algorithm/ * * Usage: QUnit.diff(expected, actual) * * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" */ QUnit.diff = (function() { function diff(o, n) { var ns = {}; var os = {}; var i; for (i = 0; i < n.length; i++) { if (ns[n[i]] == null) { ns[n[i]] = { rows: [], o: null }; } ns[n[i]].rows.push(i); } for (i = 0; i < o.length; i++) { if (os[o[i]] == null) { os[o[i]] = { rows: [], n: null }; } os[o[i]].rows.push(i); } for (i in ns) { if ( !hasOwn.call( ns, i ) ) { continue; } if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { n[ns[i].rows[0]] = { text: n[ns[i].rows[0]], row: os[i].rows[0] }; o[os[i].rows[0]] = { text: o[os[i].rows[0]], row: ns[i].rows[0] }; } } for (i = 0; i < n.length - 1; i++) { if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && n[i + 1] == o[n[i].row + 1]) { n[i + 1] = { text: n[i + 1], row: n[i].row + 1 }; o[n[i].row + 1] = { text: o[n[i].row + 1], row: i + 1 }; } } for (i = n.length - 1; i > 0; i--) { if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && n[i - 1] == o[n[i].row - 1]) { n[i - 1] = { text: n[i - 1], row: n[i].row - 1 }; o[n[i].row - 1] = { text: o[n[i].row - 1], row: i - 1 }; } } return { o: o, n: n }; } return function(o, n) { o = o.replace(/\s+$/, ''); n = n.replace(/\s+$/, ''); var out = diff(o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/)); var str = ""; var i; var oSpace = o.match(/\s+/g); if (oSpace == null) { oSpace = [" "]; } else { oSpace.push(" "); } var nSpace = n.match(/\s+/g); if (nSpace == null) { nSpace = [" "]; } else { nSpace.push(" "); } if (out.n.length === 0) { for (i = 0; i < out.o.length; i++) { str += '' + out.o[i] + oSpace[i] + ""; } } else { if (out.n[0].text == null) { for (n = 0; n < out.o.length && out.o[n].text == null; n++) { str += '' + out.o[n] + oSpace[n] + ""; } } for (i = 0; i < out.n.length; i++) { if (out.n[i].text == null) { str += '' + out.n[i] + nSpace[i] + ""; } else { var pre = ""; for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { pre += '' + out.o[n] + oSpace[n] + ""; } str += " " + out.n[i].text + nSpace[i] + pre; } } } return str; }; }()); // for CommonJS enviroments, export everything if ( typeof exports !== "undefined" || typeof require !== "undefined" ) { extend(exports, QUnit); } // get at whatever the global object is, like window in browsers }( (function() {return this;}.call()) )); ================================================ FILE: tests/assets/utils.js ================================================ function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } function format_date(date){ var y = date.getUTCFullYear(), m = date.getUTCMonth() + 1, d = date.getUTCDate(), h = date.getUTCHours(), i = date.getUTCMinutes(), s = date.getUTCSeconds(), l = date.getUTCMilliseconds(); function z(i){return (i <= 9 ? '0'+i : i);} return y+'-'+z(m)+'-'+z(d)+' '+z(h)+':'+z(i)+':'+z(s)+'.'+z(l); } function datesEqual(actual, expected, message){ QUnit.push(QUnit.equiv(actual, expected), format_date(actual), format_date(expected), message); } ================================================ FILE: tests/suites/calendar-weeks.js ================================================ module('Calendar Weeks', { setup: function(){ this.input = $('') .appendTo('#qunit-fixture') .val('2013-01-14') .datepicker({ format: 'yyyy-mm-dd', calendarWeeks: true }) .focus(); // Activate for visibility checks this.dp = this.input.data('datepicker'); this.picker = this.dp.picker; }, teardown: function(){ this.picker.remove(); } }); test('adds cw header column', function(){ var target = this.picker.find('.datepicker-days thead tr:nth-child(3) th:first-child'); ok(target.hasClass('cw'), 'First column heading is from cw column'); }); test('adds calendar week cells to each day row', function(){ var target = this.picker.find('.datepicker-days tbody tr'); expect(target.length); target.each(function(i){ var t = $(this).children().first(); ok(t.hasClass('cw'), "First column is cw column"); }); }); test('displays correct calendar week', function(){ var target = this.picker.find('.datepicker-days tbody tr'); expect(target.length); target.each(function(i){ var t = $(this).children().first(); equal(t.text(), i+1, "Displays correct calendar weeks"); }); }); test('it prepends column to switcher thead row', function(){ var target = this.picker.find('.datepicker-days thead tr:nth-child(2)'); equal(target.children().length, 3, 'first row has 3 columns'); ok(!target.children().first().hasClass('cw'), 'cw column is not prepended'); }); ================================================ FILE: tests/suites/component.js ================================================ module('Component', { setup: function(){ this.fieldset = $('
    ' + '
    '+ ''+ ''+ '
    ' + '
    ') .appendTo('#qunit-fixture'); this.component = this.fieldset.find('.input-append') .datepicker({format: "dd-mm-yyyy"}); this.input = this.component.find('input'); this.addon = this.component.find('.add-on'); this.dp = this.component.data('datepicker'); this.picker = this.dp.picker; }, teardown: function(){ this.picker.remove(); } }); test('Component gets date/viewDate from input value', function(){ datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12)); }); test('Activation by component', function(){ ok(!this.picker.is(':visible')); this.addon.click(); ok(this.picker.is(':visible')); }); test('Dont activation (by disabled) by component', function(){ ok(!this.picker.is(':visible')); this.input.prop('disabled', true); this.addon.click(); ok(!this.picker.is(':visible')); this.input.prop('disabled', false); this.fieldset.prop('disabled', true); this.addon.click(); ok(!this.picker.is(':visible')); }); test('simple keyboard nav test', function(){ var target; // Keyboard nav only works with non-readonly inputs this.input.removeAttr('readonly'); equal(this.dp.viewMode, 0); target = this.picker.find('.datepicker-days thead th.datepicker-switch'); equal(target.text(), 'February 2012', 'Title is "February 2012"'); datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12)); // Focus/open this.addon.click(); // Navigation: -1 day, left arrow key this.input.trigger({ type: 'keydown', keyCode: 37 }); datesEqual(this.dp.viewDate, UTCDate(2012, 1, 11)); datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); datesEqual(this.dp.focusDate, UTCDate(2012, 1, 11)); // Month not changed target = this.picker.find('.datepicker-days thead th.datepicker-switch'); equal(target.text(), 'February 2012', 'Title is "February 2012"'); // Navigation: +1 month, shift + right arrow key this.input.trigger({ type: 'keydown', keyCode: 39, shiftKey: true }); datesEqual(this.dp.viewDate, UTCDate(2012, 2, 11)); datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); datesEqual(this.dp.focusDate, UTCDate(2012, 2, 11)); target = this.picker.find('.datepicker-days thead th.datepicker-switch'); equal(target.text(), 'March 2012', 'Title is "March 2012"'); // Navigation: -1 year, ctrl + left arrow key this.input.trigger({ type: 'keydown', keyCode: 37, ctrlKey: true }); datesEqual(this.dp.viewDate, UTCDate(2011, 2, 11)); datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); datesEqual(this.dp.focusDate, UTCDate(2011, 2, 11)); target = this.picker.find('.datepicker-days thead th.datepicker-switch'); equal(target.text(), 'March 2011', 'Title is "March 2011"'); }); test('setValue', function(){ this.dp.dates.replace(UTCDate(2012, 2, 13)); this.dp.setValue(); datesEqual(this.dp.dates[0], UTCDate(2012, 2, 13)); equal(this.input.val(), '13-03-2012'); }); test('update', function(){ this.input.val('13-03-2012'); this.dp.update(); equal(this.dp.dates.length, 1); datesEqual(this.dp.dates[0], UTCDate(2012, 2, 13)); }); test('Navigating to/from decade view', function(){ var target; this.addon.click(); this.input.val('31-03-2012'); this.dp.update(); equal(this.dp.viewMode, 0); target = this.picker.find('.datepicker-days thead th.datepicker-switch'); ok(target.is(':visible'), 'View switcher is visible'); target.click(); ok(this.picker.find('.datepicker-months').is(':visible'), 'Month picker is visible'); equal(this.dp.viewMode, 1); // Not modified when switching modes datesEqual(this.dp.viewDate, UTCDate(2012, 2, 31)); datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); target = this.picker.find('.datepicker-months thead th.datepicker-switch'); ok(target.is(':visible'), 'View switcher is visible'); target.click(); ok(this.picker.find('.datepicker-years').is(':visible'), 'Year picker is visible'); equal(this.dp.viewMode, 2); // Not modified when switching modes datesEqual(this.dp.viewDate, UTCDate(2012, 2, 31)); datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); // Change years to test internal state changes target = this.picker.find('.datepicker-years tbody span:contains(2011)'); target.click(); equal(this.dp.viewMode, 1); // Only viewDate modified datesEqual(this.dp.viewDate, UTCDate(2011, 2, 1)); datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); target = this.picker.find('.datepicker-months tbody span:contains(Apr)'); target.click(); equal(this.dp.viewMode, 0); // Only viewDate modified datesEqual(this.dp.viewDate, UTCDate(2011, 3, 1)); datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); }); test('Selecting date resets viewDate and date', function(){ var target; this.addon.click(); this.input.val('31-03-2012'); this.dp.update(); // Rendered correctly equal(this.dp.viewMode, 0); target = this.picker.find('.datepicker-days tbody td:first'); equal(target.text(), '26'); // Should be Feb 26 // Updated internally on click target.click(); datesEqual(this.dp.viewDate, UTCDate(2012, 1, 26)); datesEqual(this.dp.dates[0], UTCDate(2012, 1, 26)); // Re-rendered on click target = this.picker.find('.datepicker-days tbody td:first'); equal(target.text(), '29'); // Should be Jan 29 }); test('"destroy" removes associated HTML', function(){ var datepickerDivSelector = '.datepicker'; $('#datepicker').datepicker('show'); //there should be one datepicker initiated so that means one hidden .datepicker div equal($(datepickerDivSelector).length, 1); this.component.datepicker('destroy'); equal($(datepickerDivSelector).length, 0);//hidden HTML should be gone }); test('"remove" is an alias for "destroy"', function(){ var called, originalDestroy = this.dp.destroy; this.dp.destroy = function () { called = true; return originalDestroy.apply(this, arguments); }; this.dp.remove(); ok(called); }); test('Does not block events', function(){ var clicks = 0; function handler(){ clicks++; } $('#qunit-fixture').on('click', '.add-on', handler); this.addon.click(); equal(clicks, 1); $('#qunit-fixture').off('click', '.add-on', handler); }); test('date and viewDate must be between startDate and endDate when setStartDate called', function() { this.dp.setDate(new Date(2013, 1, 1)); datesEqual(this.dp.dates[0], UTCDate(2013, 1, 1)); datesEqual(this.dp.viewDate, UTCDate(2013, 1, 1)); this.dp.setStartDate(new Date(2013, 5, 6)); datesEqual(this.dp.viewDate, UTCDate(2013, 5, 6)); equal(this.dp.dates.length, 0); }); test('date and viewDate must be between startDate and endDate when setEndDate called', function() { this.dp.setDate(new Date(2013, 11, 1)); datesEqual(this.dp.dates[0], UTCDate(2013, 11, 1)); datesEqual(this.dp.viewDate, UTCDate(2013, 11, 1)); this.dp.setEndDate(new Date(2013, 5, 6)); datesEqual(this.dp.viewDate, UTCDate(2013, 5, 6)); equal(this.dp.dates.length, 0); }); test('picker should render fine when `$.fn.show` and `$.fn.hide` are overridden', patch_show_hide(function () { var viewModes = $.fn.datepicker.DPGlobal.viewModes, minViewMode = this.dp.o.minViewMode, maxViewMode = this.dp.o.maxViewMode, childDivs = this.picker.children('div'); this.dp.setViewMode(minViewMode); // Overwritten `$.fn.hide` method adds the `foo` class to its matched elements var curDivShowing = childDivs.filter('.datepicker-' + viewModes[minViewMode].clsName); ok(!curDivShowing.hasClass('foo'), 'Shown div does not have overridden `$.fn.hide` side-effects'); // Check that other classes do have `foo` class var divNotShown; for (var curViewMode = minViewMode + 1; curViewMode <= maxViewMode; curViewMode++) { divNotShown = childDivs.filter('.datepicker-' + viewModes[curViewMode].clsName); ok(divNotShown.hasClass('foo'), 'Other divs do have overridden `$.fn.hide` side-effects'); } })); test('Focused ceil for decade/century/millennium views', function(){ var input = $('') .appendTo('#qunit-fixture') .datepicker({ startView: 2, defaultViewDate: { year: 2115 } }), dp = input.data('datepicker'), picker = dp.picker, target; input.focus(); target = picker.find('.datepicker-years tbody .focused'); ok(target.text() === '2115', 'Year cell is focused'); picker.find('.datepicker-years thead th.datepicker-switch').click(); target = picker.find('.datepicker-decades tbody .focused'); ok(target.text() === '2110', 'Decade cell is focused'); picker.find('.datepicker-decades thead th.datepicker-switch').click(); target = picker.find('.datepicker-centuries tbody .focused'); ok(target.text() === '2100', 'Century cell is focused'); }); ================================================ FILE: tests/suites/data-api.js ================================================ module('DATA-API'); test('DATA-API: data-provide="datepicker" on input; focus', function(){ var input = $('') .appendTo('#qunit-fixture'); input.focus(); ok(input.data('datepicker'), 'datepicker is initialized by "focus" event'); }); test('DATA-API: data-provide="datepicker" on input; click', function(){ var input = $('') .appendTo('#qunit-fixture'); input.click(); ok(input.data('datepicker'), 'datepicker is initialized by "focus" event'); }); test('DATA-API: data-provide="datepicker" on component', function(){ var html, comp; html = '
    '+ ''+ '
    '; comp = $(html).appendTo('#qunit-fixture'); comp.find('input').focus(); ok(comp.data('datepicker'), 'append component initialized by "focus" event on input'); comp.remove(); comp = $(html).appendTo('#qunit-fixture'); comp.find('input').click(); ok(comp.data('datepicker'), 'append component initialized by "click" event on input'); comp.remove(); comp = $(html).appendTo('#qunit-fixture'); comp.find('.add-on').focusin(); ok(comp.data('datepicker'), 'append component initialized by "focus" event on add-on'); comp.remove(); comp = $(html).appendTo('#qunit-fixture'); comp.find('.add-on').click(); ok(comp.data('datepicker'), 'append component initialized by "click" event on add-on'); comp.remove(); html = '
    '+ ''+ '
    '; comp = $(html).prependTo('#qunit-fixture'); comp.find('input').focus(); ok(comp.data('datepicker'), 'prepend component initialized by "focus" event on input'); comp.remove(); comp = $(html).prependTo('#qunit-fixture'); comp.find('input').click(); ok(comp.data('datepicker'), 'prepend component initialized by "click" event on input'); comp.remove(); comp = $(html).prependTo('#qunit-fixture'); comp.find('.add-on').focusin(); ok(comp.data('datepicker'), 'prepend component initialized by "focus" event on add-on'); comp.remove(); comp = $(html).prependTo('#qunit-fixture'); comp.find('.add-on').click(); ok(comp.data('datepicker'), 'prepend component initialized by "click" event on add-on'); comp.remove(); }); test('DATA-API: data-provide="datepicker" on button', function(){ var html, comp; html = '