diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/bower.json libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/bower.json --- libjs-twitter-bootstrap-datepicker-0.0.0.1/bower.json 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/bower.json 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,9 @@ +{ + "name": "bootstrap-datepicker-n9", + "version": "1.3.1", + "main": ["js/bootstrap-datepicker.js", "css/datepicker.css", "css/datepicker3.css"], + "dependencies": { + "jquery" : ">=1.7.1", + "bootstrap" : ">=3.0 <4.0" + } +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build3.less libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build3.less --- libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build3.less 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build3.less 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,71 @@ +// 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 +@gray: lighten(#000, 33.5%); // #555 +@gray-light: lighten(#000, 60%); // #999 +@gray-lighter: lighten(#000, 93.5%); // #eee + +@input-border: #ccc; + +@brand-primary: #428bca; +//@btn-default-color: #333; +//@btn-default-bg: #fff; +//@btn-default-border: #ccc; +@btn-primary-color: #fff; +@btn-primary-bg: @brand-primary; +@btn-primary-border: darken(@btn-primary-bg, 5%); + + +@btn-link-disabled-color: @gray-light; + +@input-group-addon-bg: @gray-lighter; +@input-group-addon-border-color: @input-border; + +@font-size-base: 14px; +@line-height-base: 1.428571429; // 20/14 +@line-height-computed: floor(@font-size-base * @line-height-base); // ~20px + + +// Mixins + +// Button variants +.button-variant(@color; @background; @border) { + color: @color; + background-color: @background; + border-color: @border; + + &:hover, + &:focus, + &:active, + &.active, + .open .dropdown-toggle& { + color: @color; + background-color: darken(@background, 8%); + border-color: darken(@border, 12%); + } + &:active, + &.active, + .open .dropdown-toggle& { + background-image: none; + } + &.disabled, + &[disabled], + fieldset[disabled] & { + &, + &:hover, + &:focus, + &:active, + &.active { + background-color: @background; + border-color: @border + } + } +} + +@import "../less/datepicker3.less"; diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build.less libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build.less --- libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build.less 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build.less 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,67 @@ +// 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; +@baseLineHeight: 18px; + +// 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(top, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(top, @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(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(top, @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"; diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build_standalone3.less libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build_standalone3.less --- libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build_standalone3.less 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build_standalone3.less 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,67 @@ +// 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 "build3.less"; + +// Dropdown css + +@zindex-dropdown: 1000; +@gray-dark: #333; +@line-height-base: 1.428571429; // 20/14 +@table-bg: transparent; // overall background-color +@dropdown-bg: #fff; +@dropdow-border: rgba(0,0,0,.15); +@dropdown-link-color: @gray-dark; +@dropdown-link-hover-color: #fff; +@component-active-bg: @brand-primary; +@dropdown-link-active-bg: @component-active-bg; +@dropdown-link-hover-bg: @dropdown-link-active-bg; + +// 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; + float: left; + display: none; // none by default, but block on "open" of the menu + min-width: 160px; + list-style: none; + background-color: @dropdown-bg; + 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-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:13px; + line-height: @line-height-base; + } + + &.dropdown-menu, &.datepicker-inline { + th, td { + padding: 0px 5px; + } + } +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build_standalone.less libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build_standalone.less --- libjs-twitter-bootstrap-datepicker-0.0.0.1/build/build_standalone.less 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/build/build_standalone.less 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,65 @@ +// 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-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:13px; + line-height: @baseLineHeight; + } + + &.dropdown-menu, &.datepicker-inline { + th, td { + padding: 4px 5px; + } + } +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/CHANGELOG.md libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/CHANGELOG.md --- libjs-twitter-bootstrap-datepicker-0.0.0.1/CHANGELOG.md 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/CHANGELOG.md 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,172 @@ +Changelog +========= + +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 http://bootstrap-datepicker.readthedocs.org/. The [gh-pages](http://eternicode.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](http://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](http://twitter.github.com/bower/) +* 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 diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/composer.json libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/composer.json --- libjs-twitter-bootstrap-datepicker-0.0.0.1/composer.json 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/composer.json 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,20 @@ +{ + "name": "eternicode/bootstrap-datepicker", + "type": "component", + "require": { + "robloach/component-installer": "*", + "components/bootstrap" : ">=3.0, <4.0", + "components/jquery": ">=1.7.1" + }, + "extra": { + "component": { + "scripts": [ + "js/bootstrap-datepicker.js" + ], + "styles": [ + "css/datepicker.css", + "css/datepicker3.css" + ] + } + } +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/CONTRIBUTING.md libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/CONTRIBUTING.md --- libjs-twitter-bootstrap-datepicker-0.0.0.1/CONTRIBUTING.md 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/CONTRIBUTING.md 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,41 @@ +# 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](http://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](http://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/eternicode/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 http://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 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! diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/css/datepicker3.css libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/css/datepicker3.css --- libjs-twitter-bootstrap-datepicker-0.0.0.1/css/datepicker3.css 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/css/datepicker3.css 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,792 @@ +/*! + * Datepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ +.datepicker { + padding: 4px; + border-radius: 4px; + direction: ltr; + /*.dow { + border-top: 1px solid #ddd !important; + }*/ +} +.datepicker-inline { + width: 220px; +} +.datepicker.datepicker-rtl { + direction: rtl; +} +.datepicker.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 #ccc; + 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-top:before { + top: -7px; +} +.datepicker-dropdown.datepicker-orient-top:after { + top: -6px; +} +.datepicker-dropdown.datepicker-orient-bottom:before { + bottom: -7px; + border-bottom: 0; + border-top: 7px solid #999; +} +.datepicker-dropdown.datepicker-orient-bottom:after { + bottom: -6px; + border-bottom: 0; + border-top: 6px solid #fff; +} +.datepicker > div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.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.day:hover, +.datepicker table tr td.day.focused { + background: #eeeeee; + cursor: pointer; +} +.datepicker table tr td.old, +.datepicker table tr td.new { + color: #999999; +} +.datepicker table tr td.disabled, +.datepicker table tr td.disabled:hover { + background: none; + color: #999999; + cursor: default; +} +.datepicker table tr td.today, +.datepicker table tr td.today:hover, +.datepicker table tr td.today.disabled, +.datepicker table tr td.today.disabled:hover { + color: #000000; + background-color: #ffdb99; + border-color: #ffb733; +} +.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:focus, +.datepicker table tr td.today:hover:focus, +.datepicker table tr td.today.disabled:focus, +.datepicker table tr td.today.disabled:hover:focus, +.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, +.open .dropdown-toggle.datepicker table tr td.today, +.open .dropdown-toggle.datepicker table tr td.today:hover, +.open .dropdown-toggle.datepicker table tr td.today.disabled, +.open .dropdown-toggle.datepicker table tr td.today.disabled:hover { + color: #000000; + background-color: #ffcd70; + border-color: #f59e00; +} +.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, +.open .dropdown-toggle.datepicker table tr td.today, +.open .dropdown-toggle.datepicker table tr td.today:hover, +.open .dropdown-toggle.datepicker table tr td.today.disabled, +.open .dropdown-toggle.datepicker table tr td.today.disabled:hover { + background-image: none; +} +.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], +fieldset[disabled] .datepicker table tr td.today, +fieldset[disabled] .datepicker table tr td.today:hover, +fieldset[disabled] .datepicker table tr td.today.disabled, +fieldset[disabled] .datepicker table tr td.today.disabled:hover, +.datepicker table tr td.today.disabled:hover, +.datepicker table tr td.today:hover.disabled:hover, +.datepicker table tr td.today.disabled.disabled:hover, +.datepicker table tr td.today.disabled:hover.disabled:hover, +.datepicker table tr td.today[disabled]:hover, +.datepicker table tr td.today:hover[disabled]:hover, +.datepicker table tr td.today.disabled[disabled]:hover, +.datepicker table tr td.today.disabled:hover[disabled]:hover, +fieldset[disabled] .datepicker table tr td.today:hover, +fieldset[disabled] .datepicker table tr td.today:hover:hover, +fieldset[disabled] .datepicker table tr td.today.disabled:hover, +fieldset[disabled] .datepicker table tr td.today.disabled:hover:hover, +.datepicker table tr td.today.disabled:focus, +.datepicker table tr td.today:hover.disabled:focus, +.datepicker table tr td.today.disabled.disabled:focus, +.datepicker table tr td.today.disabled:hover.disabled:focus, +.datepicker table tr td.today[disabled]:focus, +.datepicker table tr td.today:hover[disabled]:focus, +.datepicker table tr td.today.disabled[disabled]:focus, +.datepicker table tr td.today.disabled:hover[disabled]:focus, +fieldset[disabled] .datepicker table tr td.today:focus, +fieldset[disabled] .datepicker table tr td.today:hover:focus, +fieldset[disabled] .datepicker table tr td.today.disabled:focus, +fieldset[disabled] .datepicker table tr td.today.disabled:hover:focus, +.datepicker table tr td.today.disabled:active, +.datepicker table tr td.today:hover.disabled:active, +.datepicker table tr td.today.disabled.disabled:active, +.datepicker table tr td.today.disabled:hover.disabled:active, +.datepicker table tr td.today[disabled]:active, +.datepicker table tr td.today:hover[disabled]:active, +.datepicker table tr td.today.disabled[disabled]:active, +.datepicker table tr td.today.disabled:hover[disabled]:active, +fieldset[disabled] .datepicker table tr td.today:active, +fieldset[disabled] .datepicker table tr td.today:hover:active, +fieldset[disabled] .datepicker table tr td.today.disabled:active, +fieldset[disabled] .datepicker table tr td.today.disabled:hover:active, +.datepicker table tr td.today.disabled.active, +.datepicker table tr td.today:hover.disabled.active, +.datepicker table tr td.today.disabled.disabled.active, +.datepicker table tr td.today.disabled:hover.disabled.active, +.datepicker table tr td.today[disabled].active, +.datepicker table tr td.today:hover[disabled].active, +.datepicker table tr td.today.disabled[disabled].active, +.datepicker table tr td.today.disabled:hover[disabled].active, +fieldset[disabled] .datepicker table tr td.today.active, +fieldset[disabled] .datepicker table tr td.today:hover.active, +fieldset[disabled] .datepicker table tr td.today.disabled.active, +fieldset[disabled] .datepicker table tr td.today.disabled:hover.active { + background-color: #ffdb99; + border-color: #ffb733; +} +.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: #eeeeee; + 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 { + color: #000000; + background-color: #f7ca77; + border-color: #f1a417; + 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:focus, +.datepicker table tr td.range.today:hover:focus, +.datepicker table tr td.range.today.disabled:focus, +.datepicker table tr td.range.today.disabled:hover:focus, +.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, +.open .dropdown-toggle.datepicker table tr td.range.today, +.open .dropdown-toggle.datepicker table tr td.range.today:hover, +.open .dropdown-toggle.datepicker table tr td.range.today.disabled, +.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover { + color: #000000; + background-color: #f4bb51; + border-color: #bf800c; +} +.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, +.open .dropdown-toggle.datepicker table tr td.range.today, +.open .dropdown-toggle.datepicker table tr td.range.today:hover, +.open .dropdown-toggle.datepicker table tr td.range.today.disabled, +.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover { + background-image: none; +} +.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], +fieldset[disabled] .datepicker table tr td.range.today, +fieldset[disabled] .datepicker table tr td.range.today:hover, +fieldset[disabled] .datepicker table tr td.range.today.disabled, +fieldset[disabled] .datepicker table tr td.range.today.disabled:hover, +.datepicker table tr td.range.today.disabled:hover, +.datepicker table tr td.range.today:hover.disabled:hover, +.datepicker table tr td.range.today.disabled.disabled:hover, +.datepicker table tr td.range.today.disabled:hover.disabled:hover, +.datepicker table tr td.range.today[disabled]:hover, +.datepicker table tr td.range.today:hover[disabled]:hover, +.datepicker table tr td.range.today.disabled[disabled]:hover, +.datepicker table tr td.range.today.disabled:hover[disabled]:hover, +fieldset[disabled] .datepicker table tr td.range.today:hover, +fieldset[disabled] .datepicker table tr td.range.today:hover:hover, +fieldset[disabled] .datepicker table tr td.range.today.disabled:hover, +fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:hover, +.datepicker table tr td.range.today.disabled:focus, +.datepicker table tr td.range.today:hover.disabled:focus, +.datepicker table tr td.range.today.disabled.disabled:focus, +.datepicker table tr td.range.today.disabled:hover.disabled:focus, +.datepicker table tr td.range.today[disabled]:focus, +.datepicker table tr td.range.today:hover[disabled]:focus, +.datepicker table tr td.range.today.disabled[disabled]:focus, +.datepicker table tr td.range.today.disabled:hover[disabled]:focus, +fieldset[disabled] .datepicker table tr td.range.today:focus, +fieldset[disabled] .datepicker table tr td.range.today:hover:focus, +fieldset[disabled] .datepicker table tr td.range.today.disabled:focus, +fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:focus, +.datepicker table tr td.range.today.disabled:active, +.datepicker table tr td.range.today:hover.disabled:active, +.datepicker table tr td.range.today.disabled.disabled:active, +.datepicker table tr td.range.today.disabled:hover.disabled:active, +.datepicker table tr td.range.today[disabled]:active, +.datepicker table tr td.range.today:hover[disabled]:active, +.datepicker table tr td.range.today.disabled[disabled]:active, +.datepicker table tr td.range.today.disabled:hover[disabled]:active, +fieldset[disabled] .datepicker table tr td.range.today:active, +fieldset[disabled] .datepicker table tr td.range.today:hover:active, +fieldset[disabled] .datepicker table tr td.range.today.disabled:active, +fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:active, +.datepicker table tr td.range.today.disabled.active, +.datepicker table tr td.range.today:hover.disabled.active, +.datepicker table tr td.range.today.disabled.disabled.active, +.datepicker table tr td.range.today.disabled:hover.disabled.active, +.datepicker table tr td.range.today[disabled].active, +.datepicker table tr td.range.today:hover[disabled].active, +.datepicker table tr td.range.today.disabled[disabled].active, +.datepicker table tr td.range.today.disabled:hover[disabled].active, +fieldset[disabled] .datepicker table tr td.range.today.active, +fieldset[disabled] .datepicker table tr td.range.today:hover.active, +fieldset[disabled] .datepicker table tr td.range.today.disabled.active, +fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active { + background-color: #f7ca77; + border-color: #f1a417; +} +.datepicker table tr td.selected, +.datepicker table tr td.selected:hover, +.datepicker table tr td.selected.disabled, +.datepicker table tr td.selected.disabled:hover { + color: #ffffff; + background-color: #999999; + border-color: #555555; + 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:focus, +.datepicker table tr td.selected:hover:focus, +.datepicker table tr td.selected.disabled:focus, +.datepicker table tr td.selected.disabled:hover:focus, +.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, +.open .dropdown-toggle.datepicker table tr td.selected, +.open .dropdown-toggle.datepicker table tr td.selected:hover, +.open .dropdown-toggle.datepicker table tr td.selected.disabled, +.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover { + color: #ffffff; + background-color: #858585; + border-color: #373737; +} +.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, +.open .dropdown-toggle.datepicker table tr td.selected, +.open .dropdown-toggle.datepicker table tr td.selected:hover, +.open .dropdown-toggle.datepicker table tr td.selected.disabled, +.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover { + background-image: none; +} +.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], +fieldset[disabled] .datepicker table tr td.selected, +fieldset[disabled] .datepicker table tr td.selected:hover, +fieldset[disabled] .datepicker table tr td.selected.disabled, +fieldset[disabled] .datepicker table tr td.selected.disabled:hover, +.datepicker table tr td.selected.disabled:hover, +.datepicker table tr td.selected:hover.disabled:hover, +.datepicker table tr td.selected.disabled.disabled:hover, +.datepicker table tr td.selected.disabled:hover.disabled:hover, +.datepicker table tr td.selected[disabled]:hover, +.datepicker table tr td.selected:hover[disabled]:hover, +.datepicker table tr td.selected.disabled[disabled]:hover, +.datepicker table tr td.selected.disabled:hover[disabled]:hover, +fieldset[disabled] .datepicker table tr td.selected:hover, +fieldset[disabled] .datepicker table tr td.selected:hover:hover, +fieldset[disabled] .datepicker table tr td.selected.disabled:hover, +fieldset[disabled] .datepicker table tr td.selected.disabled:hover:hover, +.datepicker table tr td.selected.disabled:focus, +.datepicker table tr td.selected:hover.disabled:focus, +.datepicker table tr td.selected.disabled.disabled:focus, +.datepicker table tr td.selected.disabled:hover.disabled:focus, +.datepicker table tr td.selected[disabled]:focus, +.datepicker table tr td.selected:hover[disabled]:focus, +.datepicker table tr td.selected.disabled[disabled]:focus, +.datepicker table tr td.selected.disabled:hover[disabled]:focus, +fieldset[disabled] .datepicker table tr td.selected:focus, +fieldset[disabled] .datepicker table tr td.selected:hover:focus, +fieldset[disabled] .datepicker table tr td.selected.disabled:focus, +fieldset[disabled] .datepicker table tr td.selected.disabled:hover:focus, +.datepicker table tr td.selected.disabled:active, +.datepicker table tr td.selected:hover.disabled:active, +.datepicker table tr td.selected.disabled.disabled:active, +.datepicker table tr td.selected.disabled:hover.disabled:active, +.datepicker table tr td.selected[disabled]:active, +.datepicker table tr td.selected:hover[disabled]:active, +.datepicker table tr td.selected.disabled[disabled]:active, +.datepicker table tr td.selected.disabled:hover[disabled]:active, +fieldset[disabled] .datepicker table tr td.selected:active, +fieldset[disabled] .datepicker table tr td.selected:hover:active, +fieldset[disabled] .datepicker table tr td.selected.disabled:active, +fieldset[disabled] .datepicker table tr td.selected.disabled:hover:active, +.datepicker table tr td.selected.disabled.active, +.datepicker table tr td.selected:hover.disabled.active, +.datepicker table tr td.selected.disabled.disabled.active, +.datepicker table tr td.selected.disabled:hover.disabled.active, +.datepicker table tr td.selected[disabled].active, +.datepicker table tr td.selected:hover[disabled].active, +.datepicker table tr td.selected.disabled[disabled].active, +.datepicker table tr td.selected.disabled:hover[disabled].active, +fieldset[disabled] .datepicker table tr td.selected.active, +fieldset[disabled] .datepicker table tr td.selected:hover.active, +fieldset[disabled] .datepicker table tr td.selected.disabled.active, +fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active { + background-color: #999999; + border-color: #555555; +} +.datepicker table tr td.active, +.datepicker table tr td.active:hover, +.datepicker table tr td.active.disabled, +.datepicker table tr td.active.disabled:hover { + color: #ffffff; + background-color: #428bca; + border-color: #357ebd; + 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:focus, +.datepicker table tr td.active:hover:focus, +.datepicker table tr td.active.disabled:focus, +.datepicker table tr td.active.disabled:hover:focus, +.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, +.open .dropdown-toggle.datepicker table tr td.active, +.open .dropdown-toggle.datepicker table tr td.active:hover, +.open .dropdown-toggle.datepicker table tr td.active.disabled, +.open .dropdown-toggle.datepicker table tr td.active.disabled:hover { + color: #ffffff; + background-color: #3276b1; + border-color: #285e8e; +} +.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, +.open .dropdown-toggle.datepicker table tr td.active, +.open .dropdown-toggle.datepicker table tr td.active:hover, +.open .dropdown-toggle.datepicker table tr td.active.disabled, +.open .dropdown-toggle.datepicker table tr td.active.disabled:hover { + background-image: none; +} +.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], +fieldset[disabled] .datepicker table tr td.active, +fieldset[disabled] .datepicker table tr td.active:hover, +fieldset[disabled] .datepicker table tr td.active.disabled, +fieldset[disabled] .datepicker table tr td.active.disabled:hover, +.datepicker table tr td.active.disabled:hover, +.datepicker table tr td.active:hover.disabled:hover, +.datepicker table tr td.active.disabled.disabled:hover, +.datepicker table tr td.active.disabled:hover.disabled:hover, +.datepicker table tr td.active[disabled]:hover, +.datepicker table tr td.active:hover[disabled]:hover, +.datepicker table tr td.active.disabled[disabled]:hover, +.datepicker table tr td.active.disabled:hover[disabled]:hover, +fieldset[disabled] .datepicker table tr td.active:hover, +fieldset[disabled] .datepicker table tr td.active:hover:hover, +fieldset[disabled] .datepicker table tr td.active.disabled:hover, +fieldset[disabled] .datepicker table tr td.active.disabled:hover:hover, +.datepicker table tr td.active.disabled:focus, +.datepicker table tr td.active:hover.disabled:focus, +.datepicker table tr td.active.disabled.disabled:focus, +.datepicker table tr td.active.disabled:hover.disabled:focus, +.datepicker table tr td.active[disabled]:focus, +.datepicker table tr td.active:hover[disabled]:focus, +.datepicker table tr td.active.disabled[disabled]:focus, +.datepicker table tr td.active.disabled:hover[disabled]:focus, +fieldset[disabled] .datepicker table tr td.active:focus, +fieldset[disabled] .datepicker table tr td.active:hover:focus, +fieldset[disabled] .datepicker table tr td.active.disabled:focus, +fieldset[disabled] .datepicker table tr td.active.disabled:hover:focus, +.datepicker table tr td.active.disabled:active, +.datepicker table tr td.active:hover.disabled:active, +.datepicker table tr td.active.disabled.disabled:active, +.datepicker table tr td.active.disabled:hover.disabled:active, +.datepicker table tr td.active[disabled]:active, +.datepicker table tr td.active:hover[disabled]:active, +.datepicker table tr td.active.disabled[disabled]:active, +.datepicker table tr td.active.disabled:hover[disabled]:active, +fieldset[disabled] .datepicker table tr td.active:active, +fieldset[disabled] .datepicker table tr td.active:hover:active, +fieldset[disabled] .datepicker table tr td.active.disabled:active, +fieldset[disabled] .datepicker table tr td.active.disabled:hover:active, +.datepicker table tr td.active.disabled.active, +.datepicker table tr td.active:hover.disabled.active, +.datepicker table tr td.active.disabled.disabled.active, +.datepicker table tr td.active.disabled:hover.disabled.active, +.datepicker table tr td.active[disabled].active, +.datepicker table tr td.active:hover[disabled].active, +.datepicker table tr td.active.disabled[disabled].active, +.datepicker table tr td.active.disabled:hover[disabled].active, +fieldset[disabled] .datepicker table tr td.active.active, +fieldset[disabled] .datepicker table tr td.active:hover.active, +fieldset[disabled] .datepicker table tr td.active.disabled.active, +fieldset[disabled] .datepicker table tr td.active.disabled:hover.active { + background-color: #428bca; + border-color: #357ebd; +} +.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 { + background: #eeeeee; +} +.datepicker table tr td span.disabled, +.datepicker table tr td span.disabled:hover { + background: none; + color: #999999; + 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: #ffffff; + background-color: #428bca; + border-color: #357ebd; + 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: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: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, +.open .dropdown-toggle.datepicker table tr td span.active, +.open .dropdown-toggle.datepicker table tr td span.active:hover, +.open .dropdown-toggle.datepicker table tr td span.active.disabled, +.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover { + color: #ffffff; + background-color: #3276b1; + border-color: #285e8e; +} +.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, +.open .dropdown-toggle.datepicker table tr td span.active, +.open .dropdown-toggle.datepicker table tr td span.active:hover, +.open .dropdown-toggle.datepicker table tr td span.active.disabled, +.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover { + background-image: none; +} +.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], +fieldset[disabled] .datepicker table tr td span.active, +fieldset[disabled] .datepicker table tr td span.active:hover, +fieldset[disabled] .datepicker table tr td span.active.disabled, +fieldset[disabled] .datepicker table tr td span.active.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, +.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:active, +.datepicker table tr td span.active:hover.disabled:active, +.datepicker table tr td span.active.disabled.disabled:active, +.datepicker table tr td span.active.disabled:hover.disabled:active, +.datepicker table tr td span.active[disabled]:active, +.datepicker table tr td span.active:hover[disabled]:active, +.datepicker table tr td span.active.disabled[disabled]:active, +.datepicker table tr td span.active.disabled:hover[disabled]:active, +fieldset[disabled] .datepicker table tr td span.active:active, +fieldset[disabled] .datepicker table tr td span.active:hover:active, +fieldset[disabled] .datepicker table tr td span.active.disabled:active, +fieldset[disabled] .datepicker table tr td span.active.disabled:hover:active, +.datepicker table tr td span.active.disabled.active, +.datepicker table tr td span.active:hover.disabled.active, +.datepicker table tr td span.active.disabled.disabled.active, +.datepicker table tr td span.active.disabled:hover.disabled.active, +.datepicker table tr td span.active[disabled].active, +.datepicker table tr td span.active:hover[disabled].active, +.datepicker table tr td span.active.disabled[disabled].active, +.datepicker table tr td span.active.disabled:hover[disabled].active, +fieldset[disabled] .datepicker table tr td span.active.active, +fieldset[disabled] .datepicker table tr td span.active:hover.active, +fieldset[disabled] .datepicker table tr td span.active.disabled.active, +fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active { + background-color: #428bca; + border-color: #357ebd; +} +.datepicker table tr td span.old, +.datepicker table tr td span.new { + color: #999999; +} +.datepicker th.datepicker-switch { + width: 145px; +} +.datepicker thead tr:first-child th, +.datepicker tfoot tr th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover, +.datepicker tfoot tr th:hover { + background: #eeeeee; +} +.datepicker .cw { + font-size: 10px; + width: 12px; + padding: 0 2px 0 5px; + vertical-align: middle; +} +.datepicker thead tr:first-child th.cw { + cursor: default; + background-color: transparent; +} +.input-group.date .input-group-addon i { + cursor: pointer; + width: 16px; + height: 16px; +} +.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; + font-weight: normal; + line-height: 1.428571429; + text-align: center; + text-shadow: 0 1px 0 #fff; + vertical-align: middle; + background-color: #eeeeee; + border: solid #cccccc; + border-width: 1px 0; + 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: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + 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-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + line-height: 1.428571429; +} +.datepicker.dropdown-menu th, +.datepicker.datepicker-inline th, +.datepicker.dropdown-menu td, +.datepicker.datepicker-inline td { + padding: 0px 5px; +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/css/datepicker.css libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/css/datepicker.css --- libjs-twitter-bootstrap-datepicker-0.0.0.1/css/datepicker.css 2013-02-17 02:59:52.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/css/datepicker.css 2014-10-06 13:52:38.000000000 +0000 @@ -2,50 +2,101 @@ * Datepicker for Bootstrap * * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * */ .datepicker { - top: 0; - left: 0; padding: 4px; - margin-top: 1px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; + direction: ltr; /*.dow { - border-top: 1px solid #ddd !important; - }*/ - + border-top: 1px solid #ddd !important; + }*/ +} +.datepicker-inline { + width: 220px; +} +.datepicker.datepicker-rtl { + direction: rtl; +} +.datepicker.datepicker-rtl table tr td span { + float: right; +} +.datepicker-dropdown { + top: 0; + left: 0; } -.datepicker:before { +.datepicker-dropdown:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; + border-top: 0; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; - top: -7px; - left: 6px; } -.datepicker:after { +.datepicker-dropdown:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; + border-top: 0; position: absolute; - top: -6px; +} +.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-top:before { + top: -7px; +} +.datepicker-dropdown.datepicker-orient-top:after { + top: -6px; +} +.datepicker-dropdown.datepicker-orient-bottom:before { + bottom: -7px; + border-bottom: 0; + border-top: 7px solid #999; +} +.datepicker-dropdown.datepicker-orient-bottom:after { + bottom: -6px; + border-bottom: 0; + border-top: 6px solid #ffffff; +} .datepicker > div { display: none; } +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} .datepicker table { - width: 100%; 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 { @@ -55,128 +106,409 @@ -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 td.day:hover { +.datepicker table tr td.day:hover, +.datepicker table tr td.day.focused { background: #eeeeee; cursor: pointer; } -.datepicker td.day.disabled { - color: #eeeeee; +.datepicker table tr td.old, +.datepicker table tr td.new { + color: #999999; } -.datepicker td.old, -.datepicker td.new { +.datepicker table tr td.disabled, +.datepicker table tr td.disabled:hover { + background: none; color: #999999; + cursor: default; +} +.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(top, #fdd49a, #fdf59a); + background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); + background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -o-linear-gradient(top, #fdd49a, #fdf59a); + background-image: linear-gradient(top, #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: #eeeeee; + -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(top, #f3c17a, #f3e97a); + background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a)); + background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -o-linear-gradient(top, #f3c17a, #f3e97a); + background-image: linear-gradient(top, #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(top, #b3b3b3, #808080); + background-image: -ms-linear-gradient(top, #b3b3b3, #808080); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080)); + background-image: -webkit-linear-gradient(top, #b3b3b3, #808080); + background-image: -o-linear-gradient(top, #b3b3b3, #808080); + background-image: linear-gradient(top, #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 td.active, -.datepicker td.active:hover { - color: #ffffff; +.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(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', 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); - *background-color: #0044cc; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } -.datepicker td.active:hover, -.datepicker td.active:hover:hover, -.datepicker td.active:focus, -.datepicker td.active:hover:focus, -.datepicker td.active:active, -.datepicker td.active:hover:active, -.datepicker td.active.active, -.datepicker td.active:hover.active, -.datepicker td.active.disabled, -.datepicker td.active:hover.disabled, -.datepicker td.active[disabled], -.datepicker td.active:hover[disabled] { - color: #ffffff; +.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; - *background-color: #003bb3; } -.datepicker td.active:active, -.datepicker td.active:hover:active, -.datepicker td.active.active, -.datepicker td.active: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.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 td span { +.datepicker table tr td span { display: block; - width: 47px; + width: 23%; height: 54px; line-height: 54px; float: left; - margin: 2px; + margin: 1%; cursor: pointer; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } -.datepicker td span:hover { +.datepicker table tr td span:hover { background: #eeeeee; } -.datepicker td span.active { - color: #ffffff; +.datepicker table tr td span.disabled, +.datepicker table tr td span.disabled:hover { + background: none; + color: #999999; + 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(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', 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); - *background-color: #0044cc; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } -.datepicker td span.active:hover, -.datepicker td span.active:focus, -.datepicker td span.active:active, -.datepicker td span.active.active, -.datepicker td span.active.disabled, -.datepicker td span.active[disabled] { - color: #ffffff; +.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; - *background-color: #003bb3; } -.datepicker td span.active:active, -.datepicker td span.active.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.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 td span.old { +.datepicker table tr td span.old, +.datepicker table tr td span.new { color: #999999; } -.datepicker th.switch { +.datepicker th.datepicker-switch { width: 145px; } -.datepicker th.next, -.datepicker th.prev { - font-size: 21px; -} -.datepicker thead tr:first-child th { +.datepicker thead tr:first-child th, +.datepicker tfoot tr th { cursor: pointer; } -.datepicker thead tr:first-child th:hover { +.datepicker thead tr:first-child th:hover, +.datepicker tfoot tr th:hover { background: #eeeeee; } +.datepicker .cw { + font-size: 10px; + width: 12px; + padding: 0 2px 0 5px; + vertical-align: middle; +} +.datepicker thead tr:first-child th.cw { + cursor: default; + background-color: transparent; +} .input-append.date .add-on i, .input-prepend.date .add-on i { - display: block; cursor: pointer; width: 16px; height: 16px; -} \ No newline at end of file +} +.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 #ffffff; + vertical-align: middle; + background-color: #eeeeee; + 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: #ffffff; + 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-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + 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; +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/changelog libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/changelog --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/changelog 2014-07-10 15:52:48.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/changelog 2014-10-06 13:57:47.000000000 +0000 @@ -1,3 +1,12 @@ +libjs-twitter-bootstrap-datepicker (1.3.1+dfsg1-1) unstable; urgency=medium + + * New upstream release: + - Using the fork from https://github.com/eternicode/bootstrap-datepicker + * Standards-Version is now 3.9.6 (no change). + * Added a watch file. + + -- Thomas Goirand Mon, 06 Oct 2014 15:13:46 +0800 + libjs-twitter-bootstrap-datepicker (0.0.0.1-1) unstable; urgency=medium * Initial release (Closes: #754394). diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/control libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/control --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/control 2014-07-10 15:52:48.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/control 2014-10-06 13:57:47.000000000 +0000 @@ -4,8 +4,8 @@ Maintainer: Debian Javascript Maintainers Uploaders: Thomas Goirand Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.5 -Homepage: http://www.eyecon.ro/bootstrap-datepicker/ +Standards-Version: 3.9.6 +Homepage: https://github.com/n9/bootstrap-datepicker Vcs-Git: git://anonscm.debian.org/pkg-javascript/libjs-twitter-bootstrap-datepicker.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-javascript/libjs-twitter-bootstrap-datepicker.git;a=summary diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/copyright libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/copyright --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/copyright 2014-07-10 15:52:48.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/copyright 2014-10-06 13:57:47.000000000 +0000 @@ -1,6 +1,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bootstrap-datepicker.js -Source: http://www.eyecon.ro/bootstrap-datepicker/ +Source: git://github.com/n9/bootstrap-datepicker.git Files: debian/* Copyright: (c) 2014, Thomas Goirand diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/gbp.conf libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/gbp.conf --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/gbp.conf 2014-07-10 15:52:48.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/gbp.conf 2014-10-06 13:57:47.000000000 +0000 @@ -1,10 +1,8 @@ [DEFAULT] -upstream-branch = upstream-unstable -debian-branch = debian-unstable -pristine-tar = True +upstream-branch = master-dfsg +debian-branch = debian/unstable +upstream-tag = %(version)s +compression = xz [git-buildpackage] export-dir = ../build-area/ - -[git-import-orig] -dch = False diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/install libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/install --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/install 2014-07-10 15:52:48.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/install 2014-10-06 13:57:47.000000000 +0000 @@ -1,3 +1,5 @@ js/bootstrap-datepicker.js /usr/share/twitter-bootstrap/files/js +js/locales /usr/share/twitter-bootstrap/files/js css/datepicker.css /usr/share/twitter-bootstrap/files/css +css/datepicker3.css /usr/share/twitter-bootstrap/files/css less/datepicker.less /usr/share/twitter-bootstrap/files/less diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/rules libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/rules --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/rules 2014-07-10 15:52:48.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/rules 2014-10-06 13:57:47.000000000 +0000 @@ -1,5 +1,8 @@ #!/usr/bin/make -f +UPSTREAM_GIT = git://github.com/n9/bootstrap-datepicker.git +-include /usr/share/openstack-pkg-tools/pkgos.make + %: dh $@ diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/watch libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/watch --- libjs-twitter-bootstrap-datepicker-0.0.0.1/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/debian/watch 2014-10-06 13:57:47.000000000 +0000 @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\+dfsg\d+$// \ +https://github.com/n9/bootstrap-datepicker/tags .*/(\d[\d\.]+)\.tar\.gz diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/conf.py libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/conf.py --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/conf.py 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/conf.py 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,248 @@ +# -*- 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 = '' + + + +# 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'2013, 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',] + +# 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' diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/events.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/events.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/events.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/events.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,48 @@ +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. + + +changeYear +---------- + +Fired when the *view* year is changed from decade view. + +changeMonth +----------- + +Fired when the *view* month is changed from year view. diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/i18n.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/i18n.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/i18n.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/i18n.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,31 @@ +I18N +==== + +The plugin supports i18n for the month and weekday names and the ``weekStart`` option. The default is English ("en"); other available translations are avilable 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", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + 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" + }; + +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 diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/index.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/index.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/index.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,122 @@ +bootstrap-datepicker +==================== + +Bootstrap-datepicker provides a flexible datepicker widget in the Twitter bootstrap style. + +.. figure:: _static/screenshots/demo_head.png + :align: center + +This is a fork of Stefan Petre's `original code `_; thanks go to him for getting this thing started! + +Please note that this fork is not used on Stefan's page at this time, nor is it maintained or contributed to by him. + +Versions are incremented according to `semver `_. + +`Online Demo `_ + + +Requirements +------------ + +* `Bootstrap`_ 2.0.4+ +* `jQuery`_ 1.7.1+ + +.. _Bootstrap: http://twitter.github.com/bootstrap/ +.. _jQuery: http://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 + + + +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' + }) + + +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 + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/keyboard.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/keyboard.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/keyboard.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/keyboard.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,27 @@ +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. diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/make.bat libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/make.bat --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/make.bat 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/make.bat 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,190 @@ +@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 diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/Makefile libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/Makefile --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/Makefile 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,153 @@ +# 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." diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/markup.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/markup.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/markup.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/markup.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,87 @@ +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-append`` or ``input-prepend`` bootstrap component will allow the ``add-on`` elements to trigger the picker. + +.. code-block:: html + +
+ + +
+ +.. figure:: _static/screenshots/markup_component.png + :align: center + +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 + +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 + + +inline or embedded date-range +----------------------------- + +Instantiating the datepicker is almost the same as a date range, but you'll need to set the ``inputs`` manually + +.. code-block:: html + +
+
+
+
+ +.. code-block:: javascript + + // Instantiate + $('.range').datepicker({ + inputs: $('.range-start, .range-end') + }); + + // Manipulate dates + $('.range-start').datepicker('update', new Date(2013,1,1)); + $('.range-end').datepicker('update', new Date(2013,5,1)); + + // Update the range (you have to fire this manually) + $('.range').datepicker('updateDates'); diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/methods.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/methods.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/methods.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/methods.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,164 @@ +Methods +======= + +Methods are called on a datepicker by call the ``datepicker`` function with a string first argument, followed by any arguments the method takes:: + + $('.datepicker').datepicker('method', arg1, arg2); + + +remove +------ + +Arguments: None + +Remove the datepicker. Removes attached events, internal attached objects, and added HTML elements. + + +show +---- + +Arguments: None + +Show the picker. + + +hide +---- + +Arguments: None + +Hide the picker. + + +update +------ + +Arguments: + +* date (String|Date, optional) + +Update the datepicker with given argument or the current input value. + +If ``date`` is provided and is a Date object, it is assumed to be a "local" date object, and will be converted to UTC for internal use. + +:: + + $('.datepicker').datepicker('update'); + $('.datepicker').datepicker('update', '2011-03-05'); + $('.datepicker').datepicker('update', new Date(2011, 2, 5)); + + +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 mbe a "local" date object, and will be converted to UTC for internal use. For use with multidate pickers. + + +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. + + +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. + + +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. diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/options.rst libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/options.rst --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/options.rst 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/options.rst 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,219 @@ +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). + +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``. + + +autoclose +--------- + +Boolean. Default: false + +Whether or not to close the datepicker immediately when a date is selected. + + +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 + + +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 + + +.. _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: ``'0,6'`` or ``[0,6]``. + +.. figure:: _static/screenshots/option_daysofweekdisabled.png + :align: center + + +.. _enddate: + +endDate +------- + +Date. Default: End of time + +The latest date that may be selected; all later dates will be disabled. + +.. figure:: _static/screenshots/option_enddate.png + :align: center + + +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. + + +inputs +------ + +Array. 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. + + +keyboardNavigation +------------------ + +Boolean. Default: true + +Whether or not to allow date navigation by arrow keys. + + +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 + + +minViewMode +----------- + +Number, String. Default: 0, "days" + +Set a limit for the view mode. Accepts: "days" or 0, "months" or 1, and "years" or 2. +Gives the ability to pick only a month or an year. The day is set to the 1st for "months", and the month is set to January for "years". + +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``. + +.. 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. + +.. _startdate: + +startDate +--------- + +Date. Default: Beginning of time + +The earliest date that may be selected; all earlier dates will be disabled. + +.. figure:: _static/screenshots/option_startdate.png + :align: center + + +startView +--------- + +Number, String. Default: 0, "month" + +The view that the datepicker should show when it is opened. Accepts values of 0 or "month" for month view (the default), 1 or "year" for the 12-month overview, and 2 or "decade" for the 10-year overview. Useful for date-of-birth datepickers. + + +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 + + +weekStart +--------- + +Integer. Default: 0 + +Day of the week start. 0 (Sunday) to 6 (Saturday) + +.. figure:: _static/screenshots/option_weekstart.png + :align: center diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/REAME.md libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/REAME.md --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/REAME.md 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/REAME.md 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,8 @@ +Documentation +============= + +Project documentation is built using [Sphinx docs](http://sphinx-doc.org/), which uses [ReST](http://docutils.sf.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 `make html`; 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 http://bootstrap-datepicker.readthedocs.org/. diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/demo_head.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/demo_head.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/demo_head.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/demo_head.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + + + +
+ +
+
+ + +
+
+
+
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_component.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_component.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_component.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_component.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + + + + +
+ + +
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_daterange.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_daterange.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_daterange.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_daterange.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + +
+
+ + to + +
+
+ + to + +
+
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_inline.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_inline.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_inline.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_inline.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,15 @@ + + + + + + + + +
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_input.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_input.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/markup_input.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/markup_input.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,17 @@ + + + + + + + + + + + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_calendarweeks.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_calendarweeks.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_calendarweeks.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_calendarweeks.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,23 @@ + + + + + + + + +
+ +
+
+ +
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_clearbtn.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_clearbtn.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_clearbtn.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_clearbtn.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + + + + + + + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_daysofweekdisabled.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_daysofweekdisabled.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_daysofweekdisabled.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_daysofweekdisabled.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + + + + + + + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_enddate.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_enddate.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_enddate.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_enddate.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + + + + + + + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_language.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_language.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_language.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_language.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_multidate.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_multidate.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_multidate.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_multidate.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_startdate.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_startdate.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_startdate.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_startdate.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + + + + + + + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_todaybtn.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_todaybtn.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_todaybtn.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_todaybtn.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,17 @@ + + + + + + + + + + + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_todayhighlight.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_todayhighlight.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_todayhighlight.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_todayhighlight.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,45 @@ + + + + + + + + +
+ +
+
+ +
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_weekstart.html libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_weekstart.html --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/option_weekstart.html 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/option_weekstart.html 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,23 @@ + + + + + + + + +
+ +
+
+ +
+
+ +
+ + diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/common.css libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/common.css --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/common.css 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/common.css 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,9 @@ +@import url('http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css'); +@import url('../../../css/datepicker.css'); + +body { + /* Padding around all elements to allow space for screenshots */ + padding: 10px; + /* Transparent background for PNG screenshots */ + background: none; +} diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/common.js libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/common.js --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/common.js 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/common.js 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,2 @@ +document.write(""); +document.write(""); diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/debug.js libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/debug.js --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/debug.js 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/debug.js 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,21 @@ +/* + Usage: $ phantomjs --remote-debugger-port=9001 --remote-debugger-autorun=yes debug.js page.html + + Open Chrome tab to http://localhost:9001/; open second link (ie, path to page.html) +*/ +var system = require('system' ), fs = require('fs'), webpage = require('webpage'); + +(function(phantom){ + var page=webpage.create(); + + function debugPage(){ + console.log("Refresh a second debugger-port page and open a second webkit inspector for the target page."); + console.log("Letting this page continue will then trigger a break in the target page."); + debugger; // pause here in first web browser tab for steps 5 & 6 + page.open(system.args[1]); + page.evaluateAsync(function() { + debugger; // step 7 will wait here in the second web browser tab + }); + } + debugPage(); +}(phantom)); diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/html-imports.min.js libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/html-imports.min.js --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/html-imports.min.js 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/html-imports.min.js 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,30 @@ +// Copyright (c) 2012 The Polymer Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +window.HTMLImports=window.HTMLImports||{flags:{}},function(a){var b=(a.path,a.xhr),c=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};c.prototype={addNodes:function(a){this.inflight+=a.length,d(a,this.require,this),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){return this.pending[a]?(this.pending[a].push(b),!0):this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,c){var d=function(b,d){this.receive(a,c,b,d)}.bind(this);b.load(a,d)},receive:function(a,b,c,d){c||(this.cache[a]=d),this.pending[a].forEach(function(b){c||this.onload(a,b,d),this.tail()},this),this.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},b=b||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(){4===f.readyState&&d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}};var d=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.xhr=b,a.Loader=c}(window.HTMLImports),function(a){function b(a){return c(a,j)}function c(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function d(a){return"script"===a.localName}function e(a,b){var c=a;c instanceof Document||(c=document.implementation.createHTMLDocument(j)),c._URL=b;var d=c.createElement("base");return d.setAttribute("href",b),c.baseURI||(c.baseURI=b),c.head.appendChild(d),a instanceof Document||(c.body.innerHTML=a),window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}function f(a,b){function c(){k==l&&requestAnimationFrame(a)}function d(){k++,c()}b=b||o;var e=HTMLImports.isIE?"complete":"interactive",h="complete"===b.readyState||b.readyState===e;if(!h){var i=function(){("complete"===b.readyState||b.readyState===e)&&(b.removeEventListener("readystatechange",i),f(a,b))};return void b.addEventListener("readystatechange",i)}var j=b.querySelectorAll("link[rel=import]"),k=0,l=j.length;if(l)for(var m,n=0;l>n&&(m=j[n]);n++)g(m)?d.call(m):(m.addEventListener("load",d),m.addEventListener("error",d));else c()}function g(a){return i?a.import&&"loading"!==a.import.readyState:a.__importParsed}var h="import"in document.createElement("link"),i=!a.flags.imports&&h,j="import";if(!i){{var k,l=a.Loader,m=(a.xhr,"stylesheet"),n={documents:{},cache:{},preloadSelectors:["link[rel="+j+"]","template","script[src]:not([type])",'script[src][type="text/javascript"]'].join(","),loader:function(a){if(k&&k.inflight){var b=k.oncomplete;return k.oncomplete=function(){b(),a()},k}return k=new l(n.loaded,a),k.cache=n.cache,k},load:function(a,b){k=n.loader(b),n.preload(a)},preload:function(a){var b=this.marshalNodes(a);k.addNodes(b)},marshalNodes:function(a){var b=a.querySelectorAll(n.preloadSelectors);return b=this.filterMainDocumentNodes(a,b),b=this.extractTemplateNodes(b)},filterMainDocumentNodes:function(a,b){return a===document&&(b=Array.prototype.filter.call(b,function(a){return!d(a)})),b},extractTemplateNodes:function(a){var b=[];return a=Array.prototype.filter.call(a,function(a){if("template"===a.localName){if(a.content){var c=a.content.querySelectorAll("link[rel="+m+"]");c.length&&(b=b.concat(Array.prototype.slice.call(c,0)))}return!1}return!0}),b.length&&(a=a.concat(b)),a},loaded:function(a,c,d){if(b(c)){var f=n.documents[a];f||(f=e(d,a),n.documents[a]=f,n.preload(f)),c.import=c.content=d=f}c.__resource=d}};Array.prototype.forEach.call.bind(Array.prototype.forEach)}a.importer=n}var o=window.ShadowDOMPolyfill?wrap(document):document;Object.defineProperty(o,"_currentScript",{get:function(){return HTMLImports.currentScript||o.currentScript},writeable:!0,configurable:!0}),a.hasNative=h,a.useNative=i,a.whenImportsReady=f,a.IMPORT_LINK_TYPE=j,a.isImportLoaded=g}(window.HTMLImports),function(a){function b(a){var b=a.ownerDocument.createElement("style");return b.textContent=a.textContent,g.resolveUrlsInStyle(b),b}function c(a,b){this.doc=a,this.doc.__loadTracker=this,this.callback=b}function d(a){return"link"===a.localName&&a.getAttribute("rel")===h}function e(a){return a.parentNode&&!f(a)}function f(a){return a.ownerDocument===document||a.ownerDocument.impl===document}var g=a.path,h="import",i=/Trident/.test(navigator.userAgent),j={selectors:["link[rel="+h+"]","link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'],map:{link:"parseLink",script:"parseScript",style:"parseStyle"},parse:function(a,b){if(a.__importParsed)b&&b();else{a.__importParsed=!0;for(var d,e=new c(a,b),f=a.querySelectorAll(j.selectors),g=a.scripts?a.scripts.length:0,h=0;hg&&(e=f[g]);g++)a.addEventListener(e,c)},receive:function(){this.pending--,this.checkDone()},checkDone:function(){this.isOpen&&this.pending<=0&&this.callback&&(this.isOpen=!1,this.callback())}};Array.prototype.forEach.call.bind(Array.prototype.forEach);a.parser=j,a.path=g,a.isIE=i}(HTMLImports),function(){function a(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime(),c.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))}function b(){HTMLImports.useNative||HTMLImports.importer.load(c,function(){HTMLImports.parser.parse(c)})}"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a,b){var c=document.createEvent("HTMLEvents");return c.initEvent(a,b.bubbles===!1?!1:!0,b.cancelable===!1?!1:!0,b.detail),c});var c=window.ShadowDOMPolyfill?window.ShadowDOMPolyfill.wrapIfNeeded(document):document;HTMLImports.useNative||("complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?b():document.addEventListener("DOMContentLoaded",b)),HTMLImports.whenImportsReady(function(){a()})}(); +//# sourceMappingURL=html-imports.min.map \ No newline at end of file diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/screenshot.js libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/screenshot.js --- libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_screenshots/script/screenshot.js 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_screenshots/script/screenshot.js 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,69 @@ +/* jshint phantom:true, devel:true */ +/* Usage: phantomjs screenshot.js in.html out.png */ + +var sys = require('system'), + page = new WebPage(); +page.viewportSize = { + width: 800, + height: 600 +}; + +page.open(sys.args[1], function(status){ + if (status !== 'success'){ + console.log('Bad status: %s', status); + phantom.exit(1); + } + window.setTimeout(function(){ + var box = page.evaluate(function(){ + var lefts, rights, tops, bottoms, + padding = 10, // px + selection, show; + + // Call setup method + if (window.setup) + window.setup(); + // Show all pickers, or only those marked for showing + show = $('body').data('show'); + show = show ? $(show) : $('*'); + show + .filter(function(){ + return 'datepicker' in $(this).data(); + }) + .datepicker('show'); + + // Get bounds of selected elements + selection = $($('body').data('capture')); + tops = selection.map(function(){ + return $(this).offset().top; + }).toArray(); + lefts = selection.map(function(){ + return $(this).offset().left; + }).toArray(); + bottoms = selection.map(function(){ + return $(this).offset().top + $(this).outerHeight(); + }).toArray(); + rights = selection.map(function(){ + return $(this).offset().left + $(this).outerWidth(); + }).toArray(); + + // Convert bounds to single bounding box + var 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 { + top: Math.max(b.top - padding, 0), + left: Math.max(b.left - padding, 0), + width: b.width + 2 * padding, + height: b.height + 2 * padding + }; + }); + page.clipRect = box; + page.render(sys.args[2]); + phantom.exit(); + }, 1); +}); Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/demo_head.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/demo_head.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/markup_component.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/markup_component.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/markup_daterange.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/markup_daterange.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/markup_inline.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/markup_inline.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/markup_input.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/markup_input.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_calendarweeks.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_calendarweeks.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_clearbtn.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_clearbtn.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_daysofweekdisabled.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_daysofweekdisabled.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_enddate.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_enddate.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_language.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_language.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_multidate.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_multidate.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_startdate.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_startdate.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_todaybtn.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_todaybtn.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_todayhighlight.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_todayhighlight.png differ Binary files /tmp/iX7lBijtYH/libjs-twitter-bootstrap-datepicker-0.0.0.1/docs/_static/screenshots/option_weekstart.png and /tmp/eneatukMFA/libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/docs/_static/screenshots/option_weekstart.png differ diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/.gitignore libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/.gitignore --- libjs-twitter-bootstrap-datepicker-0.0.0.1/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/.gitignore 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,3 @@ +docs/_build +node_modules/ +_build diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/Gruntfile.js libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/Gruntfile.js --- libjs-twitter-bootstrap-datepicker-0.0.0.1/Gruntfile.js 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/Gruntfile.js 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,118 @@ +/* global module, require */ +module.exports = function(grunt){ + require('load-grunt-tasks')(grunt); + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + qunit: { + all: ['tests/tests.html'] + }, + jshint: { + options: { + jshintrc: true + }, + gruntfile: ['Gruntfile.js'], + main: ['js/bootstrap-datepicker.js'], + locales: ['js/locales/*js'] + }, + jscs: { + /* grunt-contrib-jscs notes: + 0.1.2 works + 0.1.3 infinite loops on postinstall + 0.1.4 doesn't seem to hit all targets when run via "grunt jscs" + */ + gruntfile: ['Gruntfile.js'], + main: ['js/bootstrap-datepicker.js'], + locales: ['js/locales/*js'] + }, + less: { + standalone: { + files: { + '_build/datepicker.standalone.css': 'build/build_standalone.less', + '_build/datepicker3.standalone.css': 'build/build_standalone3.less' + } + }, + css: { + files: { + '_build/datepicker.css': 'build/build.less', + '_build/datepicker3.css': 'build/build3.less' + } + }, + repo: { + files: { + 'css/datepicker.css': 'build/build_standalone.less', + 'css/datepicker3.css': 'build/build_standalone3.less' + } + } + }, + uglify: { + options: { + compress: true, + mangle: true + }, + main: { + options: { + sourceMap: function(dest){ + return dest.replace('.min.js', '.js.map'); + } + }, + files: { + '_build/bootstrap-datepicker.min.js': 'js/bootstrap-datepicker.js', + '_build/bootstrap-datepicker.locales.min.js': 'js/locales/*.js' + } + }, + locales: { + files: [{ + expand: true, + cwd: 'js/locales/', + src: ['*.js', '!*.min.js'], + dest: '_build/locales/', + rename: function(dest, name){ + return dest + name.replace(/\.js$/, '.min.js'); + } + }] + } + }, + cssmin: { + all: { + files: { + '_build/datepicker.standalone.min.css': '_build/datepicker.standalone.css', + '_build/datepicker.min.css': '_build/datepicker.css', + '_build/datepicker3.standalone.min.css': '_build/datepicker3.standalone.css', + '_build/datepicker3.min.css': '_build/datepicker3.css' + } + } + }, + clean: ['_build'] + }); + + grunt.registerTask('lint', 'Lint all js files with jshint and jscs', ['jshint', 'jscs']); + grunt.registerTask('test', 'Lint files and run unit tests', ['lint', 'qunit']); + grunt.registerTask('finish', 'Prepares repo for commit [test, less:repo, screenshots]', ['test', 'less:repo', 'screenshots']); + grunt.registerTask('dist', 'Builds minified files', ['less:css', 'less:standalone', 'cssmin', 'uglify']); + + grunt.registerTask('screenshots', 'Rebuilds automated docs screenshots', function(){ + var phantomjs = require('phantomjs').path; + + grunt.file.recurse('docs/_static/screenshots/', function(abspath){ + grunt.file.delete(abspath); + }); + + grunt.file.recurse('docs/_screenshots/', function(abspath, root, subdir, filename){ + if (!/.html$/.test(filename)) + return; + subdir = subdir || ''; + + var outdir = "docs/_static/screenshots/" + subdir, + outfile = outdir + filename.replace(/.html$/, '.png'); + + if (!grunt.file.exists(outdir)) + grunt.file.mkdir(outdir); + + grunt.util.spawn({ + cmd: phantomjs, + args: ['docs/_screenshots/script/screenshot.js', abspath, outfile] + }); + }); + }); +}; diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/.hgignore libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/.hgignore --- libjs-twitter-bootstrap-datepicker-0.0.0.1/.hgignore 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/.hgignore 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,3 @@ +docs/_build +node_modules/ +_build/ diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/.hgtags libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/.hgtags --- libjs-twitter-bootstrap-datepicker-0.0.0.1/.hgtags 1970-01-01 00:00:00.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/.hgtags 2014-10-06 13:52:38.000000000 +0000 @@ -0,0 +1,19 @@ +b965e03abfcb10d66c8dad96d54d6f8e1c5d8501 v1.0.0 +7a490672b362af7640bbeb68553a0e0a5a95cb9e v1.0.1 +9a730557f14d79c2ce2d28eacb24bdf52ac2e042 1.0.2-rc.1 +62604d506e5ba9d85ee6c2d86723b9b3d817e7bd 1.0.2-rc.1.1 +f6211e251c021331decc16bfbcf25577dd354ef4 1.0.2-rc.2 +493d2332f0cb7f2dd308c442920da86063ff2e0f 1.0.2 +77a6755dc3df3ada745024648535562587fab630 1.1.0 +fe9e4106def42741adba1606245ab0eab32acb55 1.1.1 +e37ab4f7d0d30a45ee80a7019fd2bcf8c1765de7 1.1.2 +0596a9619e30c5f52d0f56c9cba9daf0d69d29ab 1.1.3 +ba267071688d93d973bee4ddb11344971e851e9e 1.2.0-rc.1 +57e2f78d70dc5c6a265869cff3b885a78123300c 1.2.0 +68703f4d535efdeb865eba0c0b3d3b4acfb76121 1.3.0-rc.1 +abfc042e74af3e944a0819296260a8c96c6169c1 1.3.0-rc.2 +2687213f73e257375fcc3c35c1a3d23284e17341 1.3.0-rc.3 +0e5bbe72a69c9d75edbfce775943e2f7eb719eeb 1.3.0-rc.4 +3d6c7937e3f7b7e1cdb7db22fbd504e853ee776b 1.3.0-rc.5 +5bc760304871bb691a613b79c86ba9a91735007f 1.3.0-rc.6 +3993d120557ffc4c593d0cc14c226af12579a644 1.3.0 diff -Nru libjs-twitter-bootstrap-datepicker-0.0.0.1/js/bootstrap-datepicker.js libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/js/bootstrap-datepicker.js --- libjs-twitter-bootstrap-datepicker-0.0.0.1/js/bootstrap-datepicker.js 2013-03-12 06:37:38.000000000 +0000 +++ libjs-twitter-bootstrap-datepicker-1.3.1+dfsg1/js/bootstrap-datepicker.js 2014-10-06 13:52:38.000000000 +0000 @@ -1,8 +1,11 @@ /* ========================================================= - * bootstrap-datepicker.js - * http://www.eyecon.ro/bootstrap-datepicker + * bootstrap-datepicker.js + * Repo: https://github.com/eternicode/bootstrap-datepicker/ + * Demo: http://eternicode.github.io/bootstrap-datepicker/ + * Docs: http://bootstrap-datepicker.readthedocs.org/ + * Forked from http://www.eyecon.ro/bootstrap-datepicker * ========================================================= - * Copyright 2012 Stefan Petre + * Started by Stefan Petre; improvements by Andrew Rowls + contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,226 +19,830 @@ * See the License for the specific language governing permissions and * limitations under the License. * ========================================================= */ - -!function( $ ) { - + +(function($, undefined){ + + var $window = $(window); + + 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 alias(method){ + return function(){ + return this[method].apply(this, arguments); + }; + } + + 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++) + if (this[i].valueOf() === val) + return i; + return -1; + }, + remove: function(i){ + this.splice(i,1); + }, + replace: function(new_array){ + if (!new_array) + return; + if (!$.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){ + this.dates = new DateArray(); + this.viewDate = UTCToday(); + this.focusDate = null; + + this._process_options(options); + this.element = $(element); - this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy'); - this.picker = $(DPGlobal.template) - .appendTo('body') - .on({ - click: $.proxy(this.click, this)//, - //mousedown: $.proxy(this.mousedown, this) - }); + this.isInline = false; this.isInput = this.element.is('input'); - this.component = this.element.is('.date') ? this.element.find('.add-on') : false; - - if (this.isInput) { - this.element.on({ - focus: $.proxy(this.show, this), - //blur: $.proxy(this.hide, this), - keyup: $.proxy(this.update, this) - }); - } else { - if (this.component){ - this.component.on('click', $.proxy(this.show, this)); - } else { - this.element.on('click', $.proxy(this.show, this)); - } + this.component = this.element.is('.date') ? this.element.find('.add-on, .input-group-addon, .btn') : false; + this.hasInput = this.component && this.element.find('input').length; + if (this.component && this.component.length === 0) + this.component = false; + + this.picker = $(DPGlobal.template); + this._buildEvents(); + this._attachEvents(); + + if (this.isInline){ + this.picker.addClass('datepicker-inline').appendTo(this.element); } - - this.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0; - if (typeof this.minViewMode === 'string') { - switch (this.minViewMode) { - case 'months': - this.minViewMode = 1; + else { + this.picker.addClass('datepicker-dropdown dropdown-menu'); + } + + if (this.o.rtl){ + this.picker.addClass('datepicker-rtl'); + } + + this.viewMode = this.o.startView; + + if (this.o.calendarWeeks) + this.picker.find('tfoot th.today') + .attr('colspan', function(i, val){ + return parseInt(val) + 1; + }); + + this._allow_update = false; + + this.setStartDate(this._o.startDate); + this.setEndDate(this._o.endDate); + this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); + + this.fillDow(); + this.fillMonths(); + + this._allow_update = true; + + this.update(); + this.showMode(); + + if (this.isInline){ + this.show(); + } + }; + + Datepicker.prototype = { + constructor: Datepicker, + + _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; + + switch (o.startView){ + case 2: + case 'decade': + o.startView = 2; break; - case 'years': - this.minViewMode = 2; + case 1: + case 'year': + o.startView = 1; break; default: - this.minViewMode = 0; - break; + o.startView = 0; } - } - this.viewMode = options.viewMode||this.element.data('date-viewmode')||0; - if (typeof this.viewMode === 'string') { - switch (this.viewMode) { + + switch (o.minViewMode){ + case 1: case 'months': - this.viewMode = 1; + o.minViewMode = 1; break; + case 2: case 'years': - this.viewMode = 2; + o.minViewMode = 2; break; default: - this.viewMode = 0; - break; + o.minViewMode = 0; } - } - this.startViewMode = this.viewMode; - this.weekStart = options.weekStart||this.element.data('date-weekstart')||0; - this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1; - this.onRender = options.onRender; - this.fillDow(); - this.fillMonths(); - this.update(); - this.showMode(); - }; - - Datepicker.prototype = { - constructor: Datepicker, - - show: function(e) { - this.picker.show(); - this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); - this.place(); - $(window).on('resize', $.proxy(this.place, this)); - if (e ) { - e.stopPropagation(); - e.preventDefault(); - } - if (!this.isInput) { - } - var that = this; - $(document).on('mousedown', function(ev){ - if ($(ev.target).closest('.datepicker').length == 0) { - that.hide(); + + o.startView = Math.max(o.startView, o.minViewMode); + + // 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); + } + 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); + } + else { + o.endDate = Infinity; + } + } + + o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; + if (!$.isArray(o.daysOfWeekDisabled)) + o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); + o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){ + return parseInt(d, 10); }); + + 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'; + } + }, + _events: [], + _secondaryEvents: [], + _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(){ + if (this.isInput){ // single input + this._events = [ + [this.element, { + focus: $.proxy(this.show, this), + 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), + change: $.proxy(function(){ + this.update(); + }, this) + }] + ]; + } + else if (this.component && this.hasInput){ // component: input + button + this._events = [ + // For components that are not readonly, allow keyboard nav + [this.element.find('input'), { + focus: $.proxy(this.show, this), + 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) + }], + [this.component, { + click: $.proxy(this.show, this) + }] + ]; + } + else if (this.element.is('div')){ // inline datepicker + this.isInline = true; + } + else { + this._events = [ + [this.element, { + click: $.proxy(this.show, 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) + }] + ); + + this._secondaryEvents = [ + [this.picker, { + click: $.proxy(this.click, 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.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: 'show', - date: this.date + type: event, + date: local_date, + 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.isInline) + this.picker.appendTo('body'); + this.picker.show(); + this.place(); + this._attachSecondaryEvents(); + this._trigger('show'); + }, + hide: function(){ - this.picker.hide(); - $(window).off('resize', this.place); - this.viewMode = this.startViewMode; + if (this.isInline) + return; + if (!this.picker.is(':visible')) + return; + this.focusDate = null; + this.picker.hide().detach(); + this._detachSecondaryEvents(); + this.viewMode = this.o.startView; this.showMode(); - if (!this.isInput) { - $(document).off('mousedown', this.hide); + + if ( + this.o.forceParse && + ( + this.isInput && this.element.val() || + this.hasInput && this.element.find('input').val() + ) + ) + this.setValue(); + this._trigger('hide'); + }, + + remove: function(){ + this.hide(); + this._detachEvents(); + this._detachSecondaryEvents(); + this.picker.remove(); + delete this.element.data().datepicker; + if (!this.isInput){ + delete this.element.data().date; } - //this.set(); - this.element.trigger({ - type: 'hide', - date: this.date + }, + + _utc_to_local: function(utc){ + return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000)); + }, + _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 && new Date(Date.UTC(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); }); }, - - set: function() { - var formated = DPGlobal.formatDate(this.date, this.format); - if (!this.isInput) { + + getDate: function(){ + return this._utc_to_local(this.getUTCDate()); + }, + + getUTCDate: function(){ + return new Date(this.dates.get(-1)); + }, + + setDates: function(){ + var args = $.isArray(arguments[0]) ? arguments[0] : arguments; + this.update.apply(this, args); + this._trigger('changeDate'); + this.setValue(); + }, + + setUTCDates: function(){ + var args = $.isArray(arguments[0]) ? arguments[0] : arguments; + this.update.apply(this, $.map(args, this._utc_to_local)); + this._trigger('changeDate'); + this.setValue(); + }, + + setDate: alias('setDates'), + setUTCDate: alias('setUTCDates'), + + setValue: function(){ + var formatted = this.getFormattedDate(); + if (!this.isInput){ if (this.component){ - this.element.find('input').prop('value', formated); + this._doChange(this.element.find('input').val(formatted)); } - this.element.data('date', formated); - } else { - this.element.prop('value', formated); - } - }, - - setValue: function(newDate) { - if (typeof newDate === 'string') { - this.date = DPGlobal.parseDate(newDate, this.format); - } else { - this.date = new Date(newDate); } - this.set(); - this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0); - this.fill(); + else { + this._doChange(this.element.val(formatted)); + } + }, + + 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); + }, + + setStartDate: function(startDate){ + this._process_options({startDate: startDate}); + this.update(); + this.updateNavArrows(); + }, + + setEndDate: function(endDate){ + this._process_options({endDate: endDate}); + this.update(); + this.updateNavArrows(); + }, + + setDaysOfWeekDisabled: function(daysOfWeekDisabled){ + this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); + this.update(); + this.updateNavArrows(); }, - + place: function(){ - var offset = this.component ? this.component.offset() : this.element.offset(); + if (this.isInline) + return; + var calendarWidth = this.picker.outerWidth(), + calendarHeight = this.picker.outerHeight(), + visualPadding = 10, + windowWidth = $window.width(), + windowHeight = $window.height(), + scrollTop = $window.scrollTop(); + + var zIndex = parseInt(this.element.parents().filter(function(){ + return $(this).css('z-index') !== 'auto'; + }).first().css('z-index'))+10; + 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, + top = offset.top; + + 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 { + // Default to left + this.picker.addClass('datepicker-orient-left'); + if (offset.left < 0) + left -= offset.left - visualPadding; + else if (offset.left + calendarWidth > windowWidth) + left = windowWidth - calendarWidth - visualPadding; + } + + // 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, bottom_overflow; + if (yorient === 'auto'){ + top_overflow = -scrollTop + offset.top - calendarHeight; + bottom_overflow = scrollTop + windowHeight - (offset.top + height + calendarHeight); + if (Math.max(top_overflow, bottom_overflow) === bottom_overflow) + yorient = 'top'; + else + yorient = 'bottom'; + } + this.picker.addClass('datepicker-orient-' + yorient); + if (yorient === 'top') + top += height; + else + top -= calendarHeight + parseInt(this.picker.css('padding-top')); + this.picker.css({ - top: offset.top + this.height, - left: offset.left + top: top, + left: left, + zIndex: zIndex }); }, - - update: function(newDate){ - this.date = DPGlobal.parseDate( - typeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')), - this.format - ); - this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0); + + _doChange: function(element) { + var old_allow_update = this._allow_update; + this._allow_update = false; + element.change(); + this._allow_update = old_allow_update; + }, + + _allow_update: true, + update: function(){ + if (!this._allow_update) + return; + this._allow_update = false; + + 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.element.find('input').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)); + dates = $.grep(dates, $.proxy(function(date){ + return ( + date < this.o.startDate || + date > this.o.endDate || + !date + ); + }, this), true); + this.dates.replace(dates); + + 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); + + if (fromArgs){ + // setting date by clicking + this.setValue(); + } + else if (dates.length){ + // setting date by typing + if (String(oldDates) !== String(this.dates)) + this._trigger('changeDate'); + } + if (!this.dates.length && oldDates.length) + this._trigger('clearDate'); + this.fill(); + + this._allow_update = true; }, - + fillDow: function(){ - var dowCnt = this.weekStart; - var html = ''; - while (dowCnt < this.weekStart + 7) { - html += ''+DPGlobal.dates.daysMin[(dowCnt++)%7]+''; + var dowCnt = this.o.weekStart, + html = ''; + if (this.o.calendarWeeks){ + var cell = ' '; + html += cell; + this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); + } + 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 html = ''; - var i = 0 - while (i < 12) { - html += ''+DPGlobal.dates.monthsShort[i++]+''; + var html = '', + i = 0; + while (i < 12){ + 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 = new Date(); + 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 local today, not UTC today + if (this.o.todayHighlight && + date.getUTCFullYear() === today.getFullYear() && + date.getUTCMonth() === today.getMonth() && + date.getUTCDate() === today.getDate()){ + cls.push('today'); } - this.picker.find('.datepicker-months td').append(html); + if (this.dates.contains(date) !== -1) + cls.push('active'); + if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || + $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){ + cls.push('disabled'); + } + 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'); + } + } + return cls; }, - - fill: function() { + + fill: function(){ var d = new Date(this.viewDate), - year = d.getFullYear(), - month = d.getMonth(), - currentDate = this.date.valueOf(); - this.picker.find('.datepicker-days th:eq(1)') - .text(DPGlobal.dates.months[month]+' '+year); - var prevMonth = new Date(year, month-1, 28,0,0,0,0), - day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth()); - prevMonth.setDate(day); - prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7); + 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 || '', + tooltip; + this.picker.find('.datepicker-days thead th.datepicker-switch') + .text(dates[this.o.language].months[month]+' '+year); + this.picker.find('tfoot th.today') + .text(todaytxt) + .toggle(this.o.todayBtn !== false); + this.picker.find('tfoot th.clear') + .text(cleartxt) + .toggle(this.o.clearBtn !== false); + this.updateNavArrows(); + this.fillMonths(); + var prevMonth = UTCDate(year, month-1, 28), + day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); + prevMonth.setUTCDate(day); + prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); var nextMonth = new Date(prevMonth); - nextMonth.setDate(nextMonth.getDate() + 42); + nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); nextMonth = nextMonth.valueOf(); var html = []; - var clsName, - prevY, - prevM; - while(prevMonth.valueOf() < nextMonth) { - if (prevMonth.getDay() === this.weekStart) { + var clsName; + while (prevMonth.valueOf() < nextMonth){ + if (prevMonth.getUTCDay() === 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 - prevMonth.getUTCDay() - 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.onRender(prevMonth); - prevY = prevMonth.getFullYear(); - prevM = prevMonth.getMonth(); - if ((prevM < month && prevY === year) || prevY < year) { - clsName += ' old'; - } else if ((prevM > month && prevY === year) || prevY > year) { - clsName += ' new'; - } - if (prevMonth.valueOf() === currentDate) { - clsName += ' active'; + clsName = this.getClassNames(prevMonth); + clsName.push('day'); + + if (this.o.beforeShowDay !== $.noop){ + var 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; } - html.push(''+prevMonth.getDate() + ''); - if (prevMonth.getDay() === this.weekEnd) { + + clsName = $.unique(clsName); + html.push(''+prevMonth.getUTCDate() + ''); + if (prevMonth.getUTCDay() === this.o.weekEnd){ html.push(''); } - prevMonth.setDate(prevMonth.getDate()+1); + prevMonth.setUTCDate(prevMonth.getUTCDate()+1); } this.picker.find('.datepicker-days tbody').empty().append(html.join('')); - var currentYear = this.date.getFullYear(); - + var months = this.picker.find('.datepicker-months') .find('th:eq(1)') .text(year) .end() .find('span').removeClass('active'); - if (currentYear === year) { - months.eq(this.date.getMonth()).addClass('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'); + } + html = ''; year = parseInt(year/10, 10) * 10; var yearCont = this.picker.find('.datepicker-years') @@ -244,113 +851,600 @@ .end() .find('td'); year -= 1; - for (var i = -1; i < 11; i++) { - html += ''+year+''; + var years = $.map(this.dates, function(d){ + return d.getUTCFullYear(); + }), + classes; + for (var i = -1; i < 11; i++){ + classes = ['year']; + if (i === -1) + classes.push('old'); + else if (i === 10) + classes.push('new'); + if ($.inArray(year, years) !== -1) + classes.push('active'); + if (year < startYear || year > endYear) + classes.push('disabled'); + html += ''+year+''; year += 1; } yearCont.html(html); }, - - click: function(e) { - e.stopPropagation(); + + updateNavArrows: function(){ + if (!this._allow_update) + return; + + var d = new Date(this.viewDate), + year = d.getUTCFullYear(), + month = d.getUTCMonth(); + switch (this.viewMode){ + case 0: + if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){ + this.picker.find('.prev').css({visibility: 'hidden'}); + } + else { + this.picker.find('.prev').css({visibility: 'visible'}); + } + if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){ + this.picker.find('.next').css({visibility: 'hidden'}); + } + else { + this.picker.find('.next').css({visibility: 'visible'}); + } + break; + case 1: + case 2: + if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()){ + this.picker.find('.prev').css({visibility: 'hidden'}); + } + else { + this.picker.find('.prev').css({visibility: 'visible'}); + } + if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()){ + this.picker.find('.next').css({visibility: 'hidden'}); + } + else { + this.picker.find('.next').css({visibility: 'visible'}); + } + break; + } + }, + + click: function(e){ e.preventDefault(); - var target = $(e.target).closest('span, td, th'); - if (target.length === 1) { - switch(target[0].nodeName.toLowerCase()) { + var target = $(e.target).closest('span, td, th'), + year, month, day; + if (target.length === 1){ + switch (target[0].nodeName.toLowerCase()){ case 'th': - switch(target[0].className) { - case 'switch': + switch (target[0].className){ + case 'datepicker-switch': this.showMode(1); break; case 'prev': case 'next': - this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call( - this.viewDate, - this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) + - DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1) - ); + var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1); + switch (this.viewMode){ + case 0: + this.viewDate = this.moveMonth(this.viewDate, dir); + this._trigger('changeMonth', this.viewDate); + break; + case 1: + case 2: + this.viewDate = this.moveYear(this.viewDate, dir); + if (this.viewMode === 1) + this._trigger('changeYear', this.viewDate); + break; + } this.fill(); - this.set(); + break; + case 'today': + var date = new Date(); + date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); + + this.showMode(-2); + var which = this.o.todayBtn === 'linked' ? null : 'view'; + this._setDate(date, which); + break; + case 'clear': + var element; + if (this.isInput) + element = this.element; + else if (this.component) + element = this.element.find('input'); + if (element) + this._doChange(element.val("")); + this.update(); + this._trigger('changeDate'); + if (this.o.autoclose) + this.hide(); break; } break; case 'span': - if (target.is('.month')) { - var month = target.parent().find('span').index(target); - this.viewDate.setMonth(month); - } else { - var year = parseInt(target.text(), 10)||0; - this.viewDate.setFullYear(year); - } - if (this.viewMode !== 0) { - this.date = new Date(this.viewDate); - this.element.trigger({ - type: 'changeDate', - date: this.date, - viewMode: DPGlobal.modes[this.viewMode].clsName - }); + if (!target.is('.disabled')){ + this.viewDate.setUTCDate(1); + if (target.is('.month')){ + day = 1; + month = target.parent().find('span').index(target); + year = this.viewDate.getUTCFullYear(); + this.viewDate.setUTCMonth(month); + this._trigger('changeMonth', this.viewDate); + if (this.o.minViewMode === 1){ + this._setDate(UTCDate(year, month, day)); + } + } + else { + day = 1; + month = 0; + year = parseInt(target.text(), 10)||0; + this.viewDate.setUTCFullYear(year); + this._trigger('changeYear', this.viewDate); + if (this.o.minViewMode === 2){ + this._setDate(UTCDate(year, month, day)); + } + } + this.showMode(-1); + this.fill(); } - this.showMode(-1); - this.fill(); - this.set(); break; case 'td': if (target.is('.day') && !target.is('.disabled')){ - var day = parseInt(target.text(), 10)||1; - var month = this.viewDate.getMonth(); - if (target.is('.old')) { - month -= 1; - } else if (target.is('.new')) { - month += 1; + day = parseInt(target.text(), 10)||1; + year = this.viewDate.getUTCFullYear(); + month = this.viewDate.getUTCMonth(); + if (target.is('.old')){ + if (month === 0){ + month = 11; + year -= 1; + } + else { + month -= 1; + } } - var year = this.viewDate.getFullYear(); - this.date = new Date(year, month, day,0,0,0,0); - this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0); - this.fill(); - this.set(); - this.element.trigger({ - type: 'changeDate', - date: this.date, - viewMode: DPGlobal.modes[this.viewMode].clsName - }); + else if (target.is('.new')){ + if (month === 11){ + month = 0; + year += 1; + } + else { + month += 1; + } + } + this._setDate(UTCDate(year, month, day)); } break; } } + if (this.picker.is(':visible') && this._focused_from){ + $(this._focused_from).focus(); + } + delete this._focused_from; }, - - mousedown: function(e){ - e.stopPropagation(); - e.preventDefault(); + + _toggle_multidate: function(date){ + var ix = this.dates.contains(date); + if (!date){ + this.dates.clear(); + } + else if (this.o.multidate === false) { + this.dates.clear(); + this.dates.push(date); + } + else { + if (ix !== -1){ + this.dates.remove(ix); + } + 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 || which === 'view') + this.viewDate = date && new Date(date); + + this.fill(); + this.setValue(); + this._trigger('changeDate'); + var element; + if (this.isInput){ + element = this.element; + } + else if (this.component){ + element = this.element.find('input'); + } + if (element){ + this._doChange(element); + } + if (this.o.autoclose && (!which || which === 'date')){ + this.hide(); + } + }, + + moveMonth: function(date, dir){ + if (!date) + return undefined; + 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 + if (new_month < 0 || new_month > 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); + }, + + dateWithinRange: function(date){ + return date >= this.o.startDate && date <= this.o.endDate; + }, + + keydown: function(e){ + if (this.picker.is(':not(:visible)')){ + if (e.keyCode === 27) // allow escape to hide and re-show picker + this.show(); + return; + } + var dateChanged = false, + dir, newDate, 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(); + break; + case 37: // left + case 39: // right + if (!this.o.keyboardNavigation) + break; + dir = e.keyCode === 37 ? -1 : 1; + if (e.ctrlKey){ + newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveYear(focusDate, dir); + this._trigger('changeYear', this.viewDate); + } + else if (e.shiftKey){ + newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveMonth(focusDate, dir); + this._trigger('changeMonth', this.viewDate); + } + else { + newDate = new Date(this.dates.get(-1) || UTCToday()); + newDate.setUTCDate(newDate.getUTCDate() + dir); + newViewDate = new Date(focusDate); + newViewDate.setUTCDate(focusDate.getUTCDate() + dir); + } + if (this.dateWithinRange(newDate)){ + this.focusDate = this.viewDate = newViewDate; + this.setValue(); + this.fill(); + e.preventDefault(); + } + break; + case 38: // up + case 40: // down + if (!this.o.keyboardNavigation) + break; + dir = e.keyCode === 38 ? -1 : 1; + if (e.ctrlKey){ + newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveYear(focusDate, dir); + this._trigger('changeYear', this.viewDate); + } + else if (e.shiftKey){ + newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveMonth(focusDate, dir); + this._trigger('changeMonth', this.viewDate); + } + else { + newDate = new Date(this.dates.get(-1) || UTCToday()); + newDate.setUTCDate(newDate.getUTCDate() + dir * 7); + newViewDate = new Date(focusDate); + newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7); + } + if (this.dateWithinRange(newDate)){ + this.focusDate = this.viewDate = newViewDate; + this.setValue(); + this.fill(); + e.preventDefault(); + } + break; + case 32: // spacebar + // Spacebar is used in manually typing dates in some formats. + // As such, its behavior should not be hijacked. + break; + case 13: // enter + focusDate = this.focusDate || this.dates.get(-1) || this.viewDate; + 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(); + 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'); + var element; + if (this.isInput){ + element = this.element; + } + else if (this.component){ + element = this.element.find('input'); + } + if (element){ + this._doChange(element); + } + } + }, + + showMode: function(dir){ + if (dir){ + this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); + } + this.picker + .find('>div') + .hide() + .filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName) + .css('display', 'block'); + this.updateNavArrows(); + } + }; + + var DateRangePicker = function(element, options){ + this.element = $(element); + this.inputs = $.map(options.inputs, function(i){ + return i.jquery ? i[0] : i; + }); + delete options.inputs; + + $(this.inputs) + .datepicker(options) + .bind('changeDate', $.proxy(this.dateUpdated, this)); + + this.pickers = $.map(this.inputs, function(i){ + return $(i).data('datepicker'); + }); + this.updateDates(); + }; + DateRangePicker.prototype = { + updateDates: function(){ + this.dates = $.map(this.pickers, function(i){ + return i.getUTCDate(); + }); + this.updateRanges(); }, - - showMode: function(dir) { - if (dir) { - this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir)); + updateRanges: function(){ + var range = $.map(this.dates, function(d){ + return d.valueOf(); + }); + $.each(this.pickers, function(i, p){ + p.setRange(range); + }); + }, + 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 = $(e.target).data('datepicker'), + new_date = dp.getUTCDate(), + i = $.inArray(e.target, this.inputs), + l = this.inputs.length; + if (i === -1) + return; + + $.each(this.pickers, function(i, p){ + if (!p.getUTCDate()) + p.setUTCDate(new_date); + }); + + if (new_date < this.dates[i]){ + // Date being moved earlier/left + while (i >= 0 && new_date < this.dates[i]){ + this.pickers[i--].setUTCDate(new_date); + } + } + else if (new_date > this.dates[i]){ + // Date being moved later/right + while (i < l && new_date > this.dates[i]){ + this.pickers[i++].setUTCDate(new_date); + } } - this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); + this.updateDates(); + + delete this.updating; + }, + remove: function(){ + $.map(this.pickers, function(p){ p.remove(); }); + delete this.element.data().datepicker; } }; - - $.fn.datepicker = function ( option, val ) { - return this.each(function () { + + 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; + $.fn.datepicker = 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) { - $this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options)))); + 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.is('.input-daterange') || opts.inputs){ + var ropts = { + inputs: opts.inputs || $this.find('input').toArray() + }; + $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); + } + else { + $this.data('datepicker', (data = new Datepicker(this, opts))); + } + } + if (typeof option === 'string' && typeof data[option] === 'function'){ + internal_return = data[option].apply(data, args); + if (internal_return !== undefined) + return false; } - if (typeof option === 'string') data[option](val); }); + if (internal_return !== undefined) + return internal_return; + else + return this; }; - $.fn.datepicker.defaults = { - onRender: function(date) { - return ''; - } + var defaults = $.fn.datepicker.defaults = { + autoclose: false, + beforeShowDay: $.noop, + calendarWeeks: false, + clearBtn: false, + daysOfWeekDisabled: [], + endDate: Infinity, + forceParse: true, + format: 'mm/dd/yyyy', + keyboardNavigation: true, + language: 'en', + minViewMode: 0, + multidate: false, + multidateSeparator: ',', + orientation: "auto", + rtl: false, + startDate: -Infinity, + startView: 0, + todayBtn: false, + todayHighlight: false, + weekStart: 0 }; + 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", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + 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" + } + }; + var DPGlobal = { modes: [ { @@ -368,107 +1462,227 @@ navFnc: 'FullYear', navStep: 10 }], - dates:{ - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], - 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"] + isLeapYear: function(year){ + return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); }, - isLeapYear: function (year) { - return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) - }, - getDaysInMonth: function (year, month) { - return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] + getDaysInMonth: function(year, month){ + return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, + validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, + nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, parseFormat: function(format){ - var separator = format.match(/[.\/\-\s].*?/), - parts = format.split(/\W+/); - if (!separator || !parts || parts.length === 0){ + // 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 {separator: separator, parts: parts}; + return {separators: separators, parts: parts}; }, - parseDate: function(date, format) { - var parts = date.split(format.separator), - date = new Date(), - val; - date.setHours(0); - date.setMinutes(0); - date.setSeconds(0); - date.setMilliseconds(0); - if (parts.length === format.parts.length) { - var year = date.getFullYear(), day = date.getDate(), month = date.getMonth(); - for (var i=0, cnt = format.parts.length; i < cnt; i++) { - val = parseInt(parts[i], 10)||1; - switch(format.parts[i]) { - case 'dd': + parseDate: function(date, format, language){ + if (!date) + return undefined; + if (date instanceof Date) + return date; + if (typeof format === 'string') + format = DPGlobal.parseFormat(format); + var part_re = /([\-+]\d+)([dmwy])/, + parts = date.match(/([\-+]\d+)([dmwy])/g), + part, dir, i; + if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){ + date = new Date(); + for (i=0; i < parts.length; i++){ + part = part_re.exec(parts[i]); + dir = parseInt(part[1]); + switch (part[2]){ case 'd': - day = val; - date.setDate(val); + date.setUTCDate(date.getUTCDate() + dir); break; - case 'mm': case 'm': - month = val - 1; - date.setMonth(val - 1); + date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir); break; - case 'yy': - year = 2000 + val; - date.setFullYear(2000 + val); + case 'w': + date.setUTCDate(date.getUTCDate() + dir * 7); break; - case 'yyyy': - year = val; - date.setFullYear(val); + case 'y': + date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir); break; } } - date = new Date(year, month, day, 0 ,0 ,0); + return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0); + } + parts = date && date.match(this.nonpunctuation) || []; + date = new Date(); + var parsed = {}, + setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], + setters_map = { + yyyy: function(d,v){ + return d.setUTCFullYear(v); + }, + yy: function(d,v){ + return d.setUTCFullYear(2000+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['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; + setters_map['dd'] = setters_map['d']; + date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); + 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 === p; + } + 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){ + formatDate: function(date, format, language){ + if (!date) + return ''; + if (typeof format === 'string') + format = DPGlobal.parseFormat(format); var val = { - d: date.getDate(), - m: date.getMonth() + 1, - yy: date.getFullYear().toString().substring(2), - yyyy: date.getFullYear() + 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; - var date = []; - for (var i=0, cnt = format.parts.length; i < cnt; i++) { + 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(format.separator); + return date.join(''); }, headTemplate: ''+ ''+ - '‹'+ - ''+ - '›'+ + '«'+ + ''+ + '»'+ ''+ '', - contTemplate: '' + contTemplate: '', + footTemplate: ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' }; - DPGlobal.template = '