Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue2-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue2-datepicker - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

16

CHANGELOG.md

@@ -0,1 +1,17 @@

<a name="3.6.0"></a>
# [3.6.0](https://github.com/mengxiong10/vue2-datepicker/compare/v3.5.0...v3.6.0) (2020-06-07)
### Bug Fixes
* remove touchstart event ([#469](https://github.com/mengxiong10/vue2-datepicker/issues/469)) ([b6b770d](https://github.com/mengxiong10/vue2-datepicker/commit/b6b770d))
### Features
* add multi-select ([#444](https://github.com/mengxiong10/vue2-datepicker/issues/444)) ([7835ffb](https://github.com/mengxiong10/vue2-datepicker/commit/7835ffb))
* add the prop `scroll-duration` ([#475](https://github.com/mengxiong10/vue2-datepicker/issues/475)) ([051ad89](https://github.com/mengxiong10/vue2-datepicker/commit/051ad89))
<a name="3.5.0"></a>

@@ -2,0 +18,0 @@ # [3.5.0](https://github.com/mengxiong10/vue2-datepicker/compare/v3.4.1...v3.5.0) (2020-04-22)

0

CHANGELOG.zh-CN.md

@@ -0,0 +0,0 @@ <a name="3.0.2"></a>

2

index.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DatePicker=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?r(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e){return o(e)?new Date(e.getTime()):null==e?new Date(NaN):new Date(e)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>=0&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var n=l(e),r=(n.getDay()+7-t)%7;return n.setDate(n.getDate()-r),n.setHours(0,0,0,0),n}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,r=void 0===n?0:n,a=t.firstWeekContainsDate,i=void 0===a?1:a;if(!(i>=1&&i<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7");for(var s=l(e),o=s.getFullYear(),c=new Date(0),d=o+1;d>=o-1&&(c.setFullYear(d,0,i),c.setHours(0,0,0,0),c=u(c,r),!(s.getTime()>=c.getTime()));d--);return c}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,r=void 0===n?0:n,a=t.firstWeekContainsDate,i=void 0===a?1:a,s=l(e),o=u(s,r),d=c(s,{firstDayOfWeek:r,firstWeekContainsDate:i}),h=o.getTime()-d.getTime();return Math.round(h/6048e5)+1}var h={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"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},f=/\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;function p(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="".concat(Math.abs(e)),r=e<0?"-":"";n.length<t;)n="0".concat(n);return r+n}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",r=Math.abs(e),a=r%60;return n+p(Math.floor(r/60),2)+t+p(a,2)}var v=function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLocaleLowerCase():r},y={Y:function(e){var t=e.getFullYear();return t<=9999?"".concat(t):"+".concat(t)},YY:function(e){return p(e.getFullYear(),4).substr(2)},YYYY:function(e){return p(e.getFullYear(),4)},M:function(e){return e.getMonth()+1},MM:function(e){return p(e.getMonth()+1,2)},MMM:function(e,t){return t.monthsShort[e.getMonth()]},MMMM:function(e,t){return t.months[e.getMonth()]},D:function(e){return e.getDate()},DD:function(e){return p(e.getDate(),2)},H:function(e){return e.getHours()},HH:function(e){return p(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(){var e=y.h.apply(y,arguments);return p(e,2)},m:function(e){return e.getMinutes()},mm:function(e){return p(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return p(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return p(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return p(e.getMilliseconds(),3)},d:function(e){return e.getDay()},dd:function(e,t){return t.weekdaysMin[e.getDay()]},ddd:function(e,t){return t.weekdaysShort[e.getDay()]},dddd:function(e,t){return t.weekdays[e.getDay()]},A:function(e,t){return(t.meridiem||v)(e.getHours(),e.getMinutes(),!1)},a:function(e,t){return(t.meridiem||v)(e.getHours(),e.getMinutes(),!0)},Z:function(e){return m(e.getTimezoneOffset(),":")},ZZ:function(e){return m(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()},w:function(e,t){return d(e,{firstDayOfWeek:t.firstDayOfWeek,firstWeekContainsDate:t.firstWeekContainsDate})},ww:function(e,t){return p(y.w(e,t),2)}};function g(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",i=l(e);if(!o(n=i)||isNaN(n.getTime()))return"Invalid Date";var s=r.locale||h;return a.replace(f,(function(e,t){return t||("function"==typeof y[e]?"".concat(y[e](i,s)):e)}))}function b(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=/(\[[^\[]*\])|(MM?M?M?|Do|DD?|ddd?d?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|S{1,3}|x|X|ZZ?|.)/g,k=/\d/,T=/\d\d/,M=/\d\d?/,_=/[+-]?\d+/,V=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,O={},Y=function(e,t,n){var r,a=Array.isArray(e)?e:[e];r="string"==typeof n?function(e){var t=parseInt(e,10);return x({},n,t)}:n,a.forEach((function(e){O[e]=[t,r]}))},A=function(e,t){return function(n,r){var a=r[e];if(!Array.isArray(a))throw new Error("Locale[".concat(e,"] need an array"));var i=a.indexOf(n);if(i<0)throw new Error("Invalid Word");return x({},t,i)}};function F(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];return a<100&&a>=0?(n[0]+=400,e=new Date(Date.UTC.apply(Date,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(a)):e=new Date(Date.UTC.apply(Date,n)),e}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var r=n.locale,a=void 0===r?h:r,i=n.backupDate,s=void 0===i?new Date:i,o=function(e,t,n){var r=t.match(S);if(!r)throw new Error;for(var a=r.length,i={},s=0;s<a;s+=1){var o=r[s],l=O[o];if(l){var u="function"==typeof l[0]?l[0](n):l[0],c=l[1],d=(u.exec(e)||[])[0];i=C({},i,{},c(d,n)),e=e.replace(d,"")}else{var h=o.replace(/^\[|\]$/g,"");if(0!==e.indexOf(h))throw new Error("not match");e=e.substr(h.length)}}return i}(e,t,a),l=o.year,u=o.month,d=o.day,f=o.date,p=o.offset,m=o.weekday,v=o.week;if(f)return f;var y=[l,u,d,o.hour,o.minute,o.second,o.millisecond];if(y[3]=function(e,t){if(void 0!==e&&void 0!==t)if(t){if(e<12)return e+12}else if(12===e)return 0;return e}(y[3],o.isPM),void 0!==v&&void 0===u&&void 0===d){var g=c(void 0===l?s:new Date(l,3),{firstDayOfWeek:a.firstDayOfWeek,firstWeekContainsDate:a.firstWeekContainsDate});return new Date(g.getTime()+7*(v-1)*24*3600*1e3)}var w=F.apply(void 0,b(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=[0,0,1,0,0,0,0],r=[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],a=!0,i=0;i<7;i++)void 0===e[i]?n[i]=a?r[i]:n[i]:(n[i]=e[i],a=!1);return n}(y,s))),D=60*(void 0===p?w.getTimezoneOffset():p)*1e3,x=new Date(w.getTime()+D);return void 0!==m&&x.getDay()!==m?new Date(NaN):x}catch(e){return new Date(NaN)}}function N(e){var t=new Date(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:0);return e<100&&e>=0&&t.setFullYear(e),t}function $(e){return e instanceof Date&&!isNaN(e)}function j(e){return Array.isArray(e)&&2===e.length&&e.every($)&&e[0]<=e[1]}function I(e){for(var t=new Date(e),n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return $(t)?t:I.apply(void 0,r)}function H(e,t){var n=new Date(e),r=new Date(t);return n.setHours(r.getHours(),r.getMinutes(),r.getSeconds()),n}function E(e,t){if(!Array.isArray(e))return[];var n=[],r=e.length,a=0;for(t=t||r;a<r;)n.push(e.slice(a,a+=t));return n}function W(e){return"[object Object]"===Object.prototype.toString.call(e)}function L(e,t){if(!W(e))return{};Array.isArray(t)||(t=[t]);var n={};return t.forEach((function(t){t in e&&(n[t]=e[t])})),n}Y("Y",_,"year"),Y("YY",T,(function(e){var t=(new Date).getFullYear(),n=Math.floor(t/100),r=parseInt(e,10);return x({},"year",r=100*(r>68?n-1:n)+r)})),Y("YYYY",/\d{4}/,"year"),Y("M",M,(function(e){return x({},"month",parseInt(e,10)-1)})),Y("MM",T,(function(e){return x({},"month",parseInt(e,10)-1)})),Y("MMM",V,A("monthsShort","month")),Y("MMMM",V,A("months","month")),Y("D",M,"day"),Y("DD",T,"day"),Y(["H","h"],M,"hour"),Y(["HH","hh"],T,"hour"),Y("m",M,"minute"),Y("mm",T,"minute"),Y("s",M,"second"),Y("ss",T,"second"),Y("S",k,(function(e){return x({},"millisecond",100*parseInt(e,10))})),Y("SS",T,(function(e){return x({},"millisecond",10*parseInt(e,10))})),Y("SSS",/\d{3}/,"millisecond"),Y(["A","a"],(function(e){return e.meridiemParse||/[ap]\.?m?\.?/i}),(function(e,t){return{isPM:"function"==typeof t.isPM?t.isPM(e):function(e){return"p"==="".concat(e).toLowerCase().charAt(0)}(e)}})),Y(["Z","ZZ"],/[+-]\d\d:?\d\d/,(function(e){return{offset:(t=e,n=D(t.match(/([+-]|\d\d)/g)||["-","0","0"],3),r=n[0],a=n[2],i=60*parseInt(n[1],10)+parseInt(a,10),0===i?0:"+"===r?-i:+i)};var t,n,r,a,i})),Y("x",_,(function(e){return{date:new Date(parseInt(e,10))}})),Y("X",/[+-]?\d+(\.\d{1,3})?/,(function(e){return{date:new Date(1e3*parseFloat(e))}})),Y("d",k,"weekday"),Y("dd",V,A("weekdaysMin","weekday")),Y("ddd",V,A("weekdaysShort","weekday")),Y("dddd",V,A("weekdays","weekday")),Y("w",M,"week"),Y("ww",T,"week");var B,R=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={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"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},e.exports=t.default})),q=(B=R)&&B.__esModule&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B,z="en",J={};function U(e,t,n){if("string"!=typeof e)return J[z];var r=z;return J[e]&&(r=e),t&&(J[e]=t,r=e),n||(z=r),J[e]||J[z]}function Z(e){return U(e,null,!0)}function X(e,t){for(var n,r=(e||"").split("."),a=t||Z(),i=0,s=r.length;i<s;i++){if(n=a[r[i]],i===s-1)return n;if(!n)return null;a=n}return null}function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;if(!e||e===t)return null;var n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)};return/(auto|scroll)/.test(n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x"))?e:K(e.parentNode,t)}J[z]={formatLocale:q,yearFormat:"YYYY",monthFormat:"MMM",monthBeforeYear:!0};var G={name:"Popup",inject:{prefixClass:{default:"mx"}},props:{visible:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0},inline:{type:Boolean,default:!1}},data:function(){return{top:"",left:""}},watch:{visible:{immediate:!0,handler:function(e){var t=this;this.$nextTick((function(){e&&t.displayPopup()}))}}},mounted:function(){var e=this;if(!this.inline){this.appendToBody&&document.body.appendChild(this.$el),this._clickoutEvent="ontouchend"in document?"touchstart":"mousedown",document.addEventListener(this._clickoutEvent,this.handleClickOutside);var t,n,r=this.$parent.$el;this._displayPopup=(t=function(){return e.displayPopup()},n=!1,function(){for(var e=this,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];n||(n=!0,requestAnimationFrame((function(){n=!1,t.apply(e,a)})))}),this._scrollParent=K(r)||window,this._scrollParent.addEventListener("scroll",this._displayPopup),window.addEventListener("resize",this._displayPopup)}},beforeDestroy:function(){this.inline||(this.appendToBody&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),document.removeEventListener(this._clickoutEvent,this.handleClickOutside),this._scrollParent.removeEventListener("scroll",this._displayPopup),window.removeEventListener("resize",this._displayPopup))},methods:{handleClickOutside:function(e){if(this.visible){var t=this.$el;t&&!t.contains(e.target)&&this.$emit("clickoutside",e)}},displayPopup:function(){if(!this.inline&&this.visible){var e=this.$parent.$el,t=this.appendToBody;this._popupRect||(this._popupRect=function(e){var t=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";var r=window.getComputedStyle(e),a=e.offsetWidth+parseInt(r.marginLeft,10)+parseInt(r.marginRight,10),i=e.offsetHeight+parseInt(r.marginTop,10)+parseInt(r.marginBottom,10);return e.style.display=t,e.style.visibility=n,{width:a,height:i}}(this.$el));var n=this._popupRect,r=function(e,t,n,r){var a=0,i=0,s=0,o=e.getBoundingClientRect(),l=document.documentElement.clientWidth,u=document.documentElement.clientHeight;return r&&(i=window.pageXOffset+o.left,s=window.pageYOffset+o.top),a=o.top<=n&&u-o.bottom<=n?s+u-o.top-n:o.top+o.height/2<=u/2?s+o.height:s-n,{left:"".concat(l-o.left<t&&o.right<t?i-o.left+1:o.left+o.width/2<=l/2?i:i+o.width-t,"px"),top:"".concat(a,"px")}}(e,n.width,n.height,t),a=r.top;this.left=r.left,this.top=a}}},render:function(){var e=arguments[0],t=this.prefixClass;return this.inline?e("div",{class:"".concat(t,"-datepicker-main")},[this.$slots.default]):e("transition",{attrs:{name:"".concat(t,"-zoom-in-down")}},[this.visible&&e("div",{class:"".concat(t,"-datepicker-main ").concat(t,"-datepicker-popup"),style:{top:this.top,left:this.left,position:"absolute"}},[this.$slots.default])])}};function Q(e,t,n,r,a,i,s,o,l,u){"boolean"!=typeof s&&(l=o,o=s,s=!1);var c,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,a&&(d.functional=!0)),r&&(d._scopeId=r),i?d._ssrRegister=c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)}:t&&(c=s?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return n}var ee=Q({render:function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M940.218182 107.054545h-209.454546V46.545455h-65.163636v60.50909H363.054545V46.545455H297.890909v60.50909H83.781818c-18.618182 0-32.581818 13.963636-32.581818 32.581819v805.236363c0 18.618182 13.963636 32.581818 32.581818 32.581818h861.090909c18.618182 0 32.581818-13.963636 32.581818-32.581818V139.636364c-4.654545-18.618182-18.618182-32.581818-37.236363-32.581819zM297.890909 172.218182V232.727273h65.163636V172.218182h307.2V232.727273h65.163637V172.218182h176.872727v204.8H116.363636V172.218182h181.527273zM116.363636 912.290909V442.181818h795.927273v470.109091H116.363636z"}})])},staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),te=Q({render:function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M810.005333 274.005333l-237.994667 237.994667 237.994667 237.994667-60.010667 60.010667-237.994667-237.994667-237.994667 237.994667-60.010667-60.010667 237.994667-237.994667-237.994667-237.994667 60.010667-60.010667 237.994667 237.994667 237.994667-237.994667z"}})])},staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0);function ne(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object.prototype.toString.call(t);return t instanceof Date||"object"===e(t)&&"[object Date]"===n?new Date(t.getTime()):"number"==typeof t||"[object Number]"===n?new Date(t):("string"!=typeof t&&"[object String]"!==n||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function re(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ae(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=ne(e);return t.setHours(0,0,0,0),t}function ie(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=ne(e),n=t.getFullYear(),r=t.getMonth(),a=new Date(0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function se(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ne(e),r=re(t),a=n.getMonth()+r,i=new Date(0);i.setFullYear(n.getFullYear(),a,1),i.setHours(0,0,0,0);var s=ie(i);return n.setMonth(a,Math.min(s,n.getDate())),n}function oe(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return se(e,12*re(t))}function le(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=ne(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ue(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=ne(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ce(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ne(e),r=re(t),a=n.getFullYear(),i=n.getDate(),s=new Date(0);s.setFullYear(a,r,15),s.setHours(0,0,0,0);var o=ie(s);return n.setMonth(r,Math.min(i,o)),n}function de(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ne(e),r=re(t);return isNaN(n)?new Date(NaN):(n.setFullYear(r),n)}function he(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return se(e,-re(t))}var fe,pe=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-date"},[t("thead",[t("tr",[e.showWeekNumber?t("th",{class:e.prefixClass+"-week-number-header"}):e._e(),e._v(" "),e._l(e.days,(function(n){return t("th",{key:n},[e._v(e._s(n))])}))],2)]),e._v(" "),t("tbody",{on:{click:e.handleCellClick}},e._l(e.dates,(function(n,r){return t("tr",{key:r,class:[e.prefixClass+"-date-row",e.getRowClasses(n)]},[e.showWeekNumber?t("td",{class:e.prefixClass+"-week-number"},[e._v("\n "+e._s(e.getWeekNumber(n[0].day))+"\n ")]):e._e(),e._v(" "),e._l(n,(function(n,r){return t("td",{key:r,staticClass:"cell",class:e.getCellClasses(n.day),attrs:{"data-day":n.day,title:e.getCellTitle(n.day)}},[t("div",[e._v(e._s(n.text))])])}))],2)})),0)])},staticRenderFns:[]},void 0,{name:"TableDate",inject:{t:{default:function(){return X}},getWeek:{default:function(){return d}},prefixClass:{default:"mx"}},props:{calendarYear:{type:Number,default:function(){return(new Date).getFullYear()}},calendarMonth:{type:Number,default:function(){return(new Date).getMonth()}},showWeekNumber:{type:Boolean,default:!1},titleFormat:{type:String,default:"YYYY-MM-DD"},getRowClasses:{type:Function,default:function(){return[]}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{firstDayOfWeek:function(){return this.t("formatLocale.firstDayOfWeek")||0},days:function(){var e=this.t("days")||this.t("formatLocale.weekdaysMin");return e.concat(e).slice(this.firstDayOfWeek,this.firstDayOfWeek+7)},dates:function(){for(var e=[],t=this.firstDayOfWeek,n=this.calendarMonth,r=N(this.calendarYear,n,0),a=r.getDate(),i=a-(r.getDay()+7-t)%7,s=i;s<=a;s++){e.push({day:s-a,text:s})}r.setMonth(n+1,0);for(var o=r.getDate(),l=1;l<=o;l++)e.push({day:l,text:l});for(var u=42-(a-i+1)-o,c=1;c<=u;c++)e.push({day:o+c,text:c});return E(e,7)}},methods:{formatDate:function(e,t){return g(e,t,{locale:this.t("formatLocale")})},handleCellClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-day");n&&this.$emit("select",parseInt(n,10))},getCellTitle:function(e){var t=this.titleFormat,n=N(this.calendarYear,this.calendarMonth,e);return this.formatDate(n,t)},getWeekNumber:function(e){var t=N(this.calendarYear,this.calendarMonth,e);return this.getWeek(t,this.t("formatLocale"))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),me=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-month",on:{click:e.handleClick}},e._l(e.months,(function(n,r){return t("tr",{key:r},e._l(n,(function(n,r){return t("td",{key:r,staticClass:"cell",class:e.getCellClasses(n.month),attrs:{"data-month":n.month}},[t("div",[e._v(e._s(n.text))])])})),0)})),0)},staticRenderFns:[]},void 0,{name:"TableMonth",inject:{t:{default:function(){return X}},prefixClass:{default:"mx"}},props:{getCellClasses:{type:Function,default:function(){return[]}}},computed:{months:function(){var e=(this.t("months")||this.t("formatLocale.monthsShort")).map((function(e,t){return{text:e,month:t}}));return E(e,3)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-month");n&&this.$emit("select",parseInt(n,10))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ve=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-year",on:{click:e.handleClick}},e._l(e.years,(function(n,r){return t("tr",{key:r},e._l(n,(function(n,r){return t("td",{key:r,staticClass:"cell",class:e.getCellClasses(n),attrs:{"data-year":n}},[t("div",[e._v(e._s(n))])])})),0)})),0)},staticRenderFns:[]},void 0,{name:"TableYear",inject:{prefixClass:{default:"mx"}},props:{decade:Number,getCellClasses:{type:Function,default:function(){return[]}}},computed:{years:function(){for(var e=this.decade,t=[],n=0;n<10;n++)t.push(e+n);return E(t,2)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-year");n&&this.$emit("select",parseInt(n,10))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ye=Q({render:function(){var e,t=this,n=t._self._c||t.$createElement;return n("div",{class:[t.prefixClass+"-calendar",t.prefixClass+"-calendar-panel-"+t.panel,(e={},e[t.prefixClass+"-calendar-week-mode"]="week"===t.type,e)]},[n("div",{class:t.prefixClass+"-calendar-header"},[n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconDoubleArrow,expression:"showIconDoubleArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-double-left",attrs:{type:"button"},on:{click:t.handleIconDoubleLeftClick}},[n("i",{class:t.prefixClass+"-icon-double-left"})]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconArrow,expression:"showIconArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-left",attrs:{type:"button"},on:{click:t.handleIconLeftClick}},[n("i",{class:t.prefixClass+"-icon-left"})]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconDoubleArrow,expression:"showIconDoubleArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-double-right",attrs:{type:"button"},on:{click:t.handleIconDoubleRightClick}},[n("i",{class:t.prefixClass+"-icon-double-right"})]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconArrow,expression:"showIconArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-right",attrs:{type:"button"},on:{click:t.handleIconRightClick}},[n("i",{class:t.prefixClass+"-icon-right"})]),t._v(" "),n("span",{class:t.prefixClass+"-calendar-header-label"},["year"===t.panel?[n("span",[t._v(t._s(t.calendarDecade))]),t._v(" "),n("span",{class:t.prefixClass+"-calendar-decade-separator"}),t._v(" "),n("span",[t._v(t._s(t.calendarDecade+9))])]:"month"===t.panel?n("button",{class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text",attrs:{type:"button"},on:{click:function(e){return t.handelPanelChange("year")}}},[t._v("\n "+t._s(t.calendarYear)+"\n ")]):"date"===t.panel?t._l(t.dateHeader,(function(e){return n("button",{key:e.panel,class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-current-"+e.panel,attrs:{type:"button"},on:{click:function(n){return t.handelPanelChange(e.panel)}}},[t._v("\n "+t._s(e.label)+"\n ")])})):t._e()],2)]),t._v(" "),n("div",{class:t.prefixClass+"-calendar-content"},[n("table-year",{directives:[{name:"show",rawName:"v-show",value:"year"===t.panel,expression:"panel === 'year'"}],attrs:{decade:t.calendarDecade,"get-cell-classes":t.getYearClasses},on:{select:t.handleSelectYear}}),t._v(" "),"year"!==t.type?n("table-month",{directives:[{name:"show",rawName:"v-show",value:"month"===t.panel,expression:"panel === 'month'"}],attrs:{"get-cell-classes":t.getMonthClasses},on:{select:t.handleSelectMonth}}):t._e(),t._v(" "),"year"!==t.type&&"month"!==t.type?n("table-date",{directives:[{name:"show",rawName:"v-show",value:"date"===t.panel,expression:"panel === 'date'"}],attrs:{"calendar-year":t.calendarYear,"calendar-month":t.calendarMonth,"title-format":t.titleFormat,"show-week-number":"boolean"==typeof t.showWeekNumber?t.showWeekNumber:"week"===t.type,"get-cell-classes":t.getDateClasses,"get-row-classes":t.getWeekState},on:{select:t.handleSelectDate}}):t._e()],1)])},staticRenderFns:[]},void 0,{name:"CalendarPanel",components:{TableDate:pe,TableMonth:me,TableYear:ve},mixins:[{methods:{dispatch:function(e){for(var t=this.$parent||this.$root,n=t.$options.name;t&&(!n||n!==e);)(t=t.$parent)&&(n=t.$options.name);if(t){for(var r,a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];(r=t).$emit.apply(r,i)}}}}],inject:{t:{default:function(){return X}},prefixClass:{default:"mx"}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},defaultPanel:{type:String},disabledDate:{type:Function,default:function(){return!1}},type:{type:String,default:"date"},getClasses:{type:Function,default:function(){return[]}},showWeekNumber:{type:Boolean,default:void 0},titleFormat:{type:String,default:"YYYY-MM-DD"},calendar:Date,partialUpdate:{type:Boolean,default:!1}},data:function(){var e=["date","month","year"],t=Math.max(e.indexOf(this.type),e.indexOf(this.defaultPanel));return{panel:-1!==t?e[t]:"date",innerCalendar:null}},computed:{innerValue:function(){var e=Array.isArray(this.value)?this.value:[this.value],t={year:ue,month:le,date:ae},n=t[this.type]||t.date;return e.filter($).map((function(e){return n(e)}))},calendarYear:function(){return this.innerCalendar.getFullYear()},calendarMonth:function(){return this.innerCalendar.getMonth()},calendarDecade:function(){return 10*Math.floor(this.calendarYear/10)},showIconDoubleArrow:function(){return"date"===this.panel||"month"===this.panel||"year"===this.panel},showIconArrow:function(){return"date"===this.panel},dateHeader:function(){var e=this.t("monthBeforeYear"),t=this.t("yearFormat"),n=this.t("monthFormat")||"MMM",r={panel:"year",label:this.formatDate(this.innerCalendar,t)},a={panel:"month",label:this.formatDate(this.innerCalendar,n)};return e?[a,r]:[r,a]}},watch:{value:{immediate:!0,handler:"initCalendar"},calendar:{handler:"initCalendar"},defaultValue:{handler:"initCalendar"}},methods:{formatDate:function(e,t){return g(e,t,{locale:this.t("formatLocale")})},initCalendar:function(){var e=this.calendar;$(e)||(e=I(this.innerValue[0],this.defaultValue)),this.innerCalendar=e},isDisabled:function(e){return this.disabledDate(new Date(e),this.innerValue)},emitDate:function(e,t){this.isDisabled(e)||(this.$emit("select",e,t),this.dispatch("DatePicker","pick",e,t))},updateCalendar:function(e,t){var n=new Date(this.innerCalendar);this.innerCalendar=e,this.$emit("update:calendar",e),this.dispatch("DatePicker","calendar-change",e,n,t)},handelPanelChange:function(e){this.panel=e},handleIconLeftClick:function(){var e=he(this.innerCalendar,1);this.updateCalendar(e,"last-month")},handleIconRightClick:function(){var e=se(this.innerCalendar,1);this.updateCalendar(e,"next-month")},handleIconDoubleLeftClick:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return oe(e,-re(t))}(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e,"year"===this.panel?"last-decade":"last-year")},handleIconDoubleRightClick:function(){var e=oe(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e,"year"===this.panel?"next-decade":"next-year")},handleSelectYear:function(e){if("year"===this.type){var t=this.getCellDate(e,"year");this.emitDate(t,"year")}else{var n=de(this.innerCalendar,e);if(this.updateCalendar(n,"year"),this.handelPanelChange("month"),this.partialUpdate&&this.innerValue[0]){var r=de(this.innerValue[0],e);this.emitDate(r,"year")}}},handleSelectMonth:function(e){if("month"===this.type){var t=this.getCellDate(e,"month");this.emitDate(t,"month")}else{var n=ce(this.innerCalendar,e);if(this.updateCalendar(n,"month"),this.handelPanelChange("date"),this.partialUpdate&&this.innerValue[0]){var r=ce(de(this.innerValue[0],this.calendarYear),e);this.emitDate(r,"month")}}},handleSelectDate:function(e){var t=this.getCellDate(e,"date");this.emitDate(t,"week"===this.type?"week":"date")},getCellDate:function(e,t){return"year"===t?N(e,0):"month"===t?N(this.calendarYear,e):N(this.calendarYear,this.calendarMonth,e)},getDateClasses:function(e){var t=this.getCellDate(e,"date"),n=t.getMonth()!==this.calendarMonth,r=[];t.getTime()===(new Date).setHours(0,0,0,0)&&r.push("today"),n&&r.push("not-current-month");var a=this.getStateClass(t);return"active"===a&&n||r.push(a),r.concat(this.getClasses(t,this.innerValue,r.join(" ")))},getMonthClasses:function(e){if("month"!==this.type)return this.calendarMonth===e?"active":"";var t=[],n=this.getCellDate(e,"month");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getYearClasses:function(e){if("year"!==this.type)return this.calendarYear===e?"active":"";var t=[],n=this.getCellDate(e,"year");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getStateClass:function(e){return this.isDisabled(e)?"disabled":this.innerValue.some((function(t){return t.getTime()===e.getTime()}))?"active":""},getWeekState:function(e){if("week"!==this.type)return"";var t=this.getCellDate(e[0].day,"date").getTime(),n=this.getCellDate(e[6].day,"date").getTime();return this.innerValue.some((function(e){var r=e.getTime();return r>=t&&r<=n}))?"".concat(this.prefixClass,"-active-week"):""}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ge={name:"CalendarRange",components:{CalendarPanel:ye},inject:{prefixClass:{default:"mx"}},props:a({},ye.props),data:function(){return{innerValue:[],calendars:[]}},computed:{calendarMinDiff:function(){var e={date:1,month:12,year:120};return e[this.type]||e.date},calendarMaxDiff:function(){return Infinity},defaultValues:function(){return Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue]}},watch:{value:{immediate:!0,handler:function(){var e=this;this.innerValue=j(this.value)?this.value:[new Date(NaN),new Date(NaN)],this.calendars=this.innerValue.map((function(t,n){return I(t,e.defaultValues[n])})),this.validateCalendars(1)}}},methods:{handleSelect:function(e,t){var n=i(this.innerValue,2),r=n[0],a=n[1];$(r)&&!$(a)?(this.innerValue=r.getTime()>e.getTime()?[e,r]:[r,e],this.emitDate(this.innerValue,t)):this.innerValue=[e,new Date(NaN)]},emitDate:function(e,t){this.$emit("select",e,t)},updateStartCalendar:function(e){this.calendars.splice(0,1,e),this.validateCalendars(1)},updateEndCalendar:function(e){this.calendars.splice(1,1,e),this.validateCalendars(0)},validateCalendars:function(e){var t=this.getCalendarGap();if(t){var n=this.calendars[e];n=0===e?he(n,t):se(n,t),this.calendars.splice(e,1,n)}},getCalendarGap:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ne(e),r=ne(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(this.calendars[1],this.calendars[0]),t=this.calendarMinDiff,n=this.calendarMaxDiff;return e<t?t-e:e>n?n-e:0},getRangeClasses:function(e,t,n){var r=[].concat(this.getClasses(e,t,n));return!/disabled|active|not-current-month/.test(n)&&2===t.length&&e.getTime()>t[0].getTime()&&e.getTime()<t[1].getTime()&&r.push("in-range"),r}},render:function(){var e=this,t=arguments[0],n=this.calendars.map((function(n,r){var i=a({},e.$props,{calendar:n,value:e.innerValue,defaultValue:e.defaultValues[r],getClasses:e.getRangeClasses,partialUpdate:!1}),s={select:e.handleSelect,"update:calendar":0===r?e.updateStartCalendar:e.updateEndCalendar};return t("calendar-panel",{props:a({},i),on:a({},s)})})),r=this.prefixClass;return t("div",{class:"".concat(r,"-range-wrapper")},[n])}};var be=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:e.prefixClass+"-scrollbar",style:{position:"relative",overflow:"hidden"}},[t("div",{ref:"wrap",class:e.prefixClass+"-scrollbar-wrap",style:{marginRight:"-"+e.scrollbarWidth+"px"},on:{scroll:e.handleScroll}},[e._t("default")],2),e._v(" "),t("div",{class:e.prefixClass+"-scrollbar-track"},[t("div",{ref:"thumb",class:e.prefixClass+"-scrollbar-thumb",style:{height:e.thumbHeight,top:e.thumbTop},on:{mousedown:e.handleDragstart}})])])},staticRenderFns:[]},void 0,{inject:{prefixClass:{default:"mx"}},data:function(){return{scrollbarWidth:0,thumbTop:"",thumbHeight:""}},created:function(){this.scrollbarWidth=function(){if("undefined"==typeof window)return 0;if(void 0!==fe)return fe;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=document.createElement("div");return t.style.width="100%",e.appendChild(t),fe=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),fe}(),document.addEventListener("mouseup",this.handleDragend)},beforeDestroy:function(){document.addEventListener("mouseup",this.handleDragend)},mounted:function(){this.$nextTick(this.getThumbSize)},methods:{getThumbSize:function(){var e=this.$refs.wrap;if(e){var t=100*e.clientHeight/e.scrollHeight;this.thumbHeight=t<100?"".concat(t,"%"):""}},handleScroll:function(e){var t=e.currentTarget;this.thumbTop="".concat(100*t.scrollTop/t.scrollHeight,"%")},handleDragstart:function(e){e.stopImmediatePropagation(),this._draggable=!0,this._prevY=e.clientY-this.$refs.thumb.offsetTop,document.addEventListener("mousemove",this.handleDraging)},handleDraging:function(e){if(this._draggable){var t=this.$refs.wrap;t.scrollTop=(e.clientY-this._prevY)*t.scrollHeight/t.clientHeight}},handleDragend:function(){this._draggable&&(this._draggable=!1,document.removeEventListener("mousemove",this.handleDraging))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),we=function(e){return(e=parseInt(e,10))<10?"0".concat(e):"".concat(e)},Ce=function(e,t,n){if(Array.isArray(n))return n.filter((function(t){return t>=0&&t<e}));t<=0&&(t=1);for(var r=[],a=0;a<e;a+=t)r.push(a);return r},De=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r<=0)requestAnimationFrame((function(){t.scrollTop=n}));else{var a=n-t.scrollTop,i=a/r*10;requestAnimationFrame((function(){var a=t.scrollTop+i;a>=n?t.scrollTop=n:(t.scrollTop=a,e(t,n,r-10))}))}},xe=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:e.prefixClass+"-time-columns"},e._l(e.columns,(function(n,r){return t("scrollbar-vertical",{key:r,class:e.prefixClass+"-time-column"},[t("ul",{class:e.prefixClass+"-time-list",attrs:{"data-type":n.type,"data-index":r},on:{click:e.handleSelect}},e._l(n.list,(function(n,r){return t("li",{key:n.value,class:[e.prefixClass+"-time-item",e.getClasses(n.value)],attrs:{"data-index":r}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)])})),1)},staticRenderFns:[]},void 0,{name:"ListColumns",components:{ScrollbarVertical:be},inject:{prefixClass:{default:"mx"}},props:{date:Date,getClasses:{type:Function,default:function(){return[]}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},use12h:{type:Boolean,default:!1}},computed:{columns:function(){var e=[];return this.showHour&&e.push({type:"hour",list:this.getHoursList()}),this.showMinute&&e.push({type:"minute",list:this.getMinutesList()}),this.showSecond&&e.push({type:"second",list:this.getSecondsList()}),this.use12h&&e.push({type:"ampm",list:this.getAMPMList()}),e.filter((function(e){return e.list.length>0}))}},watch:{date:{handler:function(){var e=this;this.$nextTick((function(){e.scrollToSelected(100)}))}}},mounted:function(){this.scrollToSelected(0)},methods:{getHoursList:function(){var e=this;return Ce(this.use12h?12:24,this.hourStep,this.hourOptions).map((function(t){var n=new Date(e.date),r=we(t);return e.use12h&&(0===t&&(r="12"),n.getHours()>=12&&(t+=12)),{value:n.setHours(t),text:r}}))},getMinutesList:function(){var e=this;return Ce(60,this.minuteStep,this.minuteOptions).map((function(t){return{value:new Date(e.date).setMinutes(t),text:we(t)}}))},getSecondsList:function(){var e=this;return Ce(60,this.secondStep,this.secondOptions).map((function(t){return{value:new Date(e.date).setSeconds(t),text:we(t)}}))},getAMPMList:function(){var e=this;return["AM","PM"].map((function(t,n){var r=new Date(e.date);return{text:t,value:r.setHours(r.getHours()%12+12*n)}}))},scrollToSelected:function(e){for(var t=this.$el.querySelectorAll(".active"),n=0;n<t.length;n++){var r=t[n],a=K(r,this.$el);if(a)De(a,r.offsetTop,e)}},handleSelect:function(e){var t=e.target,n=e.currentTarget;if("LI"===t.tagName.toUpperCase()){var r=n.getAttribute("data-type"),a=parseInt(n.getAttribute("data-index"),10),i=parseInt(t.getAttribute("data-index"),10);this.$emit("select",this.columns[a].list[i].value,r)}}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function Se(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(":");return e.length>=2?{hours:parseInt(e[0],10),minutes:parseInt(e[1],10)}:null}var ke=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("scrollbar-vertical",e._l(e.list,(function(n){return t("div",{key:n.value,class:[e.prefixClass+"-time-option",e.getClasses(n.value)],on:{click:function(t){return e.handleSelect(n.value)}}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)},staticRenderFns:[]},void 0,{name:"ListOptions",components:{ScrollbarVertical:be},inject:{t:{default:function(){return X}},prefixClass:{default:"mx"}},props:{date:Date,options:{type:[Object,Function],default:function(){return[]}},format:{type:String,default:"HH:mm:ss"},getClasses:{type:Function,default:function(){return[]}}},computed:{list:function(){var e=[],t=this.options;if("function"==typeof t)return t()||[];var n=Se(t.start),r=Se(t.end),a=Se(t.step),i=t.format||this.format;if(n&&r&&a)for(var s=n.minutes+60*n.hours,o=a.minutes+60*a.hours,l=Math.floor((r.minutes+60*r.hours-s)/o),u=0;u<=l;u++){var c=s+u*o,d=Math.floor(c/60),h=c%60,f=new Date(this.date).setHours(d,h,0);e.push({value:f,text:this.formatDate(f,i)})}return e}},mounted:function(){this.scrollToSelected()},methods:{formatDate:function(e,t){return g(e,t,{locale:this.t("formatLocale")})},scrollToSelected:function(){var e=this.$el.querySelector(".active");if(e){var t=K(e,this.$el);if(t)!function(e,t){e&&(e.scrollTop=t)}(t,e.offsetTop)}},handleSelect:function(e){this.$emit("select",e,"time")}}},void 0,!1,void 0,!1,void 0,void 0,void 0),Te=Q({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:e.prefixClass+"-time"},[e.showTimeHeader?t("div",{class:e.prefixClass+"-time-header"},[t("button",{class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-time-header-title",attrs:{type:"button"},on:{click:e.handleClickTitle}},[e._v("\n "+e._s(e.title)+"\n ")])]):e._e(),e._v(" "),t("div",{class:e.prefixClass+"-time-content"},[e.timePickerOptions?t("list-options",{attrs:{date:e.innerValue,"get-classes":e.getClasses,options:e.timePickerOptions,format:e.innerForamt},on:{select:e.handleSelect}}):t("list-columns",e._b({attrs:{date:e.innerValue,"get-classes":e.getClasses,"hour-options":e.hourOptions,"minute-options":e.minuteOptions,"second-options":e.secondOptions,"hour-step":e.hourStep,"minute-step":e.minuteStep,"second-step":e.secondStep},on:{select:e.handleSelect}},"list-columns",e.ShowHourMinuteSecondAMPM,!1))],1)])},staticRenderFns:[]},void 0,{name:"TimePanel",components:{ListColumns:xe,ListOptions:ke},inject:{t:{default:function(){return X}},prefixClass:{default:"mx"}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},format:{default:"HH:mm:ss"},timeTitleFormat:{type:String,default:"YYYY-MM-DD"},showTimeHeader:{type:Boolean,default:!1},disabledTime:{type:Function,default:function(){return!1}},timePickerOptions:{type:[Object,Function],default:function(){return null}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12h:{type:Boolean,default:void 0}},computed:{innerValue:function(){return I(this.value,this.defaultValue)},title:function(){var e=this.timeTitleFormat,t=new Date(this.innerValue);return this.formatDate(t,e)},innerForamt:function(){return"string"==typeof this.format?this.format:"HH:mm:ss"},ShowHourMinuteSecondAMPM:function(){var e=this,t=this.innerForamt,n={showHour:/[HhKk]/.test(t),showMinute:/m/.test(t),showSecond:/s/.test(t),use12h:/a/i.test(t)},r={};return Object.keys(n).forEach((function(t){r[t]="boolean"==typeof e[t]?e[t]:n[t]})),r}},methods:{formatDate:function(e,t){return g(e,t,{locale:this.t("formatLocale")})},isDisabled:function(e){return this.disabledTime(new Date(e))},handleSelect:function(e,t){var n=new Date(e);this.isDisabled(e)||this.$emit("select",n,t)},handleClickTitle:function(){this.$emit("title-click")},getClasses:function(e){var t=new Date(e);return this.isDisabled(e)?"disabled":t.getTime()===this.innerValue.getTime()?"active":""}}},void 0,!1,void 0,!1,void 0,void 0,void 0),Me={name:"TimeRange",inject:{prefixClass:{default:"mx"}},props:a({},Te.props),data:function(){return{startValue:new Date(NaN),endValue:new Date(NaN)}},watch:{value:{immediate:!0,handler:function(){if(j(this.value)){var e=i(this.value,2),t=e[1];this.startValue=e[0],this.endValue=t}else this.startValue=new Date(NaN),this.endValue=new Date(NaN)}}},methods:{emitChange:function(e,t){this.$emit("select",[this.startValue,this.endValue],e,t)},handleSelectStart:function(e,t){this.startValue=e,this.endValue.getTime()>=e.getTime()||(this.endValue=e),this.emitChange(t,0)},handleSelectEnd:function(e,t){this.endValue=e,this.startValue.getTime()<=e.getTime()||(this.startValue=e),this.emitChange(t,1)},disabledStartTime:function(e){return this.disabledTime(e,0)},disabledEndTime:function(e){return e.getTime()<this.startValue.getTime()||this.disabledTime(e,1)}},render:function(){var e=arguments[0],t=Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue],n=this.prefixClass;return e("div",{class:"".concat(n,"-range-wrapper")},[e(Te,{props:a({},a({},this.$props,{value:this.startValue,defaultValue:t[0],disabledTime:this.disabledStartTime})),on:a({},a({},this.$listeners,{select:this.handleSelectStart}))}),e(Te,{props:a({},a({},this.$props,{value:this.endValue,defaultValue:t[1],disabledTime:this.disabledEndTime})),on:a({},a({},this.$listeners,{select:this.handleSelectEnd}))})])}};function _e(){return(_e=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)}var Ve=["attrs","props","domProps"],Oe=["class","style","directives"],Ye=["on","nativeOn"],Ae=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Fe=function(e){return e.reduce((function(e,t){for(var n in t)if(e[n])if(-1!==Ve.indexOf(n))e[n]=_e({},e[n],t[n]);else if(-1!==Oe.indexOf(n)){var r=e[n]instanceof Array?e[n]:[e[n]],a=t[n]instanceof Array?t[n]:[t[n]];e[n]=r.concat(a)}else if(-1!==Ye.indexOf(n))for(var i in t[n])if(e[n][i]){var s=e[n][i]instanceof Array?e[n][i]:[e[n][i]],o=t[n][i]instanceof Array?t[n][i]:[t[n][i]];e[n][i]=s.concat(o)}else e[n][i]=t[n][i];else if("hook"==n)for(var l in t[n])e[n][l]=e[n][l]?Ae(e[n][l],t[n][l]):t[n][l];else e[n]=t[n];else e[n]=t[n];return e}),{})},Pe={name:"DatetimePanel",inject:{prefixClass:{default:"mx"}},props:a({},ye.props,{},Te.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){"date"===t&&this.openTimePanel();var n=H(e,I(this.value,this.defaultValue));this.disabledTime(new Date(n))&&(n=H(e,this.defaultValue),this.disabledTime(new Date(n)))?this.currentValue=n:this.emitDate(n,t)}},render:function(){var e=arguments[0],t={props:a({},L(this,Object.keys(ye.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:a({},L(this,Object.keys(Te.props)),{showTimeHeader:!0,value:this.currentValue}),on:{select:this.emitDate,"title-click":this.closeTimePanel}},r=this.prefixClass;return e("div",[e(ye,Fe([{},t])),this.timeVisible&&e(Te,Fe([{class:"".concat(r,"-calendar-time")},n]))])}},Ne={name:"DatetimeRange",inject:{prefixClass:{default:"mx"}},props:a({},ge.props,{},Me.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){var n=this;"date"===t&&this.openTimePanel();var r=Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue],a=e.map((function(e,t){return H(e,j(n.value)?n.value[t]:r[t])}));a[1].getTime()<a[0].getTime()&&(a=[a[0],a[0]]),a.some(this.disabledTime)&&(a=e.map((function(e,t){return H(e,r[t])}))).some(this.disabledTime)?this.currentValue=a:this.emitDate(a,t)}},render:function(){var e=arguments[0],t={props:a({},L(this,Object.keys(ge.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:a({},L(this,Object.keys(Me.props)),{value:this.currentValue,showTimeHeader:!0}),on:{select:this.emitDate,"title-click":this.closeTimePanel}},r=this.prefixClass;return e("div",[e(ge,Fe([{},t])),this.timeVisible&&e(Me,Fe([{class:"".concat(r,"-calendar-time")},n]))])}},$e={default:ye,time:Te,datetime:Pe},je={default:ge,time:Me,datetime:Ne},Ie=Q({render:function(){var e,t=this,r=t._self._c||t.$createElement;return r("div",{class:(e={},e[t.prefixClass+"-datepicker"]=!0,e[t.prefixClass+"-datepicker-range"]=t.range,e[t.prefixClass+"-datepicker-inline"]=t.inline,e.disabled=t.disabled,e)},[t.inline?t._e():r("div",{class:t.prefixClass+"-input-wrapper",on:{mousedown:t.openPopup,touchstart:t.openPopup}},[t._t("input",[r("input",t._b({ref:"input",class:t.inputClass,attrs:{disabled:t.disabled,readonly:!t.editable,placeholder:t.placeholder},on:{keydown:t.handleInputKeydown,focus:t.handleInputFocus,blur:t.handleInputBlur,input:t.handleInputInput,change:t.handleInputChange}},"input",n({},{name:"date",type:"text",autocomplete:"off",value:t.text},t.inputAttr),!1))]),t._v(" "),t.showClearIcon?r("i",{class:t.prefixClass+"-icon-clear",on:{mousedown:function(e){return e.stopPropagation(),t.handleClear(e)}}},[t._t("icon-clear",[r("icon-close")])],2):t._e(),t._v(" "),r("i",{class:t.prefixClass+"-icon-calendar"},[t._t("icon-calendar",[r("icon-calendar")])],2)],2),t._v(" "),r("Popup",{ref:"popup",class:t.popupClass,style:t.popupStyle,attrs:{inline:t.inline,visible:t.popupVisible,"append-to-body":t.appendToBody},on:{clickoutside:t.handleClickOutSide}},[t.hasSlot("sidebar")||t.shortcuts.length?r("div",{class:t.prefixClass+"-datepicker-sidebar"},[t._t("sidebar",null,{value:t.currentValue,emit:t.emitValue}),t._v(" "),t._l(t.shortcuts,(function(e,n){return r("button",{key:n,class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-shortcut",attrs:{type:"button"},on:{click:function(n){return t.handleSelectShortcut(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2):t._e(),t._v(" "),r("div",{class:t.prefixClass+"-datepicker-content"},[t.hasSlot("header")?r("div",{class:t.prefixClass+"-datepicker-header"},[t._t("header",null,{value:t.currentValue,emit:t.emitValue})],2):t._e(),t._v(" "),r("div",{class:t.prefixClass+"-datepicker-body"},[t._t("content",[r(t.currentComponent,t._b({ref:"picker",tag:"component",on:{select:t.handleSelectDate}},"component",t.currentComponentProps,!1))],{value:t.currentValue,emit:t.emitValue})],2),t._v(" "),t.hasSlot("footer")||t.confirm?r("div",{class:t.prefixClass+"-datepicker-footer"},[t._t("footer",null,{value:t.currentValue,emit:t.emitValue}),t._v(" "),t.confirm?r("button",{class:t.prefixClass+"-btn "+t.prefixClass+"-datepicker-btn-confirm",attrs:{type:"button"},on:{click:t.handleConfirmDate}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()],2):t._e()])])],1)},staticRenderFns:[]},void 0,{name:"DatePicker",components:{IconCalendar:ee,IconClose:te,Popup:G},provide:function(){return{t:this.getLocaleFieldValue,getWeek:this.getWeek,prefixClass:this.prefixClass}},props:a({},Pe.props,{value:{},valueType:{type:String,default:"date"},type:{type:String,default:"date"},format:{type:[String,Object],default:function(){var e={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",year:"YYYY",month:"YYYY-MM",time:"HH:mm:ss",week:"w"};return e[this.type]||e.date}},range:{type:Boolean,default:!1},rangeSeparator:{type:String,default:" ~ "},lang:{type:[String,Object]},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},prefixClass:{type:String,default:"mx"},inputClass:{default:function(){return"".concat(this.prefixClass,"-input")}},inputAttr:{type:Object,default:function(){return{}}},appendToBody:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},popupClass:{},popupStyle:{type:Object,default:function(){return{}}},inline:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:"OK"},shortcuts:{type:Array,validator:function(e){return Array.isArray(e)&&e.every((function(e){return W(e)&&"string"==typeof e.text&&"function"==typeof e.onClick}))},default:function(){return[]}}}),data:function(){return{currentValue:null,userInput:null,defaultOpen:!1}},computed:{currentComponent:function(){var e=this.range?je:$e;return e[this.type]||e.default},currentComponentProps:function(){return a({},L(this,Object.keys(this.currentComponent.props)),{value:this.currentValue})},popupVisible:function(){return!this.disabled&&("boolean"==typeof this.open?this.open:this.defaultOpen)},innerValue:function(){var e=this.value;return this.range?(e=Array.isArray(e)?e.slice(0,2):[null,null]).map(this.value2date):this.value2date(this.value)},text:function(){var e=this;if(null!==this.userInput)return this.userInput;if(!this.isValidValue(this.innerValue))return"";var t=this.format;return Array.isArray(this.innerValue)?this.innerValue.map((function(n){return e.formatDate(n,t)})).join(this.rangeSeparator):this.formatDate(this.innerValue,t)},showClearIcon:function(){return!this.disabled&&this.clearable&&this.text},locale:function(){return W(this.lang)?function e(n,r){if(!W(n))return{};var i=n;return W(r)&&Object.keys(r).forEach((function(s){var o=r[s];W(o)&&W(n[s])&&(o=e(n[s],o)),i=a({},i,t({},s,o))})),i}(Z(),this.lang):Z(this.lang)}},watch:{innerValue:{immediate:!0,handler:function(e){this.currentValue=e}}},methods:{handleClickOutSide:function(e){this.$el.contains(e.target)||this.closePopup()},getWeek:function(e,t){return W(this.format)&&"function"==typeof this.format.getWeek?this.format.getWeek(e,t):d(e,t)},parseDate:function(e,t){if(W(this.format)&&"function"==typeof this.format.parse)return this.format.parse(e,t);var n=new Date;return P(e,t,{locale:this.locale.formatLocale,backupDate:n})},formatDate:function(e,t){return W(this.format)&&"function"==typeof this.format.stringify?this.format.stringify(e,t):g(e,t,{locale:this.locale.formatLocale})},value2date:function(e){switch(this.valueType){case"date":return e instanceof Date?new Date(e.getTime()):new Date(NaN);case"timestamp":return"number"==typeof e?new Date(e):new Date(NaN);case"format":return"string"==typeof e?this.parseDate(e,this.format):new Date(NaN);default:return"string"==typeof e?this.parseDate(e,this.valueType):new Date(NaN)}},date2value:function(e){if(!$(e))return null;switch(this.valueType){case"date":return e;case"timestamp":return e.getTime();case"format":return this.formatDate(e,this.format);default:return this.formatDate(e,this.valueType)}},emitValue:function(e,t){this.userInput=null;var n=Array.isArray(e)?e.map(this.date2value):this.date2value(e);return this.$emit("input",n),this.$emit("change",n,t),this.afterEmitValue(t),n},afterEmitValue:function(e){e&&e!==this.type&&"time"!==e||this.closePopup()},isValidValue:function(e){return(this.range?j:$)(e)},handleSelectDate:function(e,t){this.confirm?this.currentValue=e:this.emitValue(e,t)},handleClear:function(){this.emitValue(this.range?[null,null]:null),this.$emit("clear")},handleConfirmDate:function(){var e=this.emitValue(this.currentValue);this.$emit("confirm",e)},handleSelectShortcut:function(e){if(W(e)&&"function"==typeof e.onClick){var t=e.onClick(this);t&&this.emitValue(t)}},openPopup:function(e){this.popupVisible||(this.defaultOpen=!0,this.$emit("open",e),this.$emit("update:open",!0))},closePopup:function(){this.popupVisible&&(this.defaultOpen=!1,this.$emit("close"),this.$emit("update:open",!1))},blur:function(){this.$refs.input.blur()},focus:function(){this.$refs.input.focus()},handleInputChange:function(){var e=this;if(this.editable&&null!==this.userInput){var t=this.userInput.trim();if(this.userInput=null,""!==t){var n;if(this.range){var r=t.split(this.rangeSeparator);2!==r.length&&(r=t.split(this.rangeSeparator.trim())),n=r.map((function(t){return e.parseDate(t.trim(),e.format)}))}else n=this.parseDate(t,this.format);this.isValidValue(n)?(this.emitValue(n),this.blur()):this.$emit("input-error",t)}else this.handleClear()}},handleInputInput:function(e){this.userInput=e.target.value},handleInputKeydown:function(e){var t=e.keyCode;9===t?this.closePopup():13===t&&this.handleInputChange()},handleInputBlur:function(e){this.$emit("blur",e)},handleInputFocus:function(e){this.openPopup(e),this.$emit("focus",e)},hasSlot:function(e){return!(!this.$slots[e]&&!this.$scopedSlots[e])},getLocaleFieldValue:function(e){return X(e,this.locale)}}},void 0,!1,void 0,!1,void 0,void 0,void 0);return Ie.locale=U,Ie.install=function(e){e.component(Ie.name,Ie)},"undefined"!=typeof window&&window.Vue&&Ie.install(window.Vue),n(Ie,{CalendarPanel:ye,CalendarRange:ge,TimePanel:Te,TimeRange:Me,DatetimePanel:Pe,DatetimeRange:Ne}),Ie}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DatePicker=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?r(a,!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function o(e){return s(e)?new Date(e.getTime()):null==e?new Date(NaN):new Date(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>=0&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var n=o(e),r=(n.getDay()+7-t)%7;return n.setDate(n.getDate()-r),n.setHours(0,0,0,0),n}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,r=void 0===n?0:n,a=t.firstWeekContainsDate,i=void 0===a?1:a;if(!(i>=1&&i<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7");for(var s=o(e),u=s.getFullYear(),c=new Date(0),d=u+1;d>=u-1&&(c.setFullYear(d,0,i),c.setHours(0,0,0,0),c=l(c,r),!(s.getTime()>=c.getTime()));d--);return c}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,r=void 0===n?0:n,a=t.firstWeekContainsDate,i=void 0===a?1:a,s=o(e),c=l(s,r),d=u(s,{firstDayOfWeek:r,firstWeekContainsDate:i}),h=c.getTime()-d.getTime();return Math.round(h/6048e5)+1}var d={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"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},h=/\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;function f(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="".concat(Math.abs(e)),r=e<0?"-":"";n.length<t;)n="0".concat(n);return r+n}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",r=Math.abs(e),a=r%60;return n+f(Math.floor(r/60),2)+t+f(a,2)}var m=function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLocaleLowerCase():r},v={Y:function(e){var t=e.getFullYear();return t<=9999?"".concat(t):"+".concat(t)},YY:function(e){return f(e.getFullYear(),4).substr(2)},YYYY:function(e){return f(e.getFullYear(),4)},M:function(e){return e.getMonth()+1},MM:function(e){return f(e.getMonth()+1,2)},MMM:function(e,t){return t.monthsShort[e.getMonth()]},MMMM:function(e,t){return t.months[e.getMonth()]},D:function(e){return e.getDate()},DD:function(e){return f(e.getDate(),2)},H:function(e){return e.getHours()},HH:function(e){return f(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(){var e=v.h.apply(v,arguments);return f(e,2)},m:function(e){return e.getMinutes()},mm:function(e){return f(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return f(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return f(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return f(e.getMilliseconds(),3)},d:function(e){return e.getDay()},dd:function(e,t){return t.weekdaysMin[e.getDay()]},ddd:function(e,t){return t.weekdaysShort[e.getDay()]},dddd:function(e,t){return t.weekdays[e.getDay()]},A:function(e,t){return(t.meridiem||m)(e.getHours(),e.getMinutes(),!1)},a:function(e,t){return(t.meridiem||m)(e.getHours(),e.getMinutes(),!0)},Z:function(e){return p(e.getTimezoneOffset(),":")},ZZ:function(e){return p(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()},w:function(e,t){return c(e,{firstDayOfWeek:t.firstDayOfWeek,firstWeekContainsDate:t.firstWeekContainsDate})},ww:function(e,t){return f(v.w(e,t),2)}};function y(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",i=o(e);if(!s(n=i)||isNaN(n.getTime()))return"Invalid Date";var l=r.locale||d;return a.replace(h,(function(e,t){return t||("function"==typeof v[e]?"".concat(v[e](i,l)):e)}))}function g(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=/(\[[^\[]*\])|(MM?M?M?|Do|DD?|ddd?d?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|S{1,3}|x|X|ZZ?|.)/g,S=/\d/,T=/\d\d/,k=/\d\d?/,M=/[+-]?\d+/,V=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,_={},O=function(e,t,n){var r,a=Array.isArray(e)?e:[e];r="string"==typeof n?function(e){var t=parseInt(e,10);return D({},n,t)}:n,a.forEach((function(e){_[e]=[t,r]}))},Y=function(e,t){return function(n,r){var a=r[e];if(!Array.isArray(a))throw new Error("Locale[".concat(e,"] need an array"));var i=a.indexOf(n);if(i<0)throw new Error("Invalid Word");return D({},t,i)}};function A(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];return a<100&&a>=0?(n[0]+=400,e=new Date(Date.UTC.apply(Date,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(a)):e=new Date(Date.UTC.apply(Date,n)),e}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var r=n.locale,a=void 0===r?d:r,i=n.backupDate,s=void 0===i?new Date:i,o=function(e,t,n){var r=t.match(x);if(!r)throw new Error;for(var a=r.length,i={},s=0;s<a;s+=1){var o=r[s],l=_[o];if(l){var u="function"==typeof l[0]?l[0](n):l[0],c=l[1],d=(u.exec(e)||[])[0];i=w({},i,{},c(d,n)),e=e.replace(d,"")}else{var h=o.replace(/^\[|\]$/g,"");if(0!==e.indexOf(h))throw new Error("not match");e=e.substr(h.length)}}return i}(e,t,a),l=o.year,c=o.month,h=o.day,f=o.date,p=o.offset,m=o.weekday,v=o.week;if(f)return f;var y=[l,c,h,o.hour,o.minute,o.second,o.millisecond];if(y[3]=function(e,t){if(void 0!==e&&void 0!==t)if(t){if(e<12)return e+12}else if(12===e)return 0;return e}(y[3],o.isPM),void 0!==v&&void 0===c&&void 0===h){var b=u(void 0===l?s:new Date(l,3),{firstDayOfWeek:a.firstDayOfWeek,firstWeekContainsDate:a.firstWeekContainsDate});return new Date(b.getTime()+7*(v-1)*24*3600*1e3)}var C=A.apply(void 0,g(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=[0,0,1,0,0,0,0],r=[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],a=!0,i=0;i<7;i++)void 0===e[i]?n[i]=a?r[i]:n[i]:(n[i]=e[i],a=!1);return n}(y,s))),D=60*(void 0===p?C.getTimezoneOffset():p)*1e3,S=new Date(C.getTime()+D);return void 0!==m&&S.getDay()!==m?new Date(NaN):S}catch(e){return new Date(NaN)}}function P(e){var t=new Date(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:0);return e<100&&e>=0&&t.setFullYear(e),t}function N(e){return e instanceof Date&&!isNaN(e)}function $(e){return Array.isArray(e)&&2===e.length&&e.every(N)&&e[0]<=e[1]}function I(e){var t=new Date(e);if(N(t))return t;for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.length?I.apply(void 0,r):new Date}function j(e,t){var n=new Date(e),r=new Date(t);return n.setHours(r.getHours(),r.getMinutes(),r.getSeconds()),n}function H(e,t){if(!Array.isArray(e))return[];var n=[],r=e.length,a=0;for(t=t||r;a<r;)n.push(e.slice(a,a+=t));return n}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function W(e,t){if(!E(e))return{};Array.isArray(t)||(t=[t]);var n={};return t.forEach((function(t){t in e&&(n[t]=e[t])})),n}O("Y",M,"year"),O("YY",T,(function(e){var t=(new Date).getFullYear(),n=Math.floor(t/100),r=parseInt(e,10);return D({},"year",r=100*(r>68?n-1:n)+r)})),O("YYYY",/\d{4}/,"year"),O("M",k,(function(e){return D({},"month",parseInt(e,10)-1)})),O("MM",T,(function(e){return D({},"month",parseInt(e,10)-1)})),O("MMM",V,Y("monthsShort","month")),O("MMMM",V,Y("months","month")),O("D",k,"day"),O("DD",T,"day"),O(["H","h"],k,"hour"),O(["HH","hh"],T,"hour"),O("m",k,"minute"),O("mm",T,"minute"),O("s",k,"second"),O("ss",T,"second"),O("S",S,(function(e){return D({},"millisecond",100*parseInt(e,10))})),O("SS",T,(function(e){return D({},"millisecond",10*parseInt(e,10))})),O("SSS",/\d{3}/,"millisecond"),O(["A","a"],(function(e){return e.meridiemParse||/[ap]\.?m?\.?/i}),(function(e,t){return{isPM:"function"==typeof t.isPM?t.isPM(e):function(e){return"p"==="".concat(e).toLowerCase().charAt(0)}(e)}})),O(["Z","ZZ"],/[+-]\d\d:?\d\d/,(function(e){return{offset:(t=e,n=C(t.match(/([+-]|\d\d)/g)||["-","0","0"],3),r=n[0],a=n[2],i=60*parseInt(n[1],10)+parseInt(a,10),0===i?0:"+"===r?-i:+i)};var t,n,r,a,i})),O("x",M,(function(e){return{date:new Date(parseInt(e,10))}})),O("X",/[+-]?\d+(\.\d{1,3})?/,(function(e){return{date:new Date(1e3*parseFloat(e))}})),O("d",S,"weekday"),O("dd",V,Y("weekdaysMin","weekday")),O("ddd",V,Y("weekdaysShort","weekday")),O("dddd",V,Y("weekdays","weekday")),O("w",k,"week"),O("ww",T,"week");var L,B=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={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"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},e.exports=t.default})),R=(L=B)&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L,q="en",z={};function J(e,t,n){if("string"!=typeof e)return z[q];var r=q;return z[e]&&(r=e),t&&(z[e]=t,r=e),n||(q=r),z[e]||z[q]}function U(e){return J(e,null,!0)}function Z(e,t){for(var n,r=(e||"").split("."),a=t||U(),i=0,s=r.length;i<s;i++){if(n=a[r[i]],i===s-1)return n;if(!n)return null;a=n}return null}function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;if(!e||e===t)return null;var n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)};return/(auto|scroll)/.test(n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x"))?e:X(e.parentNode,t)}z[q]={formatLocale:R,yearFormat:"YYYY",monthFormat:"MMM",monthBeforeYear:!0};var K={name:"Popup",inject:{prefixClass:{default:"mx"}},props:{visible:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0},inline:{type:Boolean,default:!1}},data:function(){return{top:"",left:""}},watch:{visible:{immediate:!0,handler:function(e){var t=this;this.$nextTick((function(){e&&t.displayPopup()}))}}},mounted:function(){var e=this;if(!this.inline){this.appendToBody&&document.body.appendChild(this.$el),this._clickoutEvent="ontouchend"in document?"touchstart":"mousedown",document.addEventListener(this._clickoutEvent,this.handleClickOutside);var t,n,r=this.$parent.$el;this._displayPopup=(t=function(){return e.displayPopup()},n=!1,function(){for(var e=this,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];n||(n=!0,requestAnimationFrame((function(){n=!1,t.apply(e,a)})))}),this._scrollParent=X(r)||window,this._scrollParent.addEventListener("scroll",this._displayPopup),window.addEventListener("resize",this._displayPopup)}},beforeDestroy:function(){this.inline||(this.appendToBody&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),document.removeEventListener(this._clickoutEvent,this.handleClickOutside),this._scrollParent.removeEventListener("scroll",this._displayPopup),window.removeEventListener("resize",this._displayPopup))},methods:{handleClickOutside:function(e){if(this.visible){var t=this.$el;t&&!t.contains(e.target)&&this.$emit("clickoutside",e)}},displayPopup:function(){if(!this.inline&&this.visible){var e=this.$parent.$el,t=this.appendToBody;this._popupRect||(this._popupRect=function(e){var t=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";var r=window.getComputedStyle(e),a=e.offsetWidth+parseInt(r.marginLeft,10)+parseInt(r.marginRight,10),i=e.offsetHeight+parseInt(r.marginTop,10)+parseInt(r.marginBottom,10);return e.style.display=t,e.style.visibility=n,{width:a,height:i}}(this.$el));var n=this._popupRect,r=function(e,t,n,r){var a=0,i=0,s=0,o=e.getBoundingClientRect(),l=document.documentElement.clientWidth,u=document.documentElement.clientHeight;return r&&(i=window.pageXOffset+o.left,s=window.pageYOffset+o.top),a=o.top<=n&&u-o.bottom<=n?s+u-o.top-n:o.top+o.height/2<=u/2?s+o.height:s-n,{left:"".concat(l-o.left<t&&o.right<t?i-o.left+1:o.left+o.width/2<=l/2?i:i+o.width-t,"px"),top:"".concat(a,"px")}}(e,n.width,n.height,t),a=r.top;this.left=r.left,this.top=a}}},render:function(){var e=arguments[0],t=this.prefixClass;return this.inline?e("div",{class:"".concat(t,"-datepicker-main")},[this.$slots.default]):e("transition",{attrs:{name:"".concat(t,"-zoom-in-down")}},[this.visible&&e("div",{class:"".concat(t,"-datepicker-main ").concat(t,"-datepicker-popup"),style:{top:this.top,left:this.left,position:"absolute"}},[this.$slots.default])])}};function G(e,t,n,r,a,i,s,o,l,u){"boolean"!=typeof s&&(l=o,o=s,s=!1);var c,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,a&&(d.functional=!0)),r&&(d._scopeId=r),i?d._ssrRegister=c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)}:t&&(c=s?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return n}"undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());var Q=G({render:function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M940.218182 107.054545h-209.454546V46.545455h-65.163636v60.50909H363.054545V46.545455H297.890909v60.50909H83.781818c-18.618182 0-32.581818 13.963636-32.581818 32.581819v805.236363c0 18.618182 13.963636 32.581818 32.581818 32.581818h861.090909c18.618182 0 32.581818-13.963636 32.581818-32.581818V139.636364c-4.654545-18.618182-18.618182-32.581818-37.236363-32.581819zM297.890909 172.218182V232.727273h65.163636V172.218182h307.2V232.727273h65.163637V172.218182h176.872727v204.8H116.363636V172.218182h181.527273zM116.363636 912.290909V442.181818h795.927273v470.109091H116.363636z"}})])},staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),ee=G({render:function(){var e=this._self._c||this.$createElement;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M810.005333 274.005333l-237.994667 237.994667 237.994667 237.994667-60.010667 60.010667-237.994667-237.994667-237.994667 237.994667-60.010667-60.010667 237.994667-237.994667-237.994667-237.994667 60.010667-60.010667 237.994667 237.994667 237.994667-237.994667z"}})])},staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0);function te(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Object.prototype.toString.call(t);return t instanceof Date||"object"===e(t)&&"[object Date]"===n?new Date(t.getTime()):"number"==typeof t||"[object Number]"===n?new Date(t):("string"!=typeof t&&"[object String]"!==n||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function ne(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function re(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e);return t.setHours(0,0,0,0),t}function ae(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e),n=t.getFullYear(),r=t.getMonth(),a=new Date(0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function ie(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),r=ne(t),a=n.getMonth()+r,i=new Date(0);i.setFullYear(n.getFullYear(),a,1),i.setHours(0,0,0,0);var s=ae(i);return n.setMonth(a,Math.min(s,n.getDate())),n}function se(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ie(e,12*ne(t))}function oe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function le(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=te(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ue(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),r=ne(t),a=n.getFullYear(),i=n.getDate(),s=new Date(0);s.setFullYear(a,r,15),s.setHours(0,0,0,0);var o=ae(s);return n.setMonth(r,Math.min(i,o)),n}function ce(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),r=ne(t);return isNaN(n)?new Date(NaN):(n.setFullYear(r),n)}function de(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ie(e,-ne(t))}var he,fe=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-date"},[t("thead",[t("tr",[e.showWeekNumber?t("th",{class:e.prefixClass+"-week-number-header"}):e._e(),e._v(" "),e._l(e.days,(function(n){return t("th",{key:n},[e._v(e._s(n))])}))],2)]),e._v(" "),t("tbody",{on:{click:e.handleCellClick}},e._l(e.dates,(function(n,r){return t("tr",{key:r,class:[e.prefixClass+"-date-row",e.getRowClasses(n)]},[e.showWeekNumber?t("td",{class:e.prefixClass+"-week-number"},[e._v("\n "+e._s(e.getWeekNumber(n[0].day))+"\n ")]):e._e(),e._v(" "),e._l(n,(function(n,r){return t("td",{key:r,staticClass:"cell",class:e.getCellClasses(n.day),attrs:{"data-day":n.day,title:e.getCellTitle(n.day)}},[t("div",[e._v(e._s(n.text))])])}))],2)})),0)])},staticRenderFns:[]},void 0,{name:"TableDate",inject:{t:{default:function(){return Z}},getWeek:{default:function(){return c}},prefixClass:{default:"mx"}},props:{calendarYear:{type:Number,default:function(){return(new Date).getFullYear()}},calendarMonth:{type:Number,default:function(){return(new Date).getMonth()}},showWeekNumber:{type:Boolean,default:!1},titleFormat:{type:String,default:"YYYY-MM-DD"},getRowClasses:{type:Function,default:function(){return[]}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{firstDayOfWeek:function(){return this.t("formatLocale.firstDayOfWeek")||0},days:function(){var e=this.t("days")||this.t("formatLocale.weekdaysMin");return e.concat(e).slice(this.firstDayOfWeek,this.firstDayOfWeek+7)},dates:function(){for(var e=[],t=this.firstDayOfWeek,n=this.calendarMonth,r=P(this.calendarYear,n,0),a=r.getDate(),i=a-(r.getDay()+7-t)%7,s=i;s<=a;s++){e.push({day:s-a,text:s})}r.setMonth(n+1,0);for(var o=r.getDate(),l=1;l<=o;l++)e.push({day:l,text:l});for(var u=42-(a-i+1)-o,c=1;c<=u;c++)e.push({day:o+c,text:c});return H(e,7)}},methods:{formatDate:function(e,t){return y(e,t,{locale:this.t("formatLocale")})},handleCellClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-day");n&&this.$emit("select",parseInt(n,10))},getCellTitle:function(e){var t=this.titleFormat,n=P(this.calendarYear,this.calendarMonth,e);return this.formatDate(n,t)},getWeekNumber:function(e){var t=P(this.calendarYear,this.calendarMonth,e);return this.getWeek(t,this.t("formatLocale"))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),pe=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-month",on:{click:e.handleClick}},e._l(e.months,(function(n,r){return t("tr",{key:r},e._l(n,(function(n,r){return t("td",{key:r,staticClass:"cell",class:e.getCellClasses(n.month),attrs:{"data-month":n.month}},[t("div",[e._v(e._s(n.text))])])})),0)})),0)},staticRenderFns:[]},void 0,{name:"TableMonth",inject:{t:{default:function(){return Z}},prefixClass:{default:"mx"}},props:{getCellClasses:{type:Function,default:function(){return[]}}},computed:{months:function(){var e=(this.t("months")||this.t("formatLocale.monthsShort")).map((function(e,t){return{text:e,month:t}}));return H(e,3)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-month");n&&this.$emit("select",parseInt(n,10))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),me=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-year",on:{click:e.handleClick}},e._l(e.years,(function(n,r){return t("tr",{key:r},e._l(n,(function(n,r){return t("td",{key:r,staticClass:"cell",class:e.getCellClasses(n),attrs:{"data-year":n}},[t("div",[e._v(e._s(n))])])})),0)})),0)},staticRenderFns:[]},void 0,{name:"TableYear",inject:{prefixClass:{default:"mx"}},props:{decade:Number,getCellClasses:{type:Function,default:function(){return[]}}},computed:{years:function(){for(var e=this.decade,t=[],n=0;n<10;n++)t.push(e+n);return H(t,2)}},methods:{handleClick:function(e){var t=e.target;"DIV"===t.tagName&&(t=t.parentNode);var n=t.getAttribute("data-year");n&&this.$emit("select",parseInt(n,10))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ve=G({render:function(){var e,t=this,n=t._self._c||t.$createElement;return n("div",{class:[t.prefixClass+"-calendar",t.prefixClass+"-calendar-panel-"+t.panel,(e={},e[t.prefixClass+"-calendar-week-mode"]="week"===t.type,e)]},[n("div",{class:t.prefixClass+"-calendar-header"},[n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconDoubleArrow,expression:"showIconDoubleArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-double-left",attrs:{type:"button"},on:{click:t.handleIconDoubleLeftClick}},[n("i",{class:t.prefixClass+"-icon-double-left"})]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconArrow,expression:"showIconArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-left",attrs:{type:"button"},on:{click:t.handleIconLeftClick}},[n("i",{class:t.prefixClass+"-icon-left"})]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconDoubleArrow,expression:"showIconDoubleArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-double-right",attrs:{type:"button"},on:{click:t.handleIconDoubleRightClick}},[n("i",{class:t.prefixClass+"-icon-double-right"})]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:t.showIconArrow,expression:"showIconArrow"}],class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-icon-right",attrs:{type:"button"},on:{click:t.handleIconRightClick}},[n("i",{class:t.prefixClass+"-icon-right"})]),t._v(" "),n("span",{class:t.prefixClass+"-calendar-header-label"},["year"===t.panel?[n("span",[t._v(t._s(t.calendarDecade))]),t._v(" "),n("span",{class:t.prefixClass+"-calendar-decade-separator"}),t._v(" "),n("span",[t._v(t._s(t.calendarDecade+9))])]:"month"===t.panel?n("button",{class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text",attrs:{type:"button"},on:{click:function(e){return t.handelPanelChange("year")}}},[t._v("\n "+t._s(t.calendarYear)+"\n ")]):"date"===t.panel?t._l(t.dateHeader,(function(e){return n("button",{key:e.panel,class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-current-"+e.panel,attrs:{type:"button"},on:{click:function(n){return t.handelPanelChange(e.panel)}}},[t._v("\n "+t._s(e.label)+"\n ")])})):t._e()],2)]),t._v(" "),n("div",{class:t.prefixClass+"-calendar-content"},[n("table-year",{directives:[{name:"show",rawName:"v-show",value:"year"===t.panel,expression:"panel === 'year'"}],attrs:{decade:t.calendarDecade,"get-cell-classes":t.getYearClasses},on:{select:t.handleSelectYear}}),t._v(" "),"year"!==t.type?n("table-month",{directives:[{name:"show",rawName:"v-show",value:"month"===t.panel,expression:"panel === 'month'"}],attrs:{"get-cell-classes":t.getMonthClasses},on:{select:t.handleSelectMonth}}):t._e(),t._v(" "),"year"!==t.type&&"month"!==t.type?n("table-date",{directives:[{name:"show",rawName:"v-show",value:"date"===t.panel,expression:"panel === 'date'"}],attrs:{"calendar-year":t.calendarYear,"calendar-month":t.calendarMonth,"title-format":t.titleFormat,"show-week-number":"boolean"==typeof t.showWeekNumber?t.showWeekNumber:"week"===t.type,"get-cell-classes":t.getDateClasses,"get-row-classes":t.getWeekState},on:{select:t.handleSelectDate}}):t._e()],1)])},staticRenderFns:[]},void 0,{name:"CalendarPanel",components:{TableDate:fe,TableMonth:pe,TableYear:me},mixins:[{methods:{dispatch:function(e){for(var t=this.$parent||this.$root,n=t.$options.name;t&&(!n||n!==e);)(t=t.$parent)&&(n=t.$options.name);if(t){for(var r,a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];(r=t).$emit.apply(r,i)}}}}],inject:{t:{default:function(){return Z}},prefixClass:{default:"mx"}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},defaultPanel:{type:String},disabledDate:{type:Function,default:function(){return!1}},type:{type:String,default:"date"},getClasses:{type:Function,default:function(){return[]}},showWeekNumber:{type:Boolean,default:void 0},titleFormat:{type:String,default:"YYYY-MM-DD"},calendar:Date,partialUpdate:{type:Boolean,default:!1}},data:function(){var e=["date","month","year"],t=Math.max(e.indexOf(this.type),e.indexOf(this.defaultPanel));return{panel:-1!==t?e[t]:"date",innerCalendar:null}},computed:{innerValue:function(){var e=Array.isArray(this.value)?this.value:[this.value],t={year:le,month:oe,date:re},n=t[this.type]||t.date;return e.filter(N).map((function(e){return n(e)}))},calendarYear:function(){return this.innerCalendar.getFullYear()},calendarMonth:function(){return this.innerCalendar.getMonth()},calendarDecade:function(){return 10*Math.floor(this.calendarYear/10)},showIconDoubleArrow:function(){return"date"===this.panel||"month"===this.panel||"year"===this.panel},showIconArrow:function(){return"date"===this.panel},dateHeader:function(){var e=this.t("monthBeforeYear"),t=this.t("yearFormat"),n=this.t("monthFormat")||"MMM",r={panel:"year",label:this.formatDate(this.innerCalendar,t)},a={panel:"month",label:this.formatDate(this.innerCalendar,n)};return e?[a,r]:[r,a]}},watch:{value:{immediate:!0,handler:"initCalendar"},calendar:{handler:"initCalendar"},defaultValue:{handler:"initCalendar"}},methods:{formatDate:function(e,t){return y(e,t,{locale:this.t("formatLocale")})},initCalendar:function(){var e=this.calendar;if(!N(e)){var t=this.innerValue.length;e=I(t>0?this.innerValue[t-1]:this.defaultValue)}this.innerCalendar=e},isDisabled:function(e){return this.disabledDate(new Date(e),this.innerValue)},emitDate:function(e,t){this.isDisabled(e)||(this.$emit("select",e,t,this.innerValue),this.dispatch("DatePicker","pick",e,t))},updateCalendar:function(e,t){var n=new Date(this.innerCalendar);this.innerCalendar=e,this.$emit("update:calendar",e),this.dispatch("DatePicker","calendar-change",e,n,t)},handelPanelChange:function(e){this.panel=e},handleIconLeftClick:function(){var e=de(this.innerCalendar,1);this.updateCalendar(e,"last-month")},handleIconRightClick:function(){var e=ie(this.innerCalendar,1);this.updateCalendar(e,"next-month")},handleIconDoubleLeftClick:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return se(e,-ne(t))}(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e,"year"===this.panel?"last-decade":"last-year")},handleIconDoubleRightClick:function(){var e=se(this.innerCalendar,"year"===this.panel?10:1);this.updateCalendar(e,"year"===this.panel?"next-decade":"next-year")},handleSelectYear:function(e){if("year"===this.type){var t=this.getCellDate(e,"year");this.emitDate(t,"year")}else{var n=ce(this.innerCalendar,e);if(this.updateCalendar(n,"year"),this.handelPanelChange("month"),this.partialUpdate&&1===this.innerValue.length){var r=ce(this.innerValue[0],e);this.emitDate(r,"year")}}},handleSelectMonth:function(e){if("month"===this.type){var t=this.getCellDate(e,"month");this.emitDate(t,"month")}else{var n=ue(this.innerCalendar,e);if(this.updateCalendar(n,"month"),this.handelPanelChange("date"),this.partialUpdate&&1===this.innerValue.length){var r=ue(ce(this.innerValue[0],this.calendarYear),e);this.emitDate(r,"month")}}},handleSelectDate:function(e){var t=this.getCellDate(e,"date");this.emitDate(t,"week"===this.type?"week":"date")},getCellDate:function(e,t){return"year"===t?P(e,0):"month"===t?P(this.calendarYear,e):P(this.calendarYear,this.calendarMonth,e)},getDateClasses:function(e){var t=this.getCellDate(e,"date"),n=t.getMonth()!==this.calendarMonth,r=[];t.getTime()===(new Date).setHours(0,0,0,0)&&r.push("today"),n&&r.push("not-current-month");var a=this.getStateClass(t);return"active"===a&&n||r.push(a),r.concat(this.getClasses(t,this.innerValue,r.join(" ")))},getMonthClasses:function(e){if("month"!==this.type)return this.calendarMonth===e?"active":"";var t=[],n=this.getCellDate(e,"month");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getYearClasses:function(e){if("year"!==this.type)return this.calendarYear===e?"active":"";var t=[],n=this.getCellDate(e,"year");return t.push(this.getStateClass(n)),t.concat(this.getClasses(n,this.innerValue,t.join(" ")))},getStateClass:function(e){return this.isDisabled(e)?"disabled":this.innerValue.some((function(t){return t.getTime()===e.getTime()}))?"active":""},getWeekState:function(e){if("week"!==this.type)return"";var t=this.getCellDate(e[0].day,"date").getTime(),n=this.getCellDate(e[6].day,"date").getTime();return this.innerValue.some((function(e){var r=e.getTime();return r>=t&&r<=n}))?"".concat(this.prefixClass,"-active-week"):""}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ye={name:"CalendarRange",components:{CalendarPanel:ve},inject:{prefixClass:{default:"mx"}},props:a({},ve.props),data:function(){return{innerValue:[],calendars:[]}},computed:{calendarMinDiff:function(){var e={date:1,month:12,year:120};return e[this.type]||e.date},calendarMaxDiff:function(){return Infinity},defaultValues:function(){return Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue]}},watch:{value:{immediate:!0,handler:function(){var e=this;this.innerValue=$(this.value)?this.value:[new Date(NaN),new Date(NaN)],this.calendars=this.innerValue.map((function(t,n){return I(t,e.defaultValues[n])})),this.validateCalendars(1)}}},methods:{handleSelect:function(e,t){var n=i(this.innerValue,2),r=n[0],a=n[1];N(r)&&!N(a)?(this.innerValue=r.getTime()>e.getTime()?[e,r]:[r,e],this.emitDate(this.innerValue,t)):this.innerValue=[e,new Date(NaN)]},emitDate:function(e,t){this.$emit("select",e,t)},updateStartCalendar:function(e){this.calendars.splice(0,1,e),this.validateCalendars(1)},updateEndCalendar:function(e){this.calendars.splice(1,1,e),this.validateCalendars(0)},validateCalendars:function(e){var t=this.getCalendarGap();if(t){var n=this.calendars[e];n=0===e?de(n,t):ie(n,t),this.calendars.splice(e,1,n)}},getCalendarGap:function(){var e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e),r=te(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(this.calendars[1],this.calendars[0]),t=this.calendarMinDiff,n=this.calendarMaxDiff;return e<t?t-e:e>n?n-e:0},getRangeClasses:function(e,t,n){var r=[].concat(this.getClasses(e,t,n));return!/disabled|active|not-current-month/.test(n)&&2===t.length&&e.getTime()>t[0].getTime()&&e.getTime()<t[1].getTime()&&r.push("in-range"),r}},render:function(){var e=this,t=arguments[0],n=this.calendars.map((function(n,r){var i=a({},e.$props,{calendar:n,value:e.innerValue,defaultValue:e.defaultValues[r],getClasses:e.getRangeClasses,partialUpdate:!1}),s={select:e.handleSelect,"update:calendar":0===r?e.updateStartCalendar:e.updateEndCalendar};return t("calendar-panel",{props:a({},i),on:a({},s)})})),r=this.prefixClass;return t("div",{class:"".concat(r,"-range-wrapper")},[n])}};var ge=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:e.prefixClass+"-scrollbar",style:{position:"relative",overflow:"hidden"}},[t("div",{ref:"wrap",class:e.prefixClass+"-scrollbar-wrap",style:{marginRight:"-"+e.scrollbarWidth+"px"},on:{scroll:e.handleScroll}},[e._t("default")],2),e._v(" "),t("div",{class:e.prefixClass+"-scrollbar-track"},[t("div",{ref:"thumb",class:e.prefixClass+"-scrollbar-thumb",style:{height:e.thumbHeight,top:e.thumbTop},on:{mousedown:e.handleDragstart}})])])},staticRenderFns:[]},void 0,{inject:{prefixClass:{default:"mx"}},data:function(){return{scrollbarWidth:0,thumbTop:"",thumbHeight:""}},created:function(){this.scrollbarWidth=function(){if("undefined"==typeof window)return 0;if(void 0!==he)return he;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=document.createElement("div");return t.style.width="100%",e.appendChild(t),he=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),he}(),document.addEventListener("mouseup",this.handleDragend)},beforeDestroy:function(){document.addEventListener("mouseup",this.handleDragend)},mounted:function(){this.$nextTick(this.getThumbSize)},methods:{getThumbSize:function(){var e=this.$refs.wrap;if(e){var t=100*e.clientHeight/e.scrollHeight;this.thumbHeight=t<100?"".concat(t,"%"):""}},handleScroll:function(e){var t=e.currentTarget;this.thumbTop="".concat(100*t.scrollTop/t.scrollHeight,"%")},handleDragstart:function(e){e.stopImmediatePropagation(),this._draggable=!0,this._prevY=e.clientY-this.$refs.thumb.offsetTop,document.addEventListener("mousemove",this.handleDraging)},handleDraging:function(e){if(this._draggable){var t=this.$refs.wrap;t.scrollTop=(e.clientY-this._prevY)*t.scrollHeight/t.clientHeight}},handleDragend:function(){this._draggable&&(this._draggable=!1,document.removeEventListener("mousemove",this.handleDraging))}}},void 0,!1,void 0,!1,void 0,void 0,void 0),be=function(e){return(e=parseInt(e,10))<10?"0".concat(e):"".concat(e)},we=function(e,t,n){if(Array.isArray(n))return n.filter((function(t){return t>=0&&t<e}));t<=0&&(t=1);for(var r=[],a=0;a<e;a+=t)r.push(a);return r},Ce=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r<=0)requestAnimationFrame((function(){t.scrollTop=n}));else{var a=n-t.scrollTop,i=a/r*10;requestAnimationFrame((function(){var a=t.scrollTop+i;a>=n?t.scrollTop=n:(t.scrollTop=a,e(t,n,r-10))}))}},De=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:e.prefixClass+"-time-columns"},e._l(e.columns,(function(n,r){return t("scrollbar-vertical",{key:r,class:e.prefixClass+"-time-column"},[t("ul",{class:e.prefixClass+"-time-list",attrs:{"data-type":n.type,"data-index":r},on:{click:e.handleSelect}},e._l(n.list,(function(n,r){return t("li",{key:n.value,class:[e.prefixClass+"-time-item",e.getClasses(n.value)],attrs:{"data-index":r}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)])})),1)},staticRenderFns:[]},void 0,{name:"ListColumns",components:{ScrollbarVertical:ge},inject:{prefixClass:{default:"mx"}},props:{date:Date,scrollDuration:{type:Number,default:100},getClasses:{type:Function,default:function(){return[]}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},use12h:{type:Boolean,default:!1}},computed:{columns:function(){var e=[];return this.showHour&&e.push({type:"hour",list:this.getHoursList()}),this.showMinute&&e.push({type:"minute",list:this.getMinutesList()}),this.showSecond&&e.push({type:"second",list:this.getSecondsList()}),this.use12h&&e.push({type:"ampm",list:this.getAMPMList()}),e.filter((function(e){return e.list.length>0}))}},watch:{date:{handler:function(){var e=this;this.$nextTick((function(){e.scrollToSelected(e.scrollDuration)}))}}},mounted:function(){this.scrollToSelected(0)},methods:{getHoursList:function(){var e=this;return we(this.use12h?12:24,this.hourStep,this.hourOptions).map((function(t){var n=new Date(e.date),r=be(t);return e.use12h&&(0===t&&(r="12"),n.getHours()>=12&&(t+=12)),{value:n.setHours(t),text:r}}))},getMinutesList:function(){var e=this;return we(60,this.minuteStep,this.minuteOptions).map((function(t){return{value:new Date(e.date).setMinutes(t),text:be(t)}}))},getSecondsList:function(){var e=this;return we(60,this.secondStep,this.secondOptions).map((function(t){return{value:new Date(e.date).setSeconds(t),text:be(t)}}))},getAMPMList:function(){var e=this;return["AM","PM"].map((function(t,n){var r=new Date(e.date);return{text:t,value:r.setHours(r.getHours()%12+12*n)}}))},scrollToSelected:function(e){for(var t=this.$el.querySelectorAll(".active"),n=0;n<t.length;n++){var r=t[n],a=X(r,this.$el);if(a)Ce(a,r.offsetTop,e)}},handleSelect:function(e){var t=e.target,n=e.currentTarget;if("LI"===t.tagName.toUpperCase()){var r=n.getAttribute("data-type"),a=parseInt(n.getAttribute("data-index"),10),i=parseInt(t.getAttribute("data-index"),10);this.$emit("select",this.columns[a].list[i].value,r)}}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function xe(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(":");return e.length>=2?{hours:parseInt(e[0],10),minutes:parseInt(e[1],10)}:null}var Se=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("scrollbar-vertical",e._l(e.list,(function(n){return t("div",{key:n.value,class:[e.prefixClass+"-time-option",e.getClasses(n.value)],on:{click:function(t){return e.handleSelect(n.value)}}},[e._v("\n "+e._s(n.text)+"\n ")])})),0)},staticRenderFns:[]},void 0,{name:"ListOptions",components:{ScrollbarVertical:ge},inject:{t:{default:function(){return Z}},prefixClass:{default:"mx"}},props:{date:Date,options:{type:[Object,Function],default:function(){return[]}},format:{type:String,default:"HH:mm:ss"},getClasses:{type:Function,default:function(){return[]}}},computed:{list:function(){var e=[],t=this.options;if("function"==typeof t)return t()||[];var n=xe(t.start),r=xe(t.end),a=xe(t.step),i=t.format||this.format;if(n&&r&&a)for(var s=n.minutes+60*n.hours,o=a.minutes+60*a.hours,l=Math.floor((r.minutes+60*r.hours-s)/o),u=0;u<=l;u++){var c=s+u*o,d=Math.floor(c/60),h=c%60,f=new Date(this.date).setHours(d,h,0);e.push({value:f,text:this.formatDate(f,i)})}return e}},mounted:function(){this.scrollToSelected()},methods:{formatDate:function(e,t){return y(e,t,{locale:this.t("formatLocale")})},scrollToSelected:function(){var e=this.$el.querySelector(".active");if(e){var t=X(e,this.$el);if(t)!function(e,t){e&&(e.scrollTop=t)}(t,e.offsetTop)}},handleSelect:function(e){this.$emit("select",e,"time")}}},void 0,!1,void 0,!1,void 0,void 0,void 0),Te=G({render:function(){var e=this,t=e._self._c||e.$createElement;return t("div",{class:e.prefixClass+"-time"},[e.showTimeHeader?t("div",{class:e.prefixClass+"-time-header"},[t("button",{class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-time-header-title",attrs:{type:"button"},on:{click:e.handleClickTitle}},[e._v("\n "+e._s(e.title)+"\n ")])]):e._e(),e._v(" "),t("div",{class:e.prefixClass+"-time-content"},[e.timePickerOptions?t("list-options",{attrs:{date:e.innerValue,"get-classes":e.getClasses,options:e.timePickerOptions,format:e.innerForamt},on:{select:e.handleSelect}}):t("list-columns",e._b({attrs:{date:e.innerValue,"get-classes":e.getClasses,"hour-options":e.hourOptions,"minute-options":e.minuteOptions,"second-options":e.secondOptions,"hour-step":e.hourStep,"minute-step":e.minuteStep,"second-step":e.secondStep,"scroll-duration":e.scrollDuration},on:{select:e.handleSelect}},"list-columns",e.ShowHourMinuteSecondAMPM,!1))],1)])},staticRenderFns:[]},void 0,{name:"TimePanel",components:{ListColumns:De,ListOptions:Se},inject:{t:{default:function(){return Z}},prefixClass:{default:"mx"}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},format:{default:"HH:mm:ss"},timeTitleFormat:{type:String,default:"YYYY-MM-DD"},showTimeHeader:{type:Boolean,default:!1},disabledTime:{type:Function,default:function(){return!1}},timePickerOptions:{type:[Object,Function],default:function(){return null}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12h:{type:Boolean,default:void 0},scrollDuration:{type:Number,default:100}},computed:{innerValue:function(){return I(this.value,this.defaultValue)},title:function(){var e=this.timeTitleFormat,t=new Date(this.innerValue);return this.formatDate(t,e)},innerForamt:function(){return"string"==typeof this.format?this.format:"HH:mm:ss"},ShowHourMinuteSecondAMPM:function(){var e=this,t=this.innerForamt,n={showHour:/[HhKk]/.test(t),showMinute:/m/.test(t),showSecond:/s/.test(t),use12h:/a/i.test(t)},r={};return Object.keys(n).forEach((function(t){r[t]="boolean"==typeof e[t]?e[t]:n[t]})),r}},methods:{formatDate:function(e,t){return y(e,t,{locale:this.t("formatLocale")})},isDisabled:function(e){return this.disabledTime(new Date(e))},handleSelect:function(e,t){var n=new Date(e);this.isDisabled(e)||this.$emit("select",n,t)},handleClickTitle:function(){this.$emit("title-click")},getClasses:function(e){var t=new Date(e);return this.isDisabled(e)?"disabled":t.getTime()===this.innerValue.getTime()?"active":""}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ke={name:"TimeRange",inject:{prefixClass:{default:"mx"}},props:a({},Te.props),data:function(){return{startValue:new Date(NaN),endValue:new Date(NaN)}},watch:{value:{immediate:!0,handler:function(){if($(this.value)){var e=i(this.value,2),t=e[1];this.startValue=e[0],this.endValue=t}else this.startValue=new Date(NaN),this.endValue=new Date(NaN)}}},methods:{emitChange:function(e,t){this.$emit("select",[this.startValue,this.endValue],e,t)},handleSelectStart:function(e,t){this.startValue=e,this.endValue.getTime()>=e.getTime()||(this.endValue=e),this.emitChange(t,0)},handleSelectEnd:function(e,t){this.endValue=e,this.startValue.getTime()<=e.getTime()||(this.startValue=e),this.emitChange(t,1)},disabledStartTime:function(e){return this.disabledTime(e,0)},disabledEndTime:function(e){return e.getTime()<this.startValue.getTime()||this.disabledTime(e,1)}},render:function(){var e=arguments[0],t=Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue],n=this.prefixClass;return e("div",{class:"".concat(n,"-range-wrapper")},[e(Te,{props:a({},a({},this.$props,{value:this.startValue,defaultValue:t[0],disabledTime:this.disabledStartTime})),on:a({},a({},this.$listeners,{select:this.handleSelectStart}))}),e(Te,{props:a({},a({},this.$props,{value:this.endValue,defaultValue:t[1],disabledTime:this.disabledEndTime})),on:a({},a({},this.$listeners,{select:this.handleSelectEnd}))})])}};function Me(){return(Me=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)}var Ve=["attrs","props","domProps"],_e=["class","style","directives"],Oe=["on","nativeOn"],Ye=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Ae=function(e){return e.reduce((function(e,t){for(var n in t)if(e[n])if(-1!==Ve.indexOf(n))e[n]=Me({},e[n],t[n]);else if(-1!==_e.indexOf(n)){var r=e[n]instanceof Array?e[n]:[e[n]],a=t[n]instanceof Array?t[n]:[t[n]];e[n]=r.concat(a)}else if(-1!==Oe.indexOf(n))for(var i in t[n])if(e[n][i]){var s=e[n][i]instanceof Array?e[n][i]:[e[n][i]],o=t[n][i]instanceof Array?t[n][i]:[t[n][i]];e[n][i]=s.concat(o)}else e[n][i]=t[n][i];else if("hook"==n)for(var l in t[n])e[n][l]=e[n][l]?Ye(e[n][l],t[n][l]):t[n][l];else e[n]=t[n];else e[n]=t[n];return e}),{})},Fe={name:"DatetimePanel",inject:{prefixClass:{default:"mx"}},props:a({},ve.props,{},Te.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){"date"===t&&this.openTimePanel();var n=j(e,I(this.value,this.defaultValue));this.disabledTime(new Date(n))&&(n=j(e,this.defaultValue),this.disabledTime(new Date(n)))?this.currentValue=n:this.emitDate(n,t)}},render:function(){var e=arguments[0],t={props:a({},W(this,Object.keys(ve.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:a({},W(this,Object.keys(Te.props)),{showTimeHeader:!0,value:this.currentValue}),on:{select:this.emitDate,"title-click":this.closeTimePanel}},r=this.prefixClass;return e("div",[e(ve,Ae([{},t])),this.timeVisible&&e(Te,Ae([{class:"".concat(r,"-calendar-time")},n]))])}},Pe={name:"DatetimeRange",inject:{prefixClass:{default:"mx"}},props:a({},ye.props,{},ke.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1},openTimePanel:function(){this.defaultTimeVisible=!0},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){var n=this;"date"===t&&this.openTimePanel();var r=Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue],a=e.map((function(e,t){return j(e,$(n.value)?n.value[t]:r[t])}));a[1].getTime()<a[0].getTime()&&(a=[a[0],a[0]]),a.some(this.disabledTime)&&(a=e.map((function(e,t){return j(e,r[t])}))).some(this.disabledTime)?this.currentValue=a:this.emitDate(a,t)}},render:function(){var e=arguments[0],t={props:a({},W(this,Object.keys(ye.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:a({},W(this,Object.keys(ke.props)),{value:this.currentValue,showTimeHeader:!0}),on:{select:this.emitDate,"title-click":this.closeTimePanel}},r=this.prefixClass;return e("div",[e(ye,Ae([{},t])),this.timeVisible&&e(ke,Ae([{class:"".concat(r,"-calendar-time")},n]))])}},Ne={default:ve,time:Te,datetime:Fe},$e={default:ye,time:ke,datetime:Pe},Ie=G({render:function(){var e,t=this,r=t._self._c||t.$createElement;return r("div",{class:(e={},e[t.prefixClass+"-datepicker"]=!0,e[t.prefixClass+"-datepicker-range"]=t.range,e[t.prefixClass+"-datepicker-inline"]=t.inline,e.disabled=t.disabled,e)},[t.inline?t._e():r("div",{class:t.prefixClass+"-input-wrapper",on:{mousedown:t.openPopup}},[t._t("input",[r("input",t._b({ref:"input",class:t.inputClass,attrs:{disabled:t.disabled,readonly:!t.editable,placeholder:t.placeholder},on:{keydown:t.handleInputKeydown,focus:t.handleInputFocus,blur:t.handleInputBlur,input:t.handleInputInput,change:t.handleInputChange}},"input",n({},{name:"date",type:"text",autocomplete:"off",value:t.text},t.inputAttr),!1))]),t._v(" "),t.showClearIcon?r("i",{class:t.prefixClass+"-icon-clear",on:{mousedown:function(e){return e.stopPropagation(),t.handleClear(e)}}},[t._t("icon-clear",[r("icon-close")])],2):t._e(),t._v(" "),r("i",{class:t.prefixClass+"-icon-calendar"},[t._t("icon-calendar",[r("icon-calendar")])],2)],2),t._v(" "),r("Popup",{ref:"popup",class:t.popupClass,style:t.popupStyle,attrs:{inline:t.inline,visible:t.popupVisible,"append-to-body":t.appendToBody},on:{clickoutside:t.handleClickOutSide}},[t.hasSlot("sidebar")||t.shortcuts.length?r("div",{class:t.prefixClass+"-datepicker-sidebar"},[t._t("sidebar",null,{value:t.currentValue,emit:t.emitValue}),t._v(" "),t._l(t.shortcuts,(function(e,n){return r("button",{key:n,class:t.prefixClass+"-btn "+t.prefixClass+"-btn-text "+t.prefixClass+"-btn-shortcut",attrs:{type:"button"},on:{click:function(n){return t.handleSelectShortcut(e)}}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2):t._e(),t._v(" "),r("div",{class:t.prefixClass+"-datepicker-content"},[t.hasSlot("header")?r("div",{class:t.prefixClass+"-datepicker-header"},[t._t("header",null,{value:t.currentValue,emit:t.emitValue})],2):t._e(),t._v(" "),r("div",{class:t.prefixClass+"-datepicker-body"},[t._t("content",[r(t.currentComponent,t._b({ref:"picker",tag:"component",on:{select:t.handleSelectDate}},"component",t.currentComponentProps,!1))],{value:t.currentValue,emit:t.emitValue})],2),t._v(" "),t.hasSlot("footer")||t.confirm?r("div",{class:t.prefixClass+"-datepicker-footer"},[t._t("footer",null,{value:t.currentValue,emit:t.emitValue}),t._v(" "),t.confirm?r("button",{class:t.prefixClass+"-btn "+t.prefixClass+"-datepicker-btn-confirm",attrs:{type:"button"},on:{click:t.handleConfirmDate}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()],2):t._e()])])],1)},staticRenderFns:[]},void 0,{name:"DatePicker",components:{IconCalendar:Q,IconClose:ee,Popup:K},provide:function(){return{t:this.getLocaleFieldValue,getWeek:this.getWeek,prefixClass:this.prefixClass}},props:a({},Fe.props,{value:{},valueType:{type:String,default:"date"},type:{type:String,default:"date"},format:{type:[String,Object],default:function(){var e={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",year:"YYYY",month:"YYYY-MM",time:"HH:mm:ss",week:"w"};return e[this.type]||e.date}},range:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},rangeSeparator:{type:String,default:function(){return this.multiple?",":" ~ "}},lang:{type:[String,Object]},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},prefixClass:{type:String,default:"mx"},inputClass:{default:function(){return"".concat(this.prefixClass,"-input")}},inputAttr:{type:Object,default:function(){return{}}},appendToBody:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},popupClass:{},popupStyle:{type:Object,default:function(){return{}}},inline:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:"OK"},renderInputText:{type:Function},shortcuts:{type:Array,validator:function(e){return Array.isArray(e)&&e.every((function(e){return E(e)&&"string"==typeof e.text&&"function"==typeof e.onClick}))},default:function(){return[]}}}),data:function(){return{currentValue:null,userInput:null,defaultOpen:!1}},computed:{currentComponent:function(){var e=this.range?$e:Ne;return e[this.type]||e.default},currentComponentProps:function(){return a({},W(this,Object.keys(this.currentComponent.props)),{value:this.currentValue})},popupVisible:function(){return!this.disabled&&("boolean"==typeof this.open?this.open:this.defaultOpen)},innerValue:function(){var e=this.value;return this.validMultipleType?(e=Array.isArray(e)?e:[]).map(this.value2date):this.range?(e=Array.isArray(e)?e.slice(0,2):[null,null]).map(this.value2date):this.value2date(this.value)},text:function(){var e=this;if(null!==this.userInput)return this.userInput;if("function"==typeof this.renderInputText)return this.renderInputText(this.innerValue);if(!this.isValidValue(this.innerValue))return"";var t=this.format;return Array.isArray(this.innerValue)?this.innerValue.map((function(n){return e.formatDate(n,t)})).join(this.rangeSeparator):this.formatDate(this.innerValue,t)},showClearIcon:function(){return!this.disabled&&this.clearable&&this.text},locale:function(){return E(this.lang)?function e(n,r){if(!E(n))return{};var i=n;return E(r)&&Object.keys(r).forEach((function(s){var o=r[s];E(o)&&E(n[s])&&(o=e(n[s],o)),i=a({},i,t({},s,o))})),i}(U(),this.lang):U(this.lang)},validMultipleType:function(){return this.multiple&&!this.range&&-1!==["date","month","year"].indexOf(this.type)}},watch:{innerValue:{immediate:!0,handler:function(e){this.currentValue=e}}},methods:{handleClickOutSide:function(e){this.$el.contains(e.target)||this.closePopup()},getWeek:function(e,t){return E(this.format)&&"function"==typeof this.format.getWeek?this.format.getWeek(e,t):c(e,t)},parseDate:function(e,t){if(E(this.format)&&"function"==typeof this.format.parse)return this.format.parse(e,t);var n=new Date;return F(e,t,{locale:this.locale.formatLocale,backupDate:n})},formatDate:function(e,t){return E(this.format)&&"function"==typeof this.format.stringify?this.format.stringify(e,t):y(e,t,{locale:this.locale.formatLocale})},value2date:function(e){switch(this.valueType){case"date":return e instanceof Date?new Date(e.getTime()):new Date(NaN);case"timestamp":return"number"==typeof e?new Date(e):new Date(NaN);case"format":return"string"==typeof e?this.parseDate(e,this.format):new Date(NaN);default:return"string"==typeof e?this.parseDate(e,this.valueType):new Date(NaN)}},date2value:function(e){if(!N(e))return null;switch(this.valueType){case"date":return e;case"timestamp":return e.getTime();case"format":return this.formatDate(e,this.format);default:return this.formatDate(e,this.valueType)}},emitValue:function(e,t){this.userInput=null;var n=Array.isArray(e)?e.map(this.date2value):this.date2value(e);return this.$emit("input",n),this.$emit("change",n,t),this.afterEmitValue(t),n},afterEmitValue:function(e){e&&e!==this.type&&"time"!==e||this.closePopup()},isValidValue:function(e){return this.validMultipleType?(t=e,Array.isArray(t)&&t.every(N)):this.range?$(e):N(e);var t},handleMultipleDates:function(e,t){if(this.validMultipleType&&t){var n=t.filter((function(t){return t.getTime()!==e.getTime()}));return n.length===t.length&&n.push(e),n}return e},handleSelectDate:function(e,t,n){e=this.handleMultipleDates(e,n),this.confirm?this.currentValue=e:this.emitValue(e,this.validMultipleType?"multiple-".concat(t):t)},handleClear:function(){this.emitValue(this.range?[null,null]:null),this.$emit("clear")},handleConfirmDate:function(){var e=this.emitValue(this.currentValue);this.$emit("confirm",e)},handleSelectShortcut:function(e){if(E(e)&&"function"==typeof e.onClick){var t=e.onClick(this);t&&this.emitValue(t)}},openPopup:function(e){this.popupVisible||(this.defaultOpen=!0,this.$emit("open",e),this.$emit("update:open",!0))},closePopup:function(){this.popupVisible&&(this.defaultOpen=!1,this.$emit("close"),this.$emit("update:open",!1))},blur:function(){this.$refs.input.blur()},focus:function(){this.$refs.input.focus()},handleInputChange:function(){var e=this;if(this.editable&&null!==this.userInput){var t=this.userInput.trim();if(this.userInput=null,""!==t){var n;if(this.validMultipleType)n=t.split(this.rangeSeparator).map((function(t){return e.parseDate(t.trim(),e.format)}));else if(this.range){var r=t.split(this.rangeSeparator);2!==r.length&&(r=t.split(this.rangeSeparator.trim())),n=r.map((function(t){return e.parseDate(t.trim(),e.format)}))}else n=this.parseDate(t,this.format);this.isValidValue(n)?(this.emitValue(n),this.blur()):this.$emit("input-error",t)}else this.handleClear()}},handleInputInput:function(e){this.userInput=e.target.value},handleInputKeydown:function(e){var t=e.keyCode;9===t?this.closePopup():13===t&&this.handleInputChange()},handleInputBlur:function(e){this.$emit("blur",e)},handleInputFocus:function(e){this.openPopup(e),this.$emit("focus",e)},hasSlot:function(e){return!(!this.$slots[e]&&!this.$scopedSlots[e])},getLocaleFieldValue:function(e){return Z(e,this.locale)}}},void 0,!1,void 0,!1,void 0,void 0,void 0);return Ie.locale=J,Ie.install=function(e){e.component(Ie.name,Ie)},"undefined"!=typeof window&&window.Vue&&Ie.install(window.Vue),n(Ie,{CalendarPanel:ve,CalendarRange:ye,TimePanel:Te,TimeRange:ke,DatetimePanel:Fe,DatetimeRange:Pe}),Ie}));
//# sourceMappingURL=index.min.js.map

