diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fd5161d04..113512639 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,6 @@ Contributions guidelines: - Use 2 spaces indentation -- If it is a bug, try to add an automated test that reproduces it in the - test/issues.coffee, following the conventions already adopted. -- If it is a new feature, try to add automated tests for it. -- Never submit patches that break existing tests(make test should take care of - downloading dependencies and running the tests) -- Do not commit the files in the 'build' dir, 'git update-index --assume-unchanged build/{js,css}/*' will help - -Before starting to develop, enter 'make deps' to download all dependencies -needed for developing/testing. 'make test' will run all tests. +- If it is a bug, please read open issues to avoid duplicates +- If it is a new feature, please provide a use case. E.g. Why this feature should be added and what you are using it for +- If possible, please provide example code and/or a jdfiddle and a DETAILED example of what is not working diff --git a/README.md b/README.md index 25b0b643b..c7ea36693 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,72 @@ -# Bootstrap v3 datetimepicker widget +# Bootstrap v3 datetimepicker widget ![GitHub version](https://badge.fury.io/gh/Eonasdan%2Fbootstrap-datetimepicker.png) ![DateTimePicker](http://i.imgur.com/nfnvh5g.png) ### [⇢ View the manual and demos](http://eonasdan.github.io/bootstrap-datetimepicker/) ##Where do you use this? -I'd love to know if your public site is using this plugin and list your logo on the documentation site. Please email me `eonasdan at outlook dot com` +I'd love to know if your public site is using this plugin and list your logo on the documentation site. Please email me `eonasdan at outlook dot com`. Do not submit issue/feature request to this email, they will be ignored. + +## See the [Change Log](#change-log) for important changes and updates. ## Quick installation using -## [bower](http://bower.io): +## [bower](http://bower.io): ![Bower version](https://badge.fury.io/bo/eonasdan-bootstrap-datetimepicker.png) Run the following command: -```` +``` bower install eonasdan-bootstrap-datetimepicker#latest --save -```` -## [Nuget](https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker/): -```` -PM> Install-Package Bootstrap.v3.Datetimepicker -```` - -## See the [Change Log](#change-log) for important changes and updates +``` Include necessary scripts and styles: -````html +```html
- - + + -```` +``` -Done! [Now take a look at the manual](http://eonasdan.github.io/bootstrap-datetimepicker/) for examples and available options. +## [Nuget (LESS)](https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker/): ![NuGet version](https://badge.fury.io/nu/Bootstrap.v3.Datetimepicker.png) +``` +PM> Install-Package Bootstrap.v3.Datetimepicker +``` + +## [Nuget (CSS)](https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker.CSS/): ![NuGet version](https://badge.fury.io/nu/Bootstrap.v3.Datetimepicker.CSS.png) +``` +PM> Install-Package Bootstrap.v3.Datetimepicker.CSS +``` + +```html + + + + + + + + +``` +## [Rails](http://rubygems.org/gems/bootstrap3-datetimepicker-rails) ![Gem Version](https://badge.fury.io/rb/bootstrap3-datetimepicker-rails.png) + +Add the following to your `Gemfile`: +``` +gem 'momentjs-rails', '~> 2.5.0' +gem 'bootstrap3-datetimepicker-rails', '~> 2.1.30' +``` +Read the rest of the install instructions @ +[TrevorS/bootstrap3-datetimepicker-rails](https://github.com/TrevorS/bootstrap3-datetimepicker-rails) + +Done! [Now take a look at the manual](http://eonasdan.github.io/bootstrap-datetimepicker/) for examples and available options. ## Manual installation @@ -44,51 +74,75 @@ Done! [Now take a look at the manual](http://eonasdan.github.io/bootstrap-dateti ### [Moment.js](https://github.com/moment/moment) Datetimepicker requires moment.js. This allows for better support for various date formats and locales. See [documentation](http://eonasdan.github.io/bootstrap-datetimepicker/) for examples. Check [Momentjs' homepage](http://momentjs.com/) for documentation on date formats. If you can't use moment.js there's still older version of datetimewidget [available here](https://github.com/Eonasdan/bootstrap-datetimepicker/tree/version1). -````html +```html -```` +``` ### Bootstrap 3 collapse and transition plugins Make sure to include *.JS files for plugins [collapse](http://getbootstrap.com/javascript/#collapse) and [transitions](http://getbootstrap.com/javascript/#transitions). They are included with [bootstrap in js/ directory](https://github.com/twbs/bootstrap/tree/master/js) -````html +```html -```` +``` Alternatively you could include the whole bundle of bootstrap plugins from [bootstrap.js](https://github.com/twbs/bootstrap/tree/master/dist/js) -````html +```html -```` +``` ### CSS styles #### Using LESS -````css -@import "/path/to/bootstrap/variables"; +```css +@import "/path/to/bootstrap/less/variables"; @import "/path/to/bootstrap-datetimepicker/src/less/bootstrap-datetimepicker"; // [...] your custom styles and variables -```` - -##### LESS Build File -You can also build `/path/to/bootstrap-datetimepicker/bootstrap-datetimepicker-build.less` to pull in Bootstraps `variables` file +``` #### Using CSS (default color palette) -````html +```html -```` +``` ### Main JS file Finally include the main javascript file. -````html +```html -```` +``` # Change Log +## 3.0.0 - updates to the docs are coming soon +## **Breaking changes in this update! Pay attention!!** +* Fix for #170, #179, #183: Changed event to `dp.-` options load as `data-date-OPTION` instead of `data-OPTION`. This should fix the double change event firing. +* Fix for #192: `setDate` now fires `dp.change` +* Fix for #182: Picker will **not** set the default date if the input field has a value +* Fix for #169: Seconds doesn't get reset when changing the date (Thanks to PR #174) +* Fix for #168 z-index fix for BS modal +* Fix for #155 Picker properly displays the active year and month +* Fix for #154 CSS update to fix the collapse jump +* Fix for #150 and #75 `minViewMode` and `viewMode` work properly +* Fix for #44 Finally! It's here!! Thanks to @ruiwei and his code on #210 picker will adjust the positioning of the widget. + +#### **Manually merged PR** +* #178 When using `minuteStepping` the minute select grid will only show available steppings +* #195, #197 Using the `data-OPTION` has been changed to `data-date-OPTION`. These options are expected to be on the `input-group` if you're using the `form-group` **or** the input field +* #184 The option `sideBySide` change be used to display both the d and the timepicker side by side + +#### **Other Changes** +* Changed picker width to 300px if using seconds and am/pm +* Added option `useCurrent`, thanks to @ruiwei. When true, picker will set the value to the current date/time (respects picker's format) +* Added option `showToday`, thanks to @ruiwei. When true, picker will display a small arrow to indicate today's date. +* Changed `startDate` to `minDate` and `endDate` to `maxDate` to make it more clear what these options do. + +## 2.1.32 (Hotfix) + +* Fix for #151: When a bad date value or the picker is cleared, the plugin will not longer attempt to reset it back to the previous date +* Fix for #140: `setDate` can be given `null` to force clear the picker ## 2.1.30 #### Important! `build.less` file name has been been changed to `bootstrap-datetimepicker-build.less` to prevent collisions @@ -134,8 +188,3 @@ Finally include the main javascript file. * `disabledDates` is now an option to set the disabled dates. It accepts date objects like `new Date("November 12, 2013 00:00:00")` and `12/25/2013' and `moment` date objects. See [Example#7](http://eonasdan.github.io/bootstrap-datetimepicker/#example7) for usage. * Events are easier to use; see [Example#8](http://eonasdan.github.io/bootstrap-datetimepicker/#example8) -###Removed features -* pickSeconds -* pick12HourFormat -* maskInput - diff --git a/bower.json b/bower.json index 56eebb7c6..bd8d69dae 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "eonasdan-bootstrap-datetimepicker", - "version": "2.2.20", + "version": "2.2.22", "main": [ "build/css/bootstrap-datetimepicker.min.css", "build/js/bootstrap-datetimepicker.min.js" diff --git a/build/css/bootstrap-datetimepicker.css b/build/css/bootstrap-datetimepicker.css index c242d7384..1fe4e64ec 100644 --- a/build/css/bootstrap-datetimepicker.css +++ b/build/css/bootstrap-datetimepicker.css @@ -1,13 +1,6 @@ -/** - * Build file for the dist version of datetimepicker.css - */ /*! * Datetimepicker for Bootstrap v3 * https://github.com/Eonasdan/bootstrap-datetimepicker/ - * Copyright 2012 Stefan Petre - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * */ .bootstrap-datetimepicker-widget { top: 0; @@ -15,16 +8,13 @@ width: 250px; padding: 4px; margin-top: 1px; - z-index: 99999; + z-index: 99999 !important; border-radius: 4px; - /*.dow { - border-top: 1px solid #ddd !important; - }*/ } -.bootstrap-datetimepicker-widget .btn { - padding: 6px; +.bootstrap-datetimepicker-widget.timepicker-sbs { + width: 600px; } -.bootstrap-datetimepicker-widget:before { +.bootstrap-datetimepicker-widget.bottom:before { content: ''; display: inline-block; border-left: 7px solid transparent; @@ -33,9 +23,9 @@ border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; - left: 6px; + left: 7px; } -.bootstrap-datetimepicker-widget:after { +.bootstrap-datetimepicker-widget.bottom:after { content: ''; display: inline-block; border-left: 6px solid transparent; @@ -43,8 +33,32 @@ border-bottom: 6px solid white; position: absolute; top: -6px; + left: 8px; +} +.bootstrap-datetimepicker-widget.top:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + position: absolute; + bottom: -7px; + left: 6px; +} +.bootstrap-datetimepicker-widget.top:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid white; + position: absolute; + bottom: -6px; left: 7px; } +.bootstrap-datetimepicker-widget .dow { + width: 14.2857%; +} .bootstrap-datetimepicker-widget.pull-right:before { left: auto; right: 6px; @@ -97,12 +111,28 @@ .bootstrap-datetimepicker-widget td.new { color: #999999; } +.bootstrap-datetimepicker-widget td.today { + position: relative; +} +.bootstrap-datetimepicker-widget td.today:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-bottom: 7px solid #428bca; + border-top-color: rgba(0, 0, 0, 0.2); + position: absolute; + bottom: 4px; + right: 4px; +} .bootstrap-datetimepicker-widget td.active, .bootstrap-datetimepicker-widget td.active:hover { background-color: #428bca; color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } +.bootstrap-datetimepicker-widget td.active.today:before { + border-bottom-color: #fff; +} .bootstrap-datetimepicker-widget td.disabled, .bootstrap-datetimepicker-widget td.disabled:hover { background: none; @@ -169,6 +199,6 @@ left: auto; right: 7px; } -.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td { +.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td { padding: 0px !important; } diff --git a/build/css/bootstrap-datetimepicker.min.css b/build/css/bootstrap-datetimepicker.min.css index 72846afe3..c685f7bf1 100644 --- a/build/css/bootstrap-datetimepicker.min.css +++ b/build/css/bootstrap-datetimepicker.min.css @@ -1,8 +1,5 @@ /*! * Datetimepicker for Bootstrap v3 * https://github.com/Eonasdan/bootstrap-datetimepicker/ - * Copyright 2012 Stefan Petre - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - */.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999;border-radius:4px}.bootstrap-datetimepicker-widget .btn{padding:6px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li.in div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0 !important} \ No newline at end of file + */ +.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} \ No newline at end of file diff --git a/build/js/bootstrap-datetimepicker.min.js b/build/js/bootstrap-datetimepicker.min.js index 5b33d3221..7f1c4ba3a 100644 --- a/build/js/bootstrap-datetimepicker.min.js +++ b/build/js/bootstrap-datetimepicker.min.js @@ -1,28 +1 @@ -/** - * version 2.1.30 - * @license - * ========================================================= - * bootstrap-datetimepicker.js - * http://www.eyecon.ro/bootstrap-datepicker - * ========================================================= - * Copyright 2012 Stefan Petre - * - * Contributions: - * - updated for Bootstrap v3 by Jonathan Peterson (@Eonasdan) and (almost) - * completely rewritten to use Momentjs - * - based on tarruda's bootstrap-datepicker - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= - */ -(function(a){if(typeof define==="function"&&define.amd){define(["jquery","moment"],a)}else{if(!jQuery){throw"bootstrap-datetimepicker requires jQuery to be loaded first"}else{if(!moment){throw"bootstrap-datetimepicker requires moment.js to be loaded first"}else{a(jQuery,moment)}}}}(function(d,e){if(typeof e==="undefined"){alert("momentjs is requried");throw new Error("momentjs is required")}var c=0,a=e,b=function(o,q){var z={pickDate:true,pickTime:true,useMinutes:true,useSeconds:false,minuteStepping:1,startDate:new a({y:1970}),endDate:new a().add(50,"y"),collapse:true,language:a.lang(),defaultDate:"",disabledDates:[],enabledDates:false,icons:{},useStrict:false,direction:"auto"},M={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},l=this,I=function(){var S=false,R,T,Q;l.options=d.extend({},z,q);l.options.icons=d.extend({},M,l.options.icons);l.element=d(o);f();if(!(l.options.pickTime||l.options.pickDate)){throw new Error("Must choose at least one picker")}l.id=c++;a.lang(l.options.language);l.date=a();l.unset=false;l.isInput=l.element.is("input");l.component=false;if(l.element.hasClass("input-group")){if(l.element.find(".datepickerbutton").size()==0){l.component=l.element.find("[class^='input-group-']")}else{l.component=l.element.find(".datepickerbutton")}}l.format=l.options.format;Q=a()._lang._longDateFormat;if(!l.format){if(l.isInput){l.format=l.element.data("format")}else{l.format=l.element.find("input").data("format")}if(!l.format){l.format=(l.options.pickDate?Q.L:"");if(l.options.pickDate&&l.options.pickTime){l.format+=" "}l.format+=(l.options.pickTime?Q.LT:"");if(l.options.useSeconds){if(~Q.LT.indexOf(" A")){l.format=l.format.split(" A")[0]+":ss A"}else{l.format+=":ss"}}}}l.options.use24hours=l.format.toLowerCase().indexOf("a")<1;if(l.component){S=l.component.find("span")}if(l.options.pickTime){if(S){S.addClass(l.options.icons.time)}}if(l.options.pickDate){if(S){S.removeClass(l.options.icons.time);S.addClass(l.options.icons.date)}}l.widget=d(P(l.options.pickDate,l.options.pickTime,l.options.collapse)).appendTo("body");l.minViewMode=l.options.minViewMode||l.element.data("date-minviewmode")||0;if(typeof l.minViewMode==="string"){switch(l.minViewMode){case"months":l.minViewMode=1;break;case"years":l.minViewMode=2;break;default:l.minViewMode=0;break}}l.viewMode=l.options.viewMode||l.element.data("date-viewmode")||0;if(typeof l.viewMode==="string"){switch(l.viewMode){case"months":l.viewMode=1;break;case"years":l.viewMode=2;break;default:l.viewMode=0;break}}for(R=0;R