From b93426f51ee6305abbe80f05ff3fc1b7bc1d9b0f Mon Sep 17 00:00:00 2001 From: Chen Fengyuan Date: Tue, 30 May 2017 11:42:55 +0800 Subject: [PATCH] Release v0.5.3 --- CHANGELOG.md | 6 +++++ dist/datepicker.css | 4 +-- dist/datepicker.js | 50 +++++++++++++++++++++++++++---------- dist/datepicker.min.css | 4 +-- dist/datepicker.min.js | 6 ++--- docs/css/datepicker.css | 4 +-- docs/css/datepicker.min.css | 4 +-- docs/index.html | 8 ++++-- docs/js/datepicker.ca-ES.js | 25 +++++++++++++++++++ docs/js/datepicker.es-ES.js | 2 +- docs/js/datepicker.fr-FR.js | 16 ++++++------ docs/js/datepicker.js | 50 +++++++++++++++++++++++++++---------- docs/js/datepicker.min.js | 6 ++--- package.json | 2 +- 14 files changed, 135 insertions(+), 52 deletions(-) create mode 100644 docs/js/datepicker.ca-ES.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fcad18..4f98a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +## 0.5.3 (May 30, 2017) + +- Highlight the current year and month. +- Highlight the picked year and month. + + ## 0.5.2 (Apr 8, 2017) - Fixed year and month picking issue. diff --git a/dist/datepicker.css b/dist/datepicker.css index 868badb..d25bc8f 100644 --- a/dist/datepicker.css +++ b/dist/datepicker.css @@ -1,11 +1,11 @@ /*! - * Datepicker v0.5.2 + * Datepicker v0.5.3 * https://github.com/fengyuanchen/datepicker * * Copyright (c) 2014-2017 Fengyuan Chen * Released under the MIT license * - * Date: 2017-04-08T12:04:53.399Z + * Date: 2017-05-30T03:33:52.900Z */ .datepicker-container { font-size: 12px; diff --git a/dist/datepicker.js b/dist/datepicker.js index 08c265d..51fbcfa 100644 --- a/dist/datepicker.js +++ b/dist/datepicker.js @@ -1,11 +1,11 @@ /*! - * Datepicker v0.5.2 + * Datepicker v0.5.3 * https://github.com/fengyuanchen/datepicker * * Copyright (c) 2014-2017 Fengyuan Chen * Released under the MIT license * - * Date: 2017-04-08T12:04:43.796Z + * Date: 2017-05-30T03:33:51.775Z */ (function (factory) { @@ -534,6 +534,8 @@ var viewYear = viewDate.getFullYear(); var viewMonth = viewDate.getMonth(); var viewDay = viewDate.getDate(); + var now = new Date(); + var thisYear = now.getFullYear(); var date = this.date; var year = date.getFullYear(); var isPrevDisabled = false; @@ -577,7 +579,8 @@ view: isDisabled ? 'year disabled' : isPicked ? 'year picked' : 'year', muted: isMuted, picked: isPicked, - disabled: isDisabled + disabled: isDisabled, + highlighted: date.getFullYear() === thisYear }); } @@ -599,6 +602,9 @@ var viewDate = this.viewDate; var viewYear = viewDate.getFullYear(); var viewDay = viewDate.getDate(); + var now = new Date(); + var thisYear = now.getFullYear(); + var thisMonth = now.getMonth(); var date = this.date; var year = date.getFullYear(); var month = date.getMonth(); @@ -633,7 +639,8 @@ text: months[i], view: isDisabled ? 'month disabled' : isPicked ? 'month picked' : 'month', picked: isPicked, - disabled: isDisabled + disabled: isDisabled, + highlighted: viewYear === thisYear && date.getMonth() === thisMonth }); } @@ -712,6 +719,7 @@ for (i = length - (n - 1); i <= length; i++) { date = new Date(prevViewYear, prevViewMonth, i); + isPicked = prevViewYear === year && prevViewMonth === month && i === day; isDisabled = false; if (startDate) { @@ -726,6 +734,7 @@ text: i, view: 'day prev', muted: true, + picked: isPicked, disabled: isDisabled, highlighted: prevViewYear === thisYear && prevViewMonth === thisMonth && date.getDate() === today })); @@ -756,6 +765,7 @@ for (i = 1; i <= n; i++) { date = new Date(nextViewYear, nextViewMonth, i); + isPicked = nextViewYear === year && nextViewMonth === month && i === day; isDisabled = false; if (endDate) { @@ -770,6 +780,7 @@ text: i, view: 'day next', muted: true, + picked: isPicked, disabled: isDisabled, highlighted: nextViewYear === thisYear && nextViewMonth === thisMonth && date.getDate() === today })); @@ -821,6 +832,7 @@ click: function (e) { var $target = $(e.target); + var options = this.options; var viewDate = this.viewDate; var viewYear; var viewMonth; @@ -871,7 +883,6 @@ break; case 'year current': - if (this.format.hasYear) { this.showView(2); } @@ -879,10 +890,12 @@ break; case 'year picked': - if (this.format.hasMonth) { this.showView(1); } else { + $target.addClass(options.pickedClass) + .siblings() + .removeClass(options.pickedClass); this.hideView(); } @@ -892,11 +905,14 @@ case 'year': viewYear = parseInt($target.text(), 10); this.date = new Date(viewYear, viewMonth, min(viewDay, 28)); - this.viewDate = new Date(viewYear, viewMonth, min(viewDay, 28)); if (this.format.hasMonth) { + this.viewDate = new Date(viewYear, viewMonth, min(viewDay, 28)); this.showView(1); } else { + $target.addClass(options.pickedClass) + .siblings() + .removeClass(options.pickedClass); this.hideView(); } @@ -911,7 +927,6 @@ break; case 'month current': - if (this.format.hasMonth) { this.showView(1); } @@ -919,10 +934,12 @@ break; case 'month picked': - if (this.format.hasDay) { this.showView(0); } else { + $target.addClass(options.pickedClass) + .siblings() + .removeClass(options.pickedClass); this.hideView(); } @@ -930,13 +947,16 @@ break; case 'month': - viewMonth = $.inArray($target.text(), this.options.monthsShort); + viewMonth = $.inArray($target.text(), options.monthsShort); this.date = new Date(viewYear, viewMonth, min(viewDay, 28)); - this.viewDate = new Date(viewYear, viewMonth, min(viewDay, 28)); if (this.format.hasDay) { + this.viewDate = new Date(viewYear, viewMonth, min(viewDay, 28)); this.showView(0); } else { + $target.addClass(options.pickedClass) + .siblings() + .removeClass(options.pickedClass); this.hideView(); } @@ -949,8 +969,9 @@ viewMonth = view === 'day prev' ? viewMonth - 1 : view === 'day next' ? viewMonth + 1 : viewMonth; viewDay = parseInt($target.text(), 10); this.date = new Date(viewYear, viewMonth, viewDay); - this.viewDate = new Date(viewYear, viewMonth, viewDay); - this.fillDays(); + $target.addClass(options.pickedClass) + .siblings() + .removeClass(options.pickedClass); if (view === 'day') { this.hideView(); @@ -960,6 +981,9 @@ break; case 'day picked': + $target.addClass(options.pickedClass) + .siblings() + .removeClass(options.pickedClass); this.hideView(); this.pick('day'); break; diff --git a/dist/datepicker.min.css b/dist/datepicker.min.css index 985453a..45effa4 100644 --- a/dist/datepicker.min.css +++ b/dist/datepicker.min.css @@ -1,9 +1,9 @@ /*! - * Datepicker v0.5.2 + * Datepicker v0.5.3 * https://github.com/fengyuanchen/datepicker * * Copyright (c) 2014-2017 Fengyuan Chen * Released under the MIT license * - * Date: 2017-04-08T12:04:53.399Z + * Date: 2017-05-30T03:33:52.900Z */.datepicker-container{font-size:12px;line-height:30px;position:fixed;z-index:-1;top:0;left:0;width:210px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;direction:ltr!important;-ms-touch-action:none;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.datepicker-container:after,.datepicker-container:before{position:absolute;display:block;width:0;height:0;content:' ';border:5px solid transparent}.datepicker-dropdown{position:absolute;z-index:1;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;border:1px solid #ccc;-webkit-box-shadow:0 3px 6px #ccc;box-shadow:0 3px 6px #ccc}.datepicker-inline{position:static}.datepicker-top-left,.datepicker-top-right{border-top-color:#39f}.datepicker-top-left:after,.datepicker-top-left:before,.datepicker-top-right:after,.datepicker-top-right:before{top:-5px;left:10px;border-top:0}.datepicker-top-left:before,.datepicker-top-right:before{border-bottom-color:#39f}.datepicker-top-left:after,.datepicker-top-right:after{top:-4px;border-bottom-color:#fff}.datepicker-bottom-left,.datepicker-bottom-right{border-bottom-color:#39f}.datepicker-bottom-left:after,.datepicker-bottom-left:before,.datepicker-bottom-right:after,.datepicker-bottom-right:before{bottom:-5px;left:10px;border-bottom:0}.datepicker-bottom-left:before,.datepicker-bottom-right:before{border-top-color:#39f}.datepicker-bottom-left:after,.datepicker-bottom-right:after{bottom:-4px;border-top-color:#fff}.datepicker-bottom-right:after,.datepicker-bottom-right:before,.datepicker-top-right:after,.datepicker-top-right:before{right:10px;left:auto}.datepicker-panel>ul:after,.datepicker-panel>ul:before{display:table;content:' '}.datepicker-panel>ul:after{clear:both}.datepicker-panel>ul{width:102%;margin:0;padding:0}.datepicker-panel>ul>li{float:left;width:30px;height:30px;margin:0;padding:0;list-style:none;cursor:pointer;text-align:center;background-color:#fff}.datepicker-panel>ul>li.highlighted,.datepicker-panel>ul>li:hover{background-color:#e6f2ff}.datepicker-panel>ul>li.muted,.datepicker-panel>ul>li.muted:hover{color:#999}.datepicker-panel>ul>li.highlighted:hover{background-color:#cce6ff}.datepicker-panel>ul>li.picked,.datepicker-panel>ul>li.picked:hover{color:#39f}.datepicker-panel>ul>li.disabled,.datepicker-panel>ul>li.disabled:hover{cursor:default;color:#ccc;background-color:#fff}.datepicker-panel>ul>li.disabled.highlighted,.datepicker-panel>ul>li.disabled:hover.highlighted{background-color:#e6f2ff}.datepicker-panel>ul>li[data-view='years prev'],.datepicker-panel>ul>li[data-view='year prev'],.datepicker-panel>ul>li[data-view='month prev'],.datepicker-panel>ul>li[data-view='years next'],.datepicker-panel>ul>li[data-view='year next'],.datepicker-panel>ul>li[data-view='month next'],.datepicker-panel>ul>li[data-view=next]{font-size:18px}.datepicker-panel>ul>li[data-view='month current'],.datepicker-panel>ul>li[data-view='years current'],.datepicker-panel>ul>li[data-view='year current']{width:150px}.datepicker-panel>ul[data-view=years]>li,.datepicker-panel>ul[data-view=months]>li{line-height:52.5px;width:52.5px;height:52.5px}.datepicker-panel>ul[data-view=week]>li,.datepicker-panel>ul[data-view=week]>li:hover{cursor:default;background-color:#fff}.datepicker-hide{display:none} \ No newline at end of file diff --git a/dist/datepicker.min.js b/dist/datepicker.min.js index fdaaf2b..f5562b0 100644 --- a/dist/datepicker.min.js +++ b/dist/datepicker.min.js @@ -1,10 +1,10 @@ /*! - * Datepicker v0.5.2 + * Datepicker v0.5.3 * https://github.com/fengyuanchen/datepicker * * Copyright (c) 2014-2017 Fengyuan Chen * Released under the MIT license * - * Date: 2017-04-08T12:04:43.796Z + * Date: 2017-05-30T03:33:51.775Z */ -!function(t){"function"==typeof define&&define.amd?define("datepicker",["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){"use strict";function e(t){return $.call(t).slice(8,-1).toLowerCase()}function i(t){return"string"==typeof t}function s(t){return"number"==typeof t&&!isNaN(t)}function a(t){return void 0===t}function n(t){return"date"===e(t)}function h(t,e){var i=[];return Array.from?Array.from(t).slice(e||0):(s(e)&&i.push(e),i.slice.apply(t,i))}function r(t,e){var i=h(arguments,2);return function(){return t.apply(e,i.concat(h(arguments)))}}function o(t){return t%4==0&&t%100!=0||t%400==0}function l(t,e){return[31,o(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}function d(t){var e,i,s=String(t).toLowerCase(),a=s.match(m);if(!a||0===a.length)throw new Error("Invalid date format.");for(t={source:s,parts:a},e=a.length,i=0;ia.getTime()&&(n=new Date(a)),this.endDate=a),this.date=n,this.viewDate=new Date(n),this.initialDate=new Date(this.date),this.bind(),(e.autoShow||this.isInline)&&this.show(),e.autoPick&&this.pick()},build:function(){var e,i=this.options,s=this.$element;this.isBuilt||(this.isBuilt=!0,this.$picker=e=t(i.template),this.$week=e.find('[data-view="week"]'),this.$yearsPicker=e.find('[data-view="years picker"]'),this.$yearsPrev=e.find('[data-view="years prev"]'),this.$yearsNext=e.find('[data-view="years next"]'),this.$yearsCurrent=e.find('[data-view="years current"]'),this.$years=e.find('[data-view="years"]'),this.$monthsPicker=e.find('[data-view="months picker"]'),this.$yearPrev=e.find('[data-view="year prev"]'),this.$yearNext=e.find('[data-view="year next"]'),this.$yearCurrent=e.find('[data-view="year current"]'),this.$months=e.find('[data-view="months"]'),this.$daysPicker=e.find('[data-view="days picker"]'),this.$monthPrev=e.find('[data-view="month prev"]'),this.$monthNext=e.find('[data-view="month next"]'),this.$monthCurrent=e.find('[data-view="month current"]'),this.$days=e.find('[data-view="days"]'),this.isInline?t(i.container||s).append(e.addClass("datepicker-inline")):(t(p.body).append(e.addClass("datepicker-dropdown")),e.addClass(D)),this.fillWeek())},unbuild:function(){this.isBuilt&&(this.isBuilt=!1,this.$picker.remove())},bind:function(){var e=this.options,i=this.$element;t.isFunction(e.show)&&i.on("show.datepicker",e.show),t.isFunction(e.hide)&&i.on("hide.datepicker",e.hide),t.isFunction(e.pick)&&i.on("pick.datepicker",e.pick),this.isInput&&i.on("keyup.datepicker",t.proxy(this.keyup,this)),this.isInline||(e.trigger?this.$trigger.on(y,t.proxy(this.toggle,this)):this.isInput?i.on("focus.datepicker",t.proxy(this.show,this)):i.on(y,t.proxy(this.show,this)))},unbind:function(){var e=this.options,i=this.$element;t.isFunction(e.show)&&i.off("show.datepicker",e.show),t.isFunction(e.hide)&&i.off("hide.datepicker",e.hide),t.isFunction(e.pick)&&i.off("pick.datepicker",e.pick),this.isInput&&i.off("keyup.datepicker",this.keyup),this.isInline||(e.trigger?this.$trigger.off(y,this.toggle):this.isInput?i.off("focus.datepicker",this.show):i.off(y,this.show))},showView:function(t){var e=this.$yearsPicker,i=this.$monthsPicker,s=this.$daysPicker,a=this.format;if(a.hasYear||a.hasMonth||a.hasDay)switch(g(t)){case 2:case"years":i.addClass(D),s.addClass(D),a.hasYear?(this.fillYears(),e.removeClass(D),this.place()):this.showView(0);break;case 1:case"months":e.addClass(D),s.addClass(D),a.hasMonth?(this.fillMonths(),i.removeClass(D),this.place()):this.showView(2);break;default:e.addClass(D),i.addClass(D),a.hasDay?(this.fillDays(),s.removeClass(D),this.place()):this.showView(1)}},hideView:function(){!this.isInline&&this.options.autoHide&&this.hide()},place:function(){if(!this.isInline){var t=this.options,e=this.$element,i=this.$picker,s=f.outerWidth(),a=f.outerHeight(),n=e.outerWidth(),h=e.outerHeight(),r=i.width(),o=i.height(),l=e.offset(),d=l.left,c=l.top,u=parseFloat(t.offset)||10,p="datepicker-top-left";c>o&&c+h+o>a?(c-=o+u,p="datepicker-bottom-left"):c+=h+u,d+r>s&&(d=d+n-r,p=p.replace("left","right")),i.removeClass(v).addClass(p).css({top:c,left:d,zIndex:parseInt(t.zIndex,10)})}},trigger:function(e,i){var s=t.Event(e,i);return this.$element.trigger(s),s},createItem:function(e){var i=this.options,s=i.itemTag,a={text:"",view:"",muted:!1,picked:!1,disabled:!1,highlighted:!1},n=[];return t.extend(a,e),a.muted&&n.push(i.mutedClass),a.highlighted&&n.push(i.highlightedClass),a.picked&&n.push(i.pickedClass),a.disabled&&n.push(i.disabledClass),"<"+s+' class="'+n.join(" ")+'"'+(a.view?' data-view="'+a.view+'"':"")+">"+a.text+""},fillAll:function(){this.fillYears(),this.fillMonths(),this.fillDays()},fillWeek:function(){var e,i=this.options,s=parseInt(i.weekStart,10)%7,a=i.daysMin,n="";for(a=t.merge(a.slice(s),a.slice(0,s)),e=0;e<=6;e++)n+=this.createItem({text:a[e]});this.$week.html(n)},fillYears:function(){var e,i=this.options,s=i.disabledClass||"",a=i.yearSuffix||"",n=t.isFunction(i.filter)&&i.filter,h=this.startDate,r=this.endDate,o=this.viewDate,l=o.getFullYear(),d=o.getMonth(),c=o.getDate(),u=this.date,p=u.getFullYear(),f=!1,g=!1,w=!1,y=!1,m=!1,k="";for(e=-5;e<=6;e++)u=new Date(l+e,d,c),m=e===-5||6===e,y=l+e===p,w=!1,h&&(w=u.getFullYear()r.getFullYear(),6===e&&(g=w)),!w&&n&&(w=n.call(this.$element,u)===!1),k+=this.createItem({text:l+e,view:w?"year disabled":y?"year picked":"year",muted:m,picked:y,disabled:w});this.$yearsPrev.toggleClass(s,f),this.$yearsNext.toggleClass(s,g),this.$yearsCurrent.toggleClass(s,!0).html(l+-5+a+" - "+(l+6)+a),this.$years.html(k)},fillMonths:function(){var e,i=this.options,s=i.disabledClass||"",a=i.monthsShort,n=t.isFunction(i.filter)&&i.filter,h=this.startDate,r=this.endDate,o=this.viewDate,l=o.getFullYear(),d=o.getDate(),c=this.date,u=c.getFullYear(),p=c.getMonth(),f=!1,g=!1,w=!1,y=!1,m="";for(e=0;e<=11;e++)c=new Date(l,e,d),y=l===u&&e===p,w=!1,h&&(f=c.getFullYear()===h.getFullYear(),w=f&&c.getMonth()r.getMonth()),!w&&n&&(w=n.call(this.$element,c)===!1),m+=this.createItem({index:e,text:a[e],view:w?"month disabled":y?"month picked":"month",picked:y,disabled:w});this.$yearPrev.toggleClass(s,f),this.$yearNext.toggleClass(s,g),this.$yearCurrent.toggleClass(s,f&&g).html(l+i.yearSuffix||""),this.$months.html(m)},fillDays:function(){var e,i,s,a=this.options,n=a.disabledClass||"",h=a.yearSuffix||"",r=a.monthsShort,o=parseInt(a.weekStart,10)%7,d=t.isFunction(a.filter)&&a.filter,c=this.startDate,u=this.endDate,p=this.viewDate,f=p.getFullYear(),g=p.getMonth(),w=f,y=g,m=f,k=new Date,v=k.getFullYear(),D=k.getMonth(),b=k.getDate(),$=g,x=this.date,C=x.getFullYear(),S=x.getMonth(),F=x.getDate(),I=!1,M=!1,V=!1,T=!1,Y=[],A=[],P=[];for(0===g?(w-=1,y=11):y-=1,e=l(w,y),x=new Date(f,g,1),s=x.getDay()-o,s<=0&&(s+=7),c&&(I=x.getTime()<=c.getTime()),i=e-(s-1);i<=e;i++)x=new Date(w,y,i),V=!1,c&&(V=x.getTime()=u.getTime()),i=1;i<=s;i++)x=new Date(m,$,i),V=!1,u&&(V=x.getTime()>u.getTime()),!V&&d&&(V=d.call(this.$element,x)===!1),A.push(this.createItem({text:i,view:"day next",muted:!0,disabled:V,highlighted:m===v&&$===D&&x.getDate()===b}));for(i=1;i<=e;i++)x=new Date(f,g,i),T=f===C&&g===S&&i===F,V=!1,c&&(V=x.getTime()u.getTime()),!V&&d&&(V=d.call(this.$element,x)===!1),P.push(this.createItem({text:i,view:V?"day disabled":T?"day picked":"day",picked:T,disabled:V,highlighted:f===v&&g===D&&x.getDate()===b}));this.$monthPrev.toggleClass(n,I),this.$monthNext.toggleClass(n,M),this.$monthCurrent.toggleClass(n,I&&M).html(a.yearFirst?f+h+" "+r[g]:r[g]+" "+f+h),this.$days.html(Y.join("")+P.join(" ")+A.join(""))},click:function(e){var i,s,a,n,h,r,o=t(e.target),l=this.viewDate;if(e.stopPropagation(),e.preventDefault(),!o.hasClass("disabled"))switch(i=l.getFullYear(),s=l.getMonth(),a=l.getDate(),r=o.data("view")){case"years prev":case"years next":i="years prev"===r?i-10:i+10,h=o.text(),n=k.test(h),n&&(i=parseInt(h,10),this.date=new Date(i,s,b(a,28))),this.viewDate=new Date(i,s,b(a,28)),this.fillYears(),n&&(this.showView(1),this.pick("year"));break;case"year prev":case"year next":i="year prev"===r?i-1:i+1,this.viewDate=new Date(i,s,b(a,28)),this.fillMonths();break;case"year current":this.format.hasYear&&this.showView(2);break;case"year picked":this.format.hasMonth?this.showView(1):this.hideView(),this.pick("year");break;case"year":i=parseInt(o.text(),10),this.date=new Date(i,s,b(a,28)),this.viewDate=new Date(i,s,b(a,28)),this.format.hasMonth?this.showView(1):this.hideView(),this.pick("year");break;case"month prev":case"month next":s="month prev"===r?s-1:"month next"===r?s+1:s,this.viewDate=new Date(i,s,b(a,28)),this.fillDays();break;case"month current":this.format.hasMonth&&this.showView(1);break;case"month picked":this.format.hasDay?this.showView(0):this.hideView(),this.pick("month");break;case"month":s=t.inArray(o.text(),this.options.monthsShort),this.date=new Date(i,s,b(a,28)),this.viewDate=new Date(i,s,b(a,28)),this.format.hasDay?this.showView(0):this.hideView(),this.pick("month");break;case"day prev":case"day next":case"day":s="day prev"===r?s-1:"day next"===r?s+1:s,a=parseInt(o.text(),10),this.date=new Date(i,s,a),this.viewDate=new Date(i,s,a),this.fillDays(),"day"===r&&this.hideView(),this.pick("day");break;case"day picked":this.hideView(),this.pick("day")}},clickDoc:function(t){for(var e,i=t.target,s=this.$element[0],a=this.$trigger[0];i!==p;){if(i===a||i===s){e=!0;break}i=i.parentNode}e||this.hide()},keyup:function(){this.update()},keyupDoc:function(t){this.isInput&&t.target!==this.$element[0]&&this.isShown&&("Tab"===t.key||9===t.keyCode)&&this.hide()},getValue:function(){var t=this.$element,e="";return this.isInput?e=t.val():this.isInline?this.options.container&&(e=t.text()):e=t.text(),e},setValue:function(t){var e=this.$element;t=i(t)?t:"",this.isInput?e.val(t):this.isInline?this.options.container&&e.text(t):e.text(t)},show:function(){this.isBuilt||this.build(),this.isShown||this.trigger("show.datepicker").isDefaultPrevented()||(this.isShown=!0,this.$picker.removeClass(D).on(y,t.proxy(this.click,this)),this.showView(this.options.startView),this.isInline||(u.on("resize.datepicker",this._place=r(this.place,this)),f.on(y,this._clickDoc=r(this.clickDoc,this)),f.on("keyup.datepicker",this._keyupDoc=r(this.keyupDoc,this)),this.place()))},hide:function(){this.isShown&&(this.trigger("hide.datepicker").isDefaultPrevented()||(this.isShown=!1,this.$picker.addClass(D).off(y,this.click),this.isInline||(u.off("resize.datepicker",this._place),f.off(y,this._clickDoc),f.off("keyup.datepicker",this._keyupDoc))))},toggle:function(){this.isShown?this.hide():this.show()},update:function(){var t=this.getValue();t!==this.oldValue&&(this.setDate(t,!0),this.oldValue=t)},pick:function(t){var e=this.$element,i=this.date;this.trigger("pick.datepicker",{view:t||"",date:i}).isDefaultPrevented()||(this.setValue(i=this.formatDate(this.date)),this.isInput&&e.trigger("change"))},reset:function(){this.setDate(this.initialDate,!0),this.setValue(this.initialValue),this.isShown&&this.showView(this.options.startView)},getMonthName:function(e,i){var n=this.options,h=n.months;return t.isNumeric(e)?e=g(e):a(i)&&(i=e),i===!0&&(h=n.monthsShort),h[s(e)?e:this.date.getMonth()]},getDayName:function(e,i,n){var h=this.options,r=h.days;return t.isNumeric(e)?e=g(e):(a(n)&&(n=i),a(i)&&(i=e)),r=n===!0?h.daysMin:i===!0?h.daysShort:r,r[s(e)?e:this.date.getDay()]},getDate:function(t){var e=this.date;return t?this.formatDate(e):new Date(e)},setDate:function(e,s){var a=this.options.filter;if(n(e)||i(e)){if(e=this.parseDate(e),t.isFunction(a)&&a.call(this.$element,e)===!1)return;this.date=e,this.viewDate=new Date(e),s||this.pick(),this.isBuilt&&this.fillAll()}},setStartDate:function(t){(n(t)||i(t))&&(this.startDate=this.parseDate(t),this.isBuilt&&this.fillAll())},setEndDate:function(t){(n(t)||i(t))&&(this.endDate=this.parseDate(t),this.isBuilt&&this.fillAll())},parseDate:function(t){var e,s,a,h,r,o,l=this.format,d=[];if(n(t))return new Date(t.getFullYear(),t.getMonth(),t.getDate());if(i(t)&&(d=t.match(/\d+/g)||[]),t=new Date,s=t.getFullYear(),a=t.getDate(),h=t.getMonth(),e=l.parts.length,d.length===e)for(o=0;o
          ',offset:10,zIndex:1e3,filter:null,show:null,hide:null,pick:null},c.setDefaults=function(e){e=t.isPlainObject(e)?e:{},e.language&&(e=t.extend({},c.LANGUAGES[e.language],e)),t.extend(c.DEFAULTS,e)},c.other=t.fn.datepicker,t.fn.datepicker=function(e){var s,n=h(arguments,1);return this.each(function(){var a,h,r=t(this),o=r.data(w);if(!o){if(/destroy/.test(e))return;a=t.extend({},r.data(),t.isPlainObject(e)&&e),r.data(w,o=new c(this,a))}i(e)&&t.isFunction(h=o[e])&&(s=h.apply(o,n))}),a(s)?this:s},t.fn.datepicker.Constructor=c,t.fn.datepicker.languages=c.LANGUAGES,t.fn.datepicker.setDefaults=c.setDefaults,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=c.other,this}}); \ No newline at end of file +!function(t){"function"==typeof define&&define.amd?define("datepicker",["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){"use strict";function e(t){return b.call(t).slice(8,-1).toLowerCase()}function i(t){return"string"==typeof t}function s(t){return"number"==typeof t&&!isNaN(t)}function a(t){return void 0===t}function n(t){return"date"===e(t)}function h(t,e){var i=[];return Array.from?Array.from(t).slice(e||0):(s(e)&&i.push(e),i.slice.apply(t,i))}function r(t,e){var i=h(arguments,2);return function(){return t.apply(e,i.concat(h(arguments)))}}function l(t){return t%4==0&&t%100!=0||t%400==0}function o(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}function d(t){var e,i,s=String(t).toLowerCase(),a=s.match(y);if(!a||0===a.length)throw new Error("Invalid date format.");for(t={source:s,parts:a},e=a.length,i=0;ia.getTime()&&(n=new Date(a)),this.endDate=a),this.date=n,this.viewDate=new Date(n),this.initialDate=new Date(this.date),this.bind(),(e.autoShow||this.isInline)&&this.show(),e.autoPick&&this.pick()},build:function(){var e,i=this.options,s=this.$element;this.isBuilt||(this.isBuilt=!0,this.$picker=e=t(i.template),this.$week=e.find('[data-view="week"]'),this.$yearsPicker=e.find('[data-view="years picker"]'),this.$yearsPrev=e.find('[data-view="years prev"]'),this.$yearsNext=e.find('[data-view="years next"]'),this.$yearsCurrent=e.find('[data-view="years current"]'),this.$years=e.find('[data-view="years"]'),this.$monthsPicker=e.find('[data-view="months picker"]'),this.$yearPrev=e.find('[data-view="year prev"]'),this.$yearNext=e.find('[data-view="year next"]'),this.$yearCurrent=e.find('[data-view="year current"]'),this.$months=e.find('[data-view="months"]'),this.$daysPicker=e.find('[data-view="days picker"]'),this.$monthPrev=e.find('[data-view="month prev"]'),this.$monthNext=e.find('[data-view="month next"]'),this.$monthCurrent=e.find('[data-view="month current"]'),this.$days=e.find('[data-view="days"]'),this.isInline?t(i.container||s).append(e.addClass("datepicker-inline")):(t(p.body).append(e.addClass("datepicker-dropdown")),e.addClass(D)),this.fillWeek())},unbuild:function(){this.isBuilt&&(this.isBuilt=!1,this.$picker.remove())},bind:function(){var e=this.options,i=this.$element;t.isFunction(e.show)&&i.on("show.datepicker",e.show),t.isFunction(e.hide)&&i.on("hide.datepicker",e.hide),t.isFunction(e.pick)&&i.on("pick.datepicker",e.pick),this.isInput&&i.on("keyup.datepicker",t.proxy(this.keyup,this)),this.isInline||(e.trigger?this.$trigger.on(m,t.proxy(this.toggle,this)):this.isInput?i.on("focus.datepicker",t.proxy(this.show,this)):i.on(m,t.proxy(this.show,this)))},unbind:function(){var e=this.options,i=this.$element;t.isFunction(e.show)&&i.off("show.datepicker",e.show),t.isFunction(e.hide)&&i.off("hide.datepicker",e.hide),t.isFunction(e.pick)&&i.off("pick.datepicker",e.pick),this.isInput&&i.off("keyup.datepicker",this.keyup),this.isInline||(e.trigger?this.$trigger.off(m,this.toggle):this.isInput?i.off("focus.datepicker",this.show):i.off(m,this.show))},showView:function(t){var e=this.$yearsPicker,i=this.$monthsPicker,s=this.$daysPicker,a=this.format;if(a.hasYear||a.hasMonth||a.hasDay)switch(g(t)){case 2:case"years":i.addClass(D),s.addClass(D),a.hasYear?(this.fillYears(),e.removeClass(D),this.place()):this.showView(0);break;case 1:case"months":e.addClass(D),s.addClass(D),a.hasMonth?(this.fillMonths(),i.removeClass(D),this.place()):this.showView(2);break;default:e.addClass(D),i.addClass(D),a.hasDay?(this.fillDays(),s.removeClass(D),this.place()):this.showView(1)}},hideView:function(){!this.isInline&&this.options.autoHide&&this.hide()},place:function(){if(!this.isInline){var t=this.options,e=this.$element,i=this.$picker,s=f.outerWidth(),a=f.outerHeight(),n=e.outerWidth(),h=e.outerHeight(),r=i.width(),l=i.height(),o=e.offset(),d=o.left,c=o.top,u=parseFloat(t.offset)||10,p="datepicker-top-left";c>l&&c+h+l>a?(c-=l+u,p="datepicker-bottom-left"):c+=h+u,d+r>s&&(d=d+n-r,p=p.replace("left","right")),i.removeClass(v).addClass(p).css({top:c,left:d,zIndex:parseInt(t.zIndex,10)})}},trigger:function(e,i){var s=t.Event(e,i);return this.$element.trigger(s),s},createItem:function(e){var i=this.options,s=i.itemTag,a={text:"",view:"",muted:!1,picked:!1,disabled:!1,highlighted:!1},n=[];return t.extend(a,e),a.muted&&n.push(i.mutedClass),a.highlighted&&n.push(i.highlightedClass),a.picked&&n.push(i.pickedClass),a.disabled&&n.push(i.disabledClass),"<"+s+' class="'+n.join(" ")+'"'+(a.view?' data-view="'+a.view+'"':"")+">"+a.text+""},fillAll:function(){this.fillYears(),this.fillMonths(),this.fillDays()},fillWeek:function(){var e,i=this.options,s=parseInt(i.weekStart,10)%7,a=i.daysMin,n="";for(a=t.merge(a.slice(s),a.slice(0,s)),e=0;e<=6;e++)n+=this.createItem({text:a[e]});this.$week.html(n)},fillYears:function(){var e,i=this.options,s=i.disabledClass||"",a=i.yearSuffix||"",n=t.isFunction(i.filter)&&i.filter,h=this.startDate,r=this.endDate,l=this.viewDate,o=l.getFullYear(),d=l.getMonth(),c=l.getDate(),u=new Date,p=u.getFullYear(),f=this.date,g=f.getFullYear(),w=!1,m=!1,y=!1,k=!1,v=!1,D="";for(e=-5;e<=6;e++)f=new Date(o+e,d,c),v=e===-5||6===e,k=o+e===g,y=!1,h&&(y=f.getFullYear()r.getFullYear(),6===e&&(m=y)),!y&&n&&(y=n.call(this.$element,f)===!1),D+=this.createItem({text:o+e,view:y?"year disabled":k?"year picked":"year",muted:v,picked:k,disabled:y,highlighted:f.getFullYear()===p});this.$yearsPrev.toggleClass(s,w),this.$yearsNext.toggleClass(s,m),this.$yearsCurrent.toggleClass(s,!0).html(o+-5+a+" - "+(o+6)+a),this.$years.html(D)},fillMonths:function(){var e,i=this.options,s=i.disabledClass||"",a=i.monthsShort,n=t.isFunction(i.filter)&&i.filter,h=this.startDate,r=this.endDate,l=this.viewDate,o=l.getFullYear(),d=l.getDate(),c=new Date,u=c.getFullYear(),p=c.getMonth(),f=this.date,g=f.getFullYear(),w=f.getMonth(),m=!1,y=!1,k=!1,v=!1,D="";for(e=0;e<=11;e++)f=new Date(o,e,d),v=o===g&&e===w,k=!1,h&&(m=f.getFullYear()===h.getFullYear(),k=m&&f.getMonth()r.getMonth()),!k&&n&&(k=n.call(this.$element,f)===!1),D+=this.createItem({index:e,text:a[e],view:k?"month disabled":v?"month picked":"month",picked:v,disabled:k,highlighted:o===u&&f.getMonth()===p});this.$yearPrev.toggleClass(s,m),this.$yearNext.toggleClass(s,y),this.$yearCurrent.toggleClass(s,m&&y).html(o+i.yearSuffix||""),this.$months.html(D)},fillDays:function(){var e,i,s,a=this.options,n=a.disabledClass||"",h=a.yearSuffix||"",r=a.monthsShort,l=parseInt(a.weekStart,10)%7,d=t.isFunction(a.filter)&&a.filter,c=this.startDate,u=this.endDate,p=this.viewDate,f=p.getFullYear(),g=p.getMonth(),w=f,m=g,y=f,k=new Date,v=k.getFullYear(),D=k.getMonth(),C=k.getDate(),b=g,$=this.date,x=$.getFullYear(),F=$.getMonth(),S=$.getDate(),I=!1,M=!1,V=!1,T=!1,Y=[],A=[],P=[];for(0===g?(w-=1,m=11):m-=1,e=o(w,m),$=new Date(f,g,1),s=$.getDay()-l,s<=0&&(s+=7),c&&(I=$.getTime()<=c.getTime()),i=e-(s-1);i<=e;i++)$=new Date(w,m,i),T=w===x&&m===F&&i===S,V=!1,c&&(V=$.getTime()=u.getTime()),i=1;i<=s;i++)$=new Date(y,b,i),T=y===x&&b===F&&i===S,V=!1,u&&(V=$.getTime()>u.getTime()),!V&&d&&(V=d.call(this.$element,$)===!1),A.push(this.createItem({text:i,view:"day next",muted:!0,picked:T,disabled:V,highlighted:y===v&&b===D&&$.getDate()===C}));for(i=1;i<=e;i++)$=new Date(f,g,i),T=f===x&&g===F&&i===S,V=!1,c&&(V=$.getTime()u.getTime()),!V&&d&&(V=d.call(this.$element,$)===!1),P.push(this.createItem({text:i,view:V?"day disabled":T?"day picked":"day",picked:T,disabled:V,highlighted:f===v&&g===D&&$.getDate()===C}));this.$monthPrev.toggleClass(n,I),this.$monthNext.toggleClass(n,M),this.$monthCurrent.toggleClass(n,I&&M).html(a.yearFirst?f+h+" "+r[g]:r[g]+" "+f+h),this.$days.html(Y.join("")+P.join(" ")+A.join(""))},click:function(e){var i,s,a,n,h,r,l=t(e.target),o=this.options,d=this.viewDate;if(e.stopPropagation(),e.preventDefault(),!l.hasClass("disabled"))switch(i=d.getFullYear(),s=d.getMonth(),a=d.getDate(),r=l.data("view")){case"years prev":case"years next":i="years prev"===r?i-10:i+10,h=l.text(),n=k.test(h),n&&(i=parseInt(h,10),this.date=new Date(i,s,C(a,28))),this.viewDate=new Date(i,s,C(a,28)),this.fillYears(),n&&(this.showView(1),this.pick("year"));break;case"year prev":case"year next":i="year prev"===r?i-1:i+1,this.viewDate=new Date(i,s,C(a,28)),this.fillMonths();break;case"year current":this.format.hasYear&&this.showView(2);break;case"year picked":this.format.hasMonth?this.showView(1):(l.addClass(o.pickedClass).siblings().removeClass(o.pickedClass),this.hideView()),this.pick("year");break;case"year":i=parseInt(l.text(),10),this.date=new Date(i,s,C(a,28)),this.format.hasMonth?(this.viewDate=new Date(i,s,C(a,28)),this.showView(1)):(l.addClass(o.pickedClass).siblings().removeClass(o.pickedClass),this.hideView()),this.pick("year");break;case"month prev":case"month next":s="month prev"===r?s-1:"month next"===r?s+1:s,this.viewDate=new Date(i,s,C(a,28)),this.fillDays();break;case"month current":this.format.hasMonth&&this.showView(1);break;case"month picked":this.format.hasDay?this.showView(0):(l.addClass(o.pickedClass).siblings().removeClass(o.pickedClass),this.hideView()),this.pick("month");break;case"month":s=t.inArray(l.text(),o.monthsShort),this.date=new Date(i,s,C(a,28)),this.format.hasDay?(this.viewDate=new Date(i,s,C(a,28)),this.showView(0)):(l.addClass(o.pickedClass).siblings().removeClass(o.pickedClass),this.hideView()),this.pick("month");break;case"day prev":case"day next":case"day":s="day prev"===r?s-1:"day next"===r?s+1:s,a=parseInt(l.text(),10),this.date=new Date(i,s,a),l.addClass(o.pickedClass).siblings().removeClass(o.pickedClass),"day"===r&&this.hideView(),this.pick("day");break;case"day picked":l.addClass(o.pickedClass).siblings().removeClass(o.pickedClass),this.hideView(),this.pick("day")}},clickDoc:function(t){for(var e,i=t.target,s=this.$element[0],a=this.$trigger[0];i!==p;){if(i===a||i===s){e=!0;break}i=i.parentNode}e||this.hide()},keyup:function(){this.update()},keyupDoc:function(t){this.isInput&&t.target!==this.$element[0]&&this.isShown&&("Tab"===t.key||9===t.keyCode)&&this.hide()},getValue:function(){var t=this.$element,e="";return this.isInput?e=t.val():this.isInline?this.options.container&&(e=t.text()):e=t.text(),e},setValue:function(t){var e=this.$element;t=i(t)?t:"",this.isInput?e.val(t):this.isInline?this.options.container&&e.text(t):e.text(t)},show:function(){this.isBuilt||this.build(),this.isShown||this.trigger("show.datepicker").isDefaultPrevented()||(this.isShown=!0,this.$picker.removeClass(D).on(m,t.proxy(this.click,this)),this.showView(this.options.startView),this.isInline||(u.on("resize.datepicker",this._place=r(this.place,this)),f.on(m,this._clickDoc=r(this.clickDoc,this)),f.on("keyup.datepicker",this._keyupDoc=r(this.keyupDoc,this)),this.place()))},hide:function(){this.isShown&&(this.trigger("hide.datepicker").isDefaultPrevented()||(this.isShown=!1,this.$picker.addClass(D).off(m,this.click),this.isInline||(u.off("resize.datepicker",this._place),f.off(m,this._clickDoc),f.off("keyup.datepicker",this._keyupDoc))))},toggle:function(){this.isShown?this.hide():this.show()},update:function(){var t=this.getValue();t!==this.oldValue&&(this.setDate(t,!0),this.oldValue=t)},pick:function(t){var e=this.$element,i=this.date;this.trigger("pick.datepicker",{view:t||"",date:i}).isDefaultPrevented()||(this.setValue(i=this.formatDate(this.date)),this.isInput&&e.trigger("change"))},reset:function(){this.setDate(this.initialDate,!0),this.setValue(this.initialValue),this.isShown&&this.showView(this.options.startView)},getMonthName:function(e,i){var n=this.options,h=n.months;return t.isNumeric(e)?e=g(e):a(i)&&(i=e),i===!0&&(h=n.monthsShort),h[s(e)?e:this.date.getMonth()]},getDayName:function(e,i,n){var h=this.options,r=h.days;return t.isNumeric(e)?e=g(e):(a(n)&&(n=i),a(i)&&(i=e)),r=n===!0?h.daysMin:i===!0?h.daysShort:r,r[s(e)?e:this.date.getDay()]},getDate:function(t){var e=this.date;return t?this.formatDate(e):new Date(e)},setDate:function(e,s){var a=this.options.filter;if(n(e)||i(e)){if(e=this.parseDate(e),t.isFunction(a)&&a.call(this.$element,e)===!1)return;this.date=e,this.viewDate=new Date(e),s||this.pick(),this.isBuilt&&this.fillAll()}},setStartDate:function(t){(n(t)||i(t))&&(this.startDate=this.parseDate(t),this.isBuilt&&this.fillAll())},setEndDate:function(t){(n(t)||i(t))&&(this.endDate=this.parseDate(t),this.isBuilt&&this.fillAll())},parseDate:function(t){var e,s,a,h,r,l,o=this.format,d=[];if(n(t))return new Date(t.getFullYear(),t.getMonth(),t.getDate());if(i(t)&&(d=t.match(/\d+/g)||[]),t=new Date,s=t.getFullYear(),a=t.getDate(),h=t.getMonth(),e=o.parts.length,d.length===e)for(l=0;l
                  ',offset:10,zIndex:1e3,filter:null,show:null,hide:null,pick:null},c.setDefaults=function(e){e=t.isPlainObject(e)?e:{},e.language&&(e=t.extend({},c.LANGUAGES[e.language],e)),t.extend(c.DEFAULTS,e)},c.other=t.fn.datepicker,t.fn.datepicker=function(e){var s,n=h(arguments,1);return this.each(function(){var a,h,r=t(this),l=r.data(w);if(!l){if(/destroy/.test(e))return;a=t.extend({},r.data(),t.isPlainObject(e)&&e),r.data(w,l=new c(this,a))}i(e)&&t.isFunction(h=l[e])&&(s=h.apply(l,n))}),a(s)?this:s},t.fn.datepicker.Constructor=c,t.fn.datepicker.languages=c.LANGUAGES,t.fn.datepicker.setDefaults=c.setDefaults,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=c.other,this}}); \ No newline at end of file diff --git a/docs/css/datepicker.css b/docs/css/datepicker.css index 868badb..d25bc8f 100644 --- a/docs/css/datepicker.css +++ b/docs/css/datepicker.css @@ -1,11 +1,11 @@ /*! - * Datepicker v0.5.2 + * Datepicker v0.5.3 * https://github.com/fengyuanchen/datepicker * * Copyright (c) 2014-2017 Fengyuan Chen * Released under the MIT license * - * Date: 2017-04-08T12:04:53.399Z + * Date: 2017-05-30T03:33:52.900Z */ .datepicker-container { font-size: 12px; diff --git a/docs/css/datepicker.min.css b/docs/css/datepicker.min.css index 985453a..45effa4 100644 --- a/docs/css/datepicker.min.css +++ b/docs/css/datepicker.min.css @@ -1,9 +1,9 @@ /*! - * Datepicker v0.5.2 + * Datepicker v0.5.3 * https://github.com/fengyuanchen/datepicker * * Copyright (c) 2014-2017 Fengyuan Chen * Released under the MIT license * - * Date: 2017-04-08T12:04:53.399Z + * Date: 2017-05-30T03:33:52.900Z */.datepicker-container{font-size:12px;line-height:30px;position:fixed;z-index:-1;top:0;left:0;width:210px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;direction:ltr!important;-ms-touch-action:none;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.datepicker-container:after,.datepicker-container:before{position:absolute;display:block;width:0;height:0;content:' ';border:5px solid transparent}.datepicker-dropdown{position:absolute;z-index:1;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;border:1px solid #ccc;-webkit-box-shadow:0 3px 6px #ccc;box-shadow:0 3px 6px #ccc}.datepicker-inline{position:static}.datepicker-top-left,.datepicker-top-right{border-top-color:#39f}.datepicker-top-left:after,.datepicker-top-left:before,.datepicker-top-right:after,.datepicker-top-right:before{top:-5px;left:10px;border-top:0}.datepicker-top-left:before,.datepicker-top-right:before{border-bottom-color:#39f}.datepicker-top-left:after,.datepicker-top-right:after{top:-4px;border-bottom-color:#fff}.datepicker-bottom-left,.datepicker-bottom-right{border-bottom-color:#39f}.datepicker-bottom-left:after,.datepicker-bottom-left:before,.datepicker-bottom-right:after,.datepicker-bottom-right:before{bottom:-5px;left:10px;border-bottom:0}.datepicker-bottom-left:before,.datepicker-bottom-right:before{border-top-color:#39f}.datepicker-bottom-left:after,.datepicker-bottom-right:after{bottom:-4px;border-top-color:#fff}.datepicker-bottom-right:after,.datepicker-bottom-right:before,.datepicker-top-right:after,.datepicker-top-right:before{right:10px;left:auto}.datepicker-panel>ul:after,.datepicker-panel>ul:before{display:table;content:' '}.datepicker-panel>ul:after{clear:both}.datepicker-panel>ul{width:102%;margin:0;padding:0}.datepicker-panel>ul>li{float:left;width:30px;height:30px;margin:0;padding:0;list-style:none;cursor:pointer;text-align:center;background-color:#fff}.datepicker-panel>ul>li.highlighted,.datepicker-panel>ul>li:hover{background-color:#e6f2ff}.datepicker-panel>ul>li.muted,.datepicker-panel>ul>li.muted:hover{color:#999}.datepicker-panel>ul>li.highlighted:hover{background-color:#cce6ff}.datepicker-panel>ul>li.picked,.datepicker-panel>ul>li.picked:hover{color:#39f}.datepicker-panel>ul>li.disabled,.datepicker-panel>ul>li.disabled:hover{cursor:default;color:#ccc;background-color:#fff}.datepicker-panel>ul>li.disabled.highlighted,.datepicker-panel>ul>li.disabled:hover.highlighted{background-color:#e6f2ff}.datepicker-panel>ul>li[data-view='years prev'],.datepicker-panel>ul>li[data-view='year prev'],.datepicker-panel>ul>li[data-view='month prev'],.datepicker-panel>ul>li[data-view='years next'],.datepicker-panel>ul>li[data-view='year next'],.datepicker-panel>ul>li[data-view='month next'],.datepicker-panel>ul>li[data-view=next]{font-size:18px}.datepicker-panel>ul>li[data-view='month current'],.datepicker-panel>ul>li[data-view='years current'],.datepicker-panel>ul>li[data-view='year current']{width:150px}.datepicker-panel>ul[data-view=years]>li,.datepicker-panel>ul[data-view=months]>li{line-height:52.5px;width:52.5px;height:52.5px}.datepicker-panel>ul[data-view=week]>li,.datepicker-panel>ul[data-view=week]>li:hover{cursor:default;background-color:#fff}.datepicker-hide{display:none} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index f0af3d8..43a6d4a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -49,7 +49,7 @@
                  -

                  Datepicker v0.5.2

                  +

                  Datepicker v0.5.3

                  A simple jQuery datepicker plugin.

                  @@ -99,6 +99,7 @@
                  language