@@ -14,3 +14,3 @@ {

],
"version": "3.5.0",
"version": "3.6.0",
"scripts": {

@@ -17,0 +17,0 @@ "dev": "parcel ./example/dev.html --open --port 2235",

@@ -67,2 +67,4 @@ # vue2-datepicker

```scss
$namespace: 'xmx'; // change the 'mx' to 'xmx'. then <date-picker prefix-class="xmx" />
$default-color: #555;

@@ -113,43 +115,47 @@ $primary-color: #1284e7;

| Prop | Description | Type | Default |
| ------------------- | ---------------------------------------------- | ------------------------------------------- | -------------- |
| type | select the type of picker | date \|datetime\|year\|month\|time\|week | 'date' |
| range | if true, pick the range date | `boolean` | false |
| format | to set the date format. similar to moment.js | [token](#token) | 'YYYY-MM-DD' |
| value-type | data type of the binding value | [value-type](#value-type) | 'date' |
| default-value | default date of the calendar | `Date` | new Date() |
| lang | override the default locale | `object` | |
| placeholder | input placeholder text | `string` | '' |
| editable | whether the input is editable | `boolean` | true |
| clearable | if false, don't show the clear icon | `boolean` | true |
| confirm | if true, need click the button to change value | `boolean` | false |
| confirm-text | the text of confirm button | `string` | 'OK' |
| disabled | disable the component | `boolean` | false |
| disabled-date | specify the date that cannot be selected | `(date) => boolean` | - |
| disabled-time | specify the time that cannot be selected | `(date) => boolean` | - |
| append-to-body | append the popup to body | `boolean` | true |
| inline | without input | `boolean` | false |
| input-class | input classname | `string` | 'mx-input' |
| input-attr | input attrs(eg: { name: 'date', id: 'foo'}) | `object` | — |
| open | open state of picker | `boolean` | - |
| popup-style | popup style | `object` | — |
| popup-class | popup classes | | — |
| shortcuts | set shortcuts to select | `Array<{text, onClick}>` | - |
| title-format | format of the tooltip in calendar cell | [token](#token) | 'YYYY-MM-DD' |
| partial-update | whether update date when select year or month | `boolean` | false |
| range-separator | text of range separator | `string` | ' ~ ' |
| show-week-number | determine whether show week number | `boolean` | false |
| hour-step | interval between hours in time picker | 1 - 60 | 1 |
| minute-step | interval between minutes in time picker | 1 - 60 | 1 |
| second-step | interval between seconds in time picker | 1 - 60 | 1 |
| hour-options | custom hour column | `Array<number>` | - |
| minute-options | custom minute column | `Array<number>` | - |
| second-options | custom second column | `Array<number>` | - |
| show-hour | whether show hour column | `boolean` | base on format |
| show-minute | whether show minute column | `boolean` | base on format |
| show-second | whether show second column | `boolean` | base on format |
| use12h | whether show ampm column | `boolean` | base on format |
| show-time-header | whether show header of time picker | `boolean` | false |
| time-title-format | format of the time header | [token](#token) | 'YYYY-MM-DD' |
| time-picker-options | set fixed time list to select | [time-picker-options](#time-picker-options) | null |
| Prop | Description | Type | Default |
| ------------------- | ------------------------------------------------ | ------------------------------------------- | -------------- |
| type | select the type of picker | date \|datetime\|year\|month\|time\|week | 'date' |
| range | if true, pick the range date | `boolean` | false |
| format | to set the date format. similar to moment.js | [token](#token) | 'YYYY-MM-DD' |
| value-type | data type of the binding value | [value-type](#value-type) | 'date' |
| default-value | default date of the calendar | `Date` | new Date() |
| lang | override the default locale | `object` | |
| placeholder | input placeholder text | `string` | '' |
| editable | whether the input is editable | `boolean` | true |
| clearable | if false, don't show the clear icon | `boolean` | true |
| confirm | if true, need click the button to change value | `boolean` | false |
| confirm-text | the text of confirm button | `string` | 'OK' |
| multiple | if true, multi-select date | `boolean` | false |
| disabled | disable the component | `boolean` | false |
| disabled-date | specify the date that cannot be selected | `(date) => boolean` | - |
| disabled-time | specify the time that cannot be selected | `(date) => boolean` | - |
| append-to-body | append the popup to body | `boolean` | true |
| inline | without input | `boolean` | false |
| input-class | input classname | `string` | 'mx-input' |
| input-attr | input attrs(eg: { name: 'date', id: 'foo'}) | `object` | — |
| open | open state of picker | `boolean` | - |
| default-panel | default panel of the picker | year\|month | - |
| popup-style | popup style | `object` | — |
| popup-class | popup classes | | — |
| shortcuts | set shortcuts to select | `Array<{text, onClick}>` | - |
| title-format | format of the tooltip in calendar cell | [token](#token) | 'YYYY-MM-DD' |
| partial-update | whether update date when select year or month | `boolean` | false |
| range-separator | text of range separator | `string` | ' ~ ' |
| show-week-number | determine whether show week number | `boolean` | false |
| hour-step | interval between hours in time picker | 1 - 60 | 1 |
| minute-step | interval between minutes in time picker | 1 - 60 | 1 |
| second-step | interval between seconds in time picker | 1 - 60 | 1 |
| hour-options | custom hour column | `Array<number>` | - |
| minute-options | custom minute column | `Array<number>` | - |
| second-options | custom second column | `Array<number>` | - |
| show-hour | whether show hour column | `boolean` | base on format |
| show-minute | whether show minute column | `boolean` | base on format |
| show-second | whether show second column | `boolean` | base on format |
| use12h | whether show ampm column | `boolean` | base on format |
| show-time-header | whether show header of time picker | `boolean` | false |
| time-title-format | format of the time header | [token](#token) | 'YYYY-MM-DD' |
| time-picker-options | set fixed time list to select | [time-picker-options](#time-picker-options) | null |
| prefix-class | set prefix class | `string` | 'mx' |
| scroll-duration | set the duration of scroll when hour is selected | `number` | 100 |

@@ -275,3 +281,3 @@ #### Token

| change | When the value change(same as input) | date, type('date'\|'hour'\|'minute'\|'second'\|'ampm |
| open | When panel opening | event |
| open | When panel opening | event |
| close | When panel closing | |

@@ -278,0 +284,0 @@ | confirm | When click 'confirm' button | date |

@@ -39,2 +39,4 @@ # vue2-datepicker

```scss
$namespace: 'xmx'; // 更改默认前缀为'xmx'. 然后设置 <date-picker prefix-class="xmx" />
$default-color: #555;

@@ -124,2 +126,3 @@ $primary-color: #1284e7;

| confirm-text | 确认按钮的文字 | `string` | 'OK' |
| multiple | 如果是 true, 可以选择多个日期 | `boolean` | false |
| disabled | 禁用组件 | `boolean` | false |

@@ -133,2 +136,3 @@ | disabled-date | 禁止选择的日期 | `(date) => boolean` | - |

| open | 控制弹出层的显示 | `boolean` | - |
| default-panel | 控制打开的面板 | year\|month | - |
| popup-style | 弹出层的样式 | `object` | — |

@@ -154,2 +158,4 @@ | popup-class | 弹出层的类 | | — |

| time-picker-options | 设置固定时间去选择 | [time-picker-options](#time-picker-options) | null |
| prefix-class | 设置 class 的前缀 | `string` | 'mx' |
| scroll-duration | 设置滚动时候当选中小时的时候 | `number` | 100 |

@@ -156,0 +162,0 @@ #### Token

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc