diff --git a/dist/vueDatePick.js b/dist/vueDatePick.js index 5cc713a..9b48f13 100644 --- a/dist/vueDatePick.js +++ b/dist/vueDatePick.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueDatePick=e():t.VueDatePick=e()}("undefined"!=typeof self?self:this,function(){return function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,n){},function(t,e,n){"use strict";var i=n(0);n.n(i).a},function(t,e,n){"use strict";n.r(e);function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var f=/,|\.|-| |:|\/|\\/,m=/D+/,y=/M+/,g=/Y+/,_=/h+/i,C=/m+/,D=/s+/;function P(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function b(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var i={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var e=this,t=this.currentPeriod,n=t.year,i=t.month,r=[],o=new Date(n,i,1),s=new Date,a=this.startWeekOnSunday?1:0,u=o.getDay()||7;if(1-ai.mobileBreakpointWidth?(r.top+r.height+e>window.innerHeight&&0window.innerWidth&&(s="vdpPositionRight"),i.positionClass=["vdpPositionReady",o,s].join(" ")):i.positionClass="vdpPositionFixed"};this.$refs.outerWrap?t():this.$nextTick(t)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;i[t]e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function b(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var i={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var e=this,t=this.currentPeriod,n=t.year,i=t.month,r=[],o=new Date(n,i,1),s=new Date,a=this.startWeekOnSunday?1:0,u=o.getDay()||7;if(1-ai.mobileBreakpointWidth?(r.top+r.height+e>window.innerHeight&&0window.innerWidth&&(s="vdpPositionRight"),i.positionClass=["vdpPositionReady",o,s].join(" ")):i.positionClass="vdpPositionFixed"};this.$refs.outerWrap?t():this.$nextTick(t)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;i[t] - + -

404

How did we get here?
Take me home.
- +

404

Looks like we've got some broken links.
Take me home.
+ diff --git a/docs/assets/js/1.10bf2c4e.js b/docs/assets/js/1.10bf2c4e.js deleted file mode 100644 index 5445906..0000000 --- a/docs/assets/js/1.10bf2c4e.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{166:function(t,e,n){},167:function(t,e,n){"use strict";n(168),n(170),n(24);function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n(14),n(73),n(93),n(23),n(171);var i=/,|\.|-| |:|\/|\\/,o=/D+/,a=/M+/,s=/Y+/,u=/h+/i,c=/m+/,d=/s+/;function l(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var h={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,r=e.month,i=[],o=new Date(n,r,1),a=new Date,s=this.startWeekOnSunday?1:0,u=o.getDay()||7;if(u>1-s)for(var c=u-(2-s);c>=0;c--){var d=new Date(o);d.setDate(-c),i.push({outOfRange:!0,date:d})}for(;o.getMonth()===r;)i.push({date:new Date(o)}),o.setDate(o.getDate()+1);for(var l=7-i.length%7,h=1;h<=l;h++){var f=new Date(o);f.setDate(h),i.push({outOfRange:!0,date:f})}return i.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,a),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(i,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,r=e+this.selectableYearRange,i=n;i<=r;i++)t.push(i);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:l(t.getHours(),1),minutesPadded:l(t.getMinutes(),2),secondsPadded:l(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),r=new Date(e.year,e.month).getTime();this.direction=n!==r?n>r?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,h,f,m,v,g=t.split(i),y=e.split(i),D=y.length,M=0;M0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",r="vdpPositionLeft",i=function(){var i=t.$refs.outerWrap.getBoundingClientRect(),o=i.height,a=i.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+o>window.innerHeight&&e.top-o>0&&(n="vdpPositionBottom"),e.left+a>window.innerWidth&&(r="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,r].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?i():this.$nextTick(i)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,r={setHours:23,setMinutes:59,setSeconds:59},i=parseInt(e.target.value,10)||0;i>r[t]?i=r[t]:i<0&&(i=0),e.target.value=l(i,"setHours"===t?1:2),n[t](i),this.$emit("input",this.formatDateToString(n,this.format))}}},f=(n(172),n(0)),m=Object(f.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,r){return n("option",{key:e,domProps:{value:r}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,r){return n("tr",{key:r,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);m.options.__file="vueDatePick.vue";e.a=m.exports},168:function(t,e,n){"use strict";n(169);var r=n(5),i=n(70),o=n(7),a=/./.toString,s=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(r,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var r=n(3),i=n(13),o=n(12),a=n(74),s=n(71),u=n(6),c=n(96).f,d=n(95).f,l=n(8).f,p=n(94).trim,h=r.Number,f=h,m=h.prototype,v="Number"==o(n(72)(m)),g="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),c=0,d=u.length;ci)return NaN;return parseInt(u,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(v?u(function(){m.valueOf.call(n)}):"Number"!=o(n))?a(new f(y(e)),n,h):y(e)};for(var D,M=n(7)?c(f):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;M.length>S;S++)i(f,D=M[S])&&!i(h,D)&&l(h,D,d(f,D));h.prototype=m,m.constructor=h,n(9)(r,"Number",h)}},172:function(t,e,n){"use strict";var r=n(166);n.n(r).a},176:function(t,e,n){"use strict";var r={},i=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",a=/\[([^]*?)\]/gm,s=function(){};function u(t,e){for(var n=[],r=0,i=t.length;r3?0:(t-t%10!=10)*t%10]}};var m={D:function(t){return t.getDate()},DD:function(t){return d(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return d(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return d(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return d(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return d(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return d(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return d(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return d(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return d(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return d(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return d(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+d(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},v={D:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+o,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],YY:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],YYYY:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],d:["\\d\\d?",s],ddd:[o,s],MMM:[o,c("monthNamesShort")],MMMM:[o,c("monthNames")],a:[o,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,r=(e+"").match(/([+-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};v.dd=v.d,v.dddd=v.ddd,v.DD=v.D,v.mm=v.m,v.hh=v.H=v.HH=v.h,v.MM=v.M,v.ss=v.s,v.A=v.a,r.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},r.format=function(t,e,n){var o=n||r.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=r.masks[e]||e||r.masks.default;var s=[];return(e=(e=e.replace(a,function(t,e){return s.push(e),"??"})).replace(i,function(e){return e in m?m[e](t,o):e.slice(1,e.length-1)})).replace(/\?\?/g,function(){return s.shift()})},r.parse=function(t,e,n){var o=n||r.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=r.masks[e]||e,t.length>1e3)return null;var a,s={},u=[],c=(a=e,a.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(i,function(t){if(v[t]){var e=v[t];return u.push(e[1]),"("+e[0]+")"}return t}),d=t.match(new RegExp(c,"i"));if(!d)return null;for(var l=1;le?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var h={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,r=e.month,i=[],o=new Date(n,r,1),a=new Date,s=this.startWeekOnSunday?1:0,u=o.getDay()||7;if(u>1-s)for(var c=u-(2-s);c>=0;c--){var d=new Date(o);d.setDate(-c),i.push({outOfRange:!0,date:d})}for(;o.getMonth()===r;)i.push({date:new Date(o)}),o.setDate(o.getDate()+1);for(var l=7-i.length%7,h=1;h<=l;h++){var f=new Date(o);f.setDate(h),i.push({outOfRange:!0,date:f})}return i.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,a),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(i,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,r=e+this.selectableYearRange,i=n;i<=r;i++)t.push(i);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:l(t.getHours(),1),minutesPadded:l(t.getMinutes(),2),secondsPadded:l(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),r=new Date(e.year,e.month).getTime();this.direction=n!==r?n>r?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,h,f,m,v,g=t.split(i),y=e.split(i),D=y.length,M=0;M0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",r="vdpPositionLeft",i=function(){var i=t.$refs.outerWrap.getBoundingClientRect(),o=i.height,a=i.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+o>window.innerHeight&&e.top-o>0&&(n="vdpPositionBottom"),e.left+a>window.innerWidth&&(r="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,r].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?i():this.$nextTick(i)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,r={setHours:23,setMinutes:59,setSeconds:59},i=parseInt(e.target.value,10)||0;i>r[t]?i=r[t]:i<0&&(i=0),e.target.value=l(i,"setHours"===t?1:2),n[t](i),this.$emit("input",this.formatDateToString(n,this.format))}}},f=(n(172),n(0)),m=Object(f.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,r){return n("option",{key:e,domProps:{value:r}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,r){return n("tr",{key:r,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);m.options.__file="vueDatePick.vue";e.a=m.exports},168:function(t,e,n){"use strict";n(169);var r=n(5),i=n(70),o=n(7),a=/./.toString,s=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(r,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var r=n(3),i=n(13),o=n(12),a=n(74),s=n(71),u=n(6),c=n(96).f,d=n(95).f,l=n(8).f,p=n(94).trim,h=r.Number,f=h,m=h.prototype,v="Number"==o(n(72)(m)),g="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),c=0,d=u.length;ci)return NaN;return parseInt(u,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(v?u(function(){m.valueOf.call(n)}):"Number"!=o(n))?a(new f(y(e)),n,h):y(e)};for(var D,M=n(7)?c(f):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;M.length>S;S++)i(f,D=M[S])&&!i(h,D)&&l(h,D,d(f,D));h.prototype=m,m.constructor=h,n(9)(r,"Number",h)}},172:function(t,e,n){"use strict";var r=n(166);n.n(r).a},176:function(t,e,n){"use strict";var r={},i=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",a=/\[([^]*?)\]/gm,s=function(){};function u(t,e){for(var n=[],r=0,i=t.length;r3?0:(t-t%10!=10)*t%10]}};var m={D:function(t){return t.getDate()},DD:function(t){return d(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return d(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return d(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return d(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return d(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return d(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return d(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return d(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return d(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return d(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return d(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+d(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},v={D:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+o,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],YY:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],YYYY:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],d:["\\d\\d?",s],ddd:[o,s],MMM:[o,c("monthNamesShort")],MMMM:[o,c("monthNames")],a:[o,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,r=(e+"").match(/([+-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};v.dd=v.d,v.dddd=v.ddd,v.DD=v.D,v.mm=v.m,v.hh=v.H=v.HH=v.h,v.MM=v.M,v.ss=v.s,v.A=v.a,r.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},r.format=function(t,e,n){var o=n||r.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=r.masks[e]||e||r.masks.default;var s=[];return(e=(e=e.replace(a,function(t,e){return s.push(e),"??"})).replace(i,function(e){return e in m?m[e](t,o):e.slice(1,e.length-1)})).replace(/\?\?/g,function(){return s.shift()})},r.parse=function(t,e,n){var o=n||r.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=r.masks[e]||e,t.length>1e3)return null;var a,s={},u=[],c=(a=e,a.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(i,function(t){if(v[t]){var e=v[t];return u.push(e[1]),"("+e[0]+")"}return t}),d=t.match(new RegExp(c,"i"));if(!d)return null;for(var l=1;le?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var v={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,i=e.month,r=[],a=new Date(n,i,1),s=new Date,o=this.startWeekOnSunday?1:0,u=a.getDay()||7;if(u>1-o)for(var c=u-(2-o);c>=0;c--){var l=new Date(a);l.setDate(-c),r.push({outOfRange:!0,date:l})}for(;a.getMonth()===i;)r.push({date:new Date(a)}),a.setDate(a.getDate()+1);for(var d=7-r.length%7,v=1;v<=d;v++){var h=new Date(a);h.setDate(v),r.push({outOfRange:!0,date:h})}return r.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,s),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(r,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,i=e+this.selectableYearRange,r=n;r<=i;r++)t.push(r);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:d(t.getHours(),1),minutesPadded:d(t.getMinutes(),2),secondsPadded:d(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),i=new Date(e.year,e.month).getTime();this.direction=n!==i?n>i?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,v,h,f,m,g=t.split(r),y=e.split(r),_=y.length,C=0;C<_;C++)y[C].match(a)?n=parseInt(g[C],10):y[C].match(s)?p=parseInt(g[C],10):y[C].match(o)?v=parseInt(g[C],10):y[C].match(u)?h=parseInt(g[C],10):y[C].match(c)?f=parseInt(g[C],10):y[C].match(l)&&(m=parseInt(g[C],10));var D=new Date([d(v,4),d(p,2),d(n,2)].join("-"));if(!isNaN(D)){var b=new Date(v,p-1,n);return[[h,"setHours"],[f,"setMinutes"],[m,"setSeconds"]].forEach(function(t){var e=i(t,2),n=e[0],r=e[1];void 0!==n&&b[r](n)}),b}},formatSimpleDateToString:function(t,e){return e.replace(o,function(e){return t.getFullYear()}).replace(s,function(e){return d(t.getMonth()+1,e.length)}).replace(a,function(e){return d(t.getDate(),e.length)}).replace(u,function(e){return d(t.getHours(),e.length)}).replace(c,function(e){return d(t.getMinutes(),e.length)}).replace(l,function(e){return d(t.getSeconds(),e.length)})},incrementMonth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",i="vdpPositionLeft",r=function(){var r=t.$refs.outerWrap.getBoundingClientRect(),a=r.height,s=r.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+a>window.innerHeight&&e.top-a>0&&(n="vdpPositionBottom"),e.left+s>window.innerWidth&&(i="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,i].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?r():this.$nextTick(r)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;r>i[t]?r=i[t]:r<0&&(r=0),e.target.value=d(r,"setHours"===t?1:2),n[t](r),this.$emit("input",this.formatDateToString(n,this.format))}}},h=(n(172),n(0)),f=Object(h.a)(v,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,i){return n("option",{key:e,domProps:{value:i}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,i){return n("tr",{key:i,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);f.options.__file="vueDatePick.vue";e.a=f.exports},168:function(t,e,n){"use strict";n(169);var i=n(5),r=n(70),a=n(7),s=/./.toString,o=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?o(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=s.name&&o(function(){return s.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var i=Date.prototype,r=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(i,"toString",function(){var t=a.call(this);return t==t?r.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var i=n(3),r=n(13),a=n(12),s=n(74),o=n(71),u=n(6),c=n(96).f,l=n(95).f,d=n(8).f,p=n(94).trim,v=i.Number,h=v,f=v.prototype,m="Number"==a(n(72)(f)),g="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,a=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;cr)return NaN;return parseInt(u,i)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(m?u(function(){f.valueOf.call(n)}):"Number"!=a(n))?s(new h(y(e)),n,v):y(e)};for(var _,C=n(7)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),D=0;C.length>D;D++)r(h,_=C[D])&&!r(v,_)&&d(v,_,l(h,_));v.prototype=f,f.constructor=v,n(9)(i,"Number",v)}},172:function(t,e,n){"use strict";var i=n(166);n.n(i).a},174:function(t,e,n){},178:function(t,e,n){"use strict";var i=n(174);n.n(i).a},181:function(t,e,n){"use strict";n.r(e);var i=n(167),r={components:{DateTimePicker:i.a},data:function(){return{date:i.a.methods.formatDateToString(new Date,"YYYY-MM-DD")}}},a=(n(178),n(0)),s=Object(a.a)(r,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"teaser"},[n("div",{staticClass:"topBlock"},[n("div",{staticClass:"textTeaser"},[n("h2",{staticClass:"title"},[t._v("Lightweight and mobile friendly date time picker")]),t._v(" "),n("p",{staticClass:"text"},[t._v("\n Vue date pick emphasizes performance, elegant and usable UI\n on all screen sizes and simplicity of configuration.\n Has no dependencies on css frameworks or date libraries.\n Weighs less then 5KB.\n ")]),t._v(" "),n("router-link",{staticClass:"ctaBtn",attrs:{to:"/getting-started.html"}},[t._v("Get started")])],1),t._v(" "),n("date-time-picker",{attrs:{hasInputElement:!1},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1)])])},[],!1,null,"dbbcd036",null);s.options.__file="Teaser.vue";e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/3.c0c5e017.js b/docs/assets/js/3.c0c5e017.js new file mode 100644 index 0000000..425f793 --- /dev/null +++ b/docs/assets/js/3.c0c5e017.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{166:function(t,e,n){},167:function(t,e,n){"use strict";n(168),n(170),n(24);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n(14),n(73),n(93),n(23),n(171);var r=/,|\.|-| |:|\/|\\/,a=/D+/,s=/M+/,o=/Y+/,u=/h+/i,c=/m+/,l=/s+/;function d(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var v={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,i=e.month,r=[],a=new Date(n,i,1),s=new Date,o=this.startWeekOnSunday?1:0,u=a.getDay()||7;if(u>1-o)for(var c=u-(2-o);c>=0;c--){var l=new Date(a);l.setDate(-c),r.push({outOfRange:!0,date:l})}for(;a.getMonth()===i;)r.push({date:new Date(a)}),a.setDate(a.getDate()+1);for(var d=7-r.length%7,v=1;v<=d;v++){var h=new Date(a);h.setDate(v),r.push({outOfRange:!0,date:h})}return r.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,s),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(r,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,i=e+this.selectableYearRange,r=n;r<=i;r++)t.push(r);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:d(t.getHours(),1),minutesPadded:d(t.getMinutes(),2),secondsPadded:d(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),i=new Date(e.year,e.month).getTime();this.direction=n!==i?n>i?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,v,h,f,m,g=t.split(r),y=e.split(r),_=y.length,C=0;C<_;C++)y[C].match(a)?n=parseInt(g[C],10):y[C].match(s)?p=parseInt(g[C],10):y[C].match(o)?v=parseInt(g[C],10):y[C].match(u)?h=parseInt(g[C],10):y[C].match(c)?f=parseInt(g[C],10):y[C].match(l)&&(m=parseInt(g[C],10));var D=new Date([d(v,4),d(p,2),d(n,2)].join("-"));if(!isNaN(D)){var b=new Date(v,p-1,n);return[[v,"setFullYear"],[h,"setHours"],[f,"setMinutes"],[m,"setSeconds"]].forEach(function(t){var e=i(t,2),n=e[0],r=e[1];void 0!==n&&b[r](n)}),b}},formatSimpleDateToString:function(t,e){return e.replace(o,function(e){return t.getFullYear()}).replace(s,function(e){return d(t.getMonth()+1,e.length)}).replace(a,function(e){return d(t.getDate(),e.length)}).replace(u,function(e){return d(t.getHours(),e.length)}).replace(c,function(e){return d(t.getMinutes(),e.length)}).replace(l,function(e){return d(t.getSeconds(),e.length)})},incrementMonth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",i="vdpPositionLeft",r=function(){var r=t.$refs.outerWrap.getBoundingClientRect(),a=r.height,s=r.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+a>window.innerHeight&&e.top-a>0&&(n="vdpPositionBottom"),e.left+s>window.innerWidth&&(i="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,i].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?r():this.$nextTick(r)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;r>i[t]?r=i[t]:r<0&&(r=0),e.target.value=d(r,"setHours"===t?1:2),n[t](r),this.$emit("input",this.formatDateToString(n,this.format))}}},h=(n(172),n(0)),f=Object(h.a)(v,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,i){return n("option",{key:e,domProps:{value:i}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,i){return n("tr",{key:i,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);f.options.__file="vueDatePick.vue";e.a=f.exports},168:function(t,e,n){"use strict";n(169);var i=n(5),r=n(70),a=n(7),s=/./.toString,o=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?o(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=s.name&&o(function(){return s.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var i=Date.prototype,r=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(i,"toString",function(){var t=a.call(this);return t==t?r.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var i=n(3),r=n(13),a=n(12),s=n(74),o=n(71),u=n(6),c=n(96).f,l=n(95).f,d=n(8).f,p=n(94).trim,v=i.Number,h=v,f=v.prototype,m="Number"==a(n(72)(f)),g="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,a=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;cr)return NaN;return parseInt(u,i)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(m?u(function(){f.valueOf.call(n)}):"Number"!=a(n))?s(new h(y(e)),n,v):y(e)};for(var _,C=n(7)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),D=0;C.length>D;D++)r(h,_=C[D])&&!r(v,_)&&d(v,_,l(h,_));v.prototype=f,f.constructor=v,n(9)(i,"Number",v)}},172:function(t,e,n){"use strict";var i=n(166);n.n(i).a},174:function(t,e,n){},178:function(t,e,n){"use strict";var i=n(174);n.n(i).a},181:function(t,e,n){"use strict";n.r(e);var i=n(167),r={components:{DateTimePicker:i.a},data:function(){return{date:i.a.methods.formatDateToString(new Date,"YYYY-MM-DD")}}},a=(n(178),n(0)),s=Object(a.a)(r,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"teaser"},[n("div",{staticClass:"topBlock"},[n("div",{staticClass:"textTeaser"},[n("h2",{staticClass:"title"},[t._v("Lightweight and mobile friendly date time picker")]),t._v(" "),n("p",{staticClass:"text"},[t._v("\n Vue date pick emphasizes performance, elegant and usable UI\n on all screen sizes and simplicity of configuration.\n Has no dependencies on css frameworks or date libraries.\n Weighs less then 5KB.\n ")]),t._v(" "),n("router-link",{staticClass:"ctaBtn",attrs:{to:"/getting-started.html"}},[t._v("Get started")])],1),t._v(" "),n("date-time-picker",{attrs:{hasInputElement:!1},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1)])])},[],!1,null,"dbbcd036",null);s.options.__file="Teaser.vue";e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/4.2871178e.js b/docs/assets/js/4.2871178e.js new file mode 100644 index 0000000..12da21b --- /dev/null +++ b/docs/assets/js/4.2871178e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{166:function(t,e,n){},167:function(t,e,n){"use strict";n(168),n(170),n(24);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n(14),n(73),n(93),n(23),n(171);var r=/,|\.|-| |:|\/|\\/,a=/D+/,s=/M+/,o=/Y+/,u=/h+/i,c=/m+/,l=/s+/;function d(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var h={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,i=e.month,r=[],a=new Date(n,i,1),s=new Date,o=this.startWeekOnSunday?1:0,u=a.getDay()||7;if(u>1-o)for(var c=u-(2-o);c>=0;c--){var l=new Date(a);l.setDate(-c),r.push({outOfRange:!0,date:l})}for(;a.getMonth()===i;)r.push({date:new Date(a)}),a.setDate(a.getDate()+1);for(var d=7-r.length%7,h=1;h<=d;h++){var v=new Date(a);v.setDate(h),r.push({outOfRange:!0,date:v})}return r.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,s),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(r,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,i=e+this.selectableYearRange,r=n;r<=i;r++)t.push(r);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:d(t.getHours(),1),minutesPadded:d(t.getMinutes(),2),secondsPadded:d(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),i=new Date(e.year,e.month).getTime();this.direction=n!==i?n>i?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,h,v,f,m,g=t.split(r),y=e.split(r),_=y.length,D=0;D<_;D++)y[D].match(a)?n=parseInt(g[D],10):y[D].match(s)?p=parseInt(g[D],10):y[D].match(o)?h=parseInt(g[D],10):y[D].match(u)?v=parseInt(g[D],10):y[D].match(c)?f=parseInt(g[D],10):y[D].match(l)&&(m=parseInt(g[D],10));var C=new Date([d(h,4),d(p,2),d(n,2)].join("-"));if(!isNaN(C)){var P=new Date(h,p-1,n);return[[h,"setFullYear"],[v,"setHours"],[f,"setMinutes"],[m,"setSeconds"]].forEach(function(t){var e=i(t,2),n=e[0],r=e[1];void 0!==n&&P[r](n)}),P}},formatSimpleDateToString:function(t,e){return e.replace(o,function(e){return t.getFullYear()}).replace(s,function(e){return d(t.getMonth()+1,e.length)}).replace(a,function(e){return d(t.getDate(),e.length)}).replace(u,function(e){return d(t.getHours(),e.length)}).replace(c,function(e){return d(t.getMinutes(),e.length)}).replace(l,function(e){return d(t.getSeconds(),e.length)})},incrementMonth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",i="vdpPositionLeft",r=function(){var r=t.$refs.outerWrap.getBoundingClientRect(),a=r.height,s=r.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+a>window.innerHeight&&e.top-a>0&&(n="vdpPositionBottom"),e.left+s>window.innerWidth&&(i="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,i].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?r():this.$nextTick(r)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;r>i[t]?r=i[t]:r<0&&(r=0),e.target.value=d(r,"setHours"===t?1:2),n[t](r),this.$emit("input",this.formatDateToString(n,this.format))}}},v=(n(172),n(0)),f=Object(v.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,i){return n("option",{key:e,domProps:{value:i}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,i){return n("tr",{key:i,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);f.options.__file="vueDatePick.vue";e.a=f.exports},168:function(t,e,n){"use strict";n(169);var i=n(5),r=n(70),a=n(7),s=/./.toString,o=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?o(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=s.name&&o(function(){return s.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var i=Date.prototype,r=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(i,"toString",function(){var t=a.call(this);return t==t?r.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var i=n(3),r=n(13),a=n(12),s=n(74),o=n(71),u=n(6),c=n(96).f,l=n(95).f,d=n(8).f,p=n(94).trim,h=i.Number,v=h,f=h.prototype,m="Number"==a(n(72)(f)),g="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,a=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;cr)return NaN;return parseInt(u,i)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(m?u(function(){f.valueOf.call(n)}):"Number"!=a(n))?s(new v(y(e)),n,h):y(e)};for(var _,D=n(7)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;D.length>C;C++)r(v,_=D[C])&&!r(h,_)&&d(h,_,l(v,_));h.prototype=f,f.constructor=h,n(9)(i,"Number",h)}},172:function(t,e,n){"use strict";var i=n(166);n.n(i).a},183:function(t,e,n){"use strict";n.r(e);var i={components:{DatePick:n(167).a},data:function(){return{date:""}},methods:{isFutureDate:function(t){return t>new Date}}},r=n(0),a=Object(r.a)(i,function(){var t=this,e=t.$createElement;return(t._self._c||e)("date-pick",{staticClass:"datePickExample",attrs:{isDateDisabled:t.isFutureDate},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})},[],!1,null,null,null);a.options.__file="disabled-dates.vue";e.default=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/4.c70842c0.js b/docs/assets/js/4.c70842c0.js deleted file mode 100644 index 8a7391e..0000000 --- a/docs/assets/js/4.c70842c0.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{166:function(t,e,n){},167:function(t,e,n){"use strict";n(168),n(170),n(24);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n(14),n(73),n(93),n(23),n(171);var r=/,|\.|-| |:|\/|\\/,a=/D+/,s=/M+/,o=/Y+/,u=/h+/i,c=/m+/,l=/s+/;function d(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var h={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,i=e.month,r=[],a=new Date(n,i,1),s=new Date,o=this.startWeekOnSunday?1:0,u=a.getDay()||7;if(u>1-o)for(var c=u-(2-o);c>=0;c--){var l=new Date(a);l.setDate(-c),r.push({outOfRange:!0,date:l})}for(;a.getMonth()===i;)r.push({date:new Date(a)}),a.setDate(a.getDate()+1);for(var d=7-r.length%7,h=1;h<=d;h++){var v=new Date(a);v.setDate(h),r.push({outOfRange:!0,date:v})}return r.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,s),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(r,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,i=e+this.selectableYearRange,r=n;r<=i;r++)t.push(r);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:d(t.getHours(),1),minutesPadded:d(t.getMinutes(),2),secondsPadded:d(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),i=new Date(e.year,e.month).getTime();this.direction=n!==i?n>i?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,h,v,f,m,g=t.split(r),y=e.split(r),_=y.length,D=0;D<_;D++)y[D].match(a)?n=parseInt(g[D],10):y[D].match(s)?p=parseInt(g[D],10):y[D].match(o)?h=parseInt(g[D],10):y[D].match(u)?v=parseInt(g[D],10):y[D].match(c)?f=parseInt(g[D],10):y[D].match(l)&&(m=parseInt(g[D],10));var C=new Date([d(h,4),d(p,2),d(n,2)].join("-"));if(!isNaN(C)){var P=new Date(h,p-1,n);return[[v,"setHours"],[f,"setMinutes"],[m,"setSeconds"]].forEach(function(t){var e=i(t,2),n=e[0],r=e[1];void 0!==n&&P[r](n)}),P}},formatSimpleDateToString:function(t,e){return e.replace(o,function(e){return t.getFullYear()}).replace(s,function(e){return d(t.getMonth()+1,e.length)}).replace(a,function(e){return d(t.getDate(),e.length)}).replace(u,function(e){return d(t.getHours(),e.length)}).replace(c,function(e){return d(t.getMinutes(),e.length)}).replace(l,function(e){return d(t.getSeconds(),e.length)})},incrementMonth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",i="vdpPositionLeft",r=function(){var r=t.$refs.outerWrap.getBoundingClientRect(),a=r.height,s=r.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+a>window.innerHeight&&e.top-a>0&&(n="vdpPositionBottom"),e.left+s>window.innerWidth&&(i="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,i].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?r():this.$nextTick(r)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;r>i[t]?r=i[t]:r<0&&(r=0),e.target.value=d(r,"setHours"===t?1:2),n[t](r),this.$emit("input",this.formatDateToString(n,this.format))}}},v=(n(172),n(0)),f=Object(v.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,i){return n("option",{key:e,domProps:{value:i}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,i){return n("tr",{key:i,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);f.options.__file="vueDatePick.vue";e.a=f.exports},168:function(t,e,n){"use strict";n(169);var i=n(5),r=n(70),a=n(7),s=/./.toString,o=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?o(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=s.name&&o(function(){return s.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var i=Date.prototype,r=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(i,"toString",function(){var t=a.call(this);return t==t?r.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var i=n(3),r=n(13),a=n(12),s=n(74),o=n(71),u=n(6),c=n(96).f,l=n(95).f,d=n(8).f,p=n(94).trim,h=i.Number,v=h,f=h.prototype,m="Number"==a(n(72)(f)),g="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,a=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;cr)return NaN;return parseInt(u,i)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(m?u(function(){f.valueOf.call(n)}):"Number"!=a(n))?s(new v(y(e)),n,h):y(e)};for(var _,D=n(7)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;D.length>C;C++)r(v,_=D[C])&&!r(h,_)&&d(h,_,l(v,_));h.prototype=f,f.constructor=h,n(9)(i,"Number",h)}},172:function(t,e,n){"use strict";var i=n(166);n.n(i).a},183:function(t,e,n){"use strict";n.r(e);var i={components:{DatePick:n(167).a},data:function(){return{date:""}},methods:{isFutureDate:function(t){return t>new Date}}},r=n(0),a=Object(r.a)(i,function(){var t=this,e=t.$createElement;return(t._self._c||e)("date-pick",{staticClass:"datePickExample",attrs:{isDateDisabled:t.isFutureDate},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})},[],!1,null,null,null);a.options.__file="disabled-dates.vue";e.default=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/5.410e8b68.js b/docs/assets/js/5.410e8b68.js deleted file mode 100644 index 99c789b..0000000 --- a/docs/assets/js/5.410e8b68.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{166:function(t,e,n){},167:function(t,e,n){"use strict";n(168),n(170),n(24);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n(14),n(73),n(93),n(23),n(171);var r=/,|\.|-| |:|\/|\\/,a=/D+/,s=/M+/,o=/Y+/,u=/h+/i,c=/m+/,l=/s+/;function d(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var h={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,i=e.month,r=[],a=new Date(n,i,1),s=new Date,o=this.startWeekOnSunday?1:0,u=a.getDay()||7;if(u>1-o)for(var c=u-(2-o);c>=0;c--){var l=new Date(a);l.setDate(-c),r.push({outOfRange:!0,date:l})}for(;a.getMonth()===i;)r.push({date:new Date(a)}),a.setDate(a.getDate()+1);for(var d=7-r.length%7,h=1;h<=d;h++){var v=new Date(a);v.setDate(h),r.push({outOfRange:!0,date:v})}return r.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,s),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(r,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,i=e+this.selectableYearRange,r=n;r<=i;r++)t.push(r);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:d(t.getHours(),1),minutesPadded:d(t.getMinutes(),2),secondsPadded:d(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),i=new Date(e.year,e.month).getTime();this.direction=n!==i?n>i?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,h,v,f,m,g=t.split(r),y=e.split(r),_=y.length,D=0;D<_;D++)y[D].match(a)?n=parseInt(g[D],10):y[D].match(s)?p=parseInt(g[D],10):y[D].match(o)?h=parseInt(g[D],10):y[D].match(u)?v=parseInt(g[D],10):y[D].match(c)?f=parseInt(g[D],10):y[D].match(l)&&(m=parseInt(g[D],10));var C=new Date([d(h,4),d(p,2),d(n,2)].join("-"));if(!isNaN(C)){var P=new Date(h,p-1,n);return[[v,"setHours"],[f,"setMinutes"],[m,"setSeconds"]].forEach(function(t){var e=i(t,2),n=e[0],r=e[1];void 0!==n&&P[r](n)}),P}},formatSimpleDateToString:function(t,e){return e.replace(o,function(e){return t.getFullYear()}).replace(s,function(e){return d(t.getMonth()+1,e.length)}).replace(a,function(e){return d(t.getDate(),e.length)}).replace(u,function(e){return d(t.getHours(),e.length)}).replace(c,function(e){return d(t.getMinutes(),e.length)}).replace(l,function(e){return d(t.getSeconds(),e.length)})},incrementMonth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",i="vdpPositionLeft",r=function(){var r=t.$refs.outerWrap.getBoundingClientRect(),a=r.height,s=r.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+a>window.innerHeight&&e.top-a>0&&(n="vdpPositionBottom"),e.left+s>window.innerWidth&&(i="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,i].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?r():this.$nextTick(r)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;r>i[t]?r=i[t]:r<0&&(r=0),e.target.value=d(r,"setHours"===t?1:2),n[t](r),this.$emit("input",this.formatDateToString(n,this.format))}}},v=(n(172),n(0)),f=Object(v.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,i){return n("option",{key:e,domProps:{value:i}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,i){return n("tr",{key:i,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);f.options.__file="vueDatePick.vue";e.a=f.exports},168:function(t,e,n){"use strict";n(169);var i=n(5),r=n(70),a=n(7),s=/./.toString,o=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?o(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=s.name&&o(function(){return s.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var i=Date.prototype,r=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(i,"toString",function(){var t=a.call(this);return t==t?r.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var i=n(3),r=n(13),a=n(12),s=n(74),o=n(71),u=n(6),c=n(96).f,l=n(95).f,d=n(8).f,p=n(94).trim,h=i.Number,v=h,f=h.prototype,m="Number"==a(n(72)(f)),g="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,a=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;cr)return NaN;return parseInt(u,i)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(m?u(function(){f.valueOf.call(n)}):"Number"!=a(n))?s(new v(y(e)),n,h):y(e)};for(var _,D=n(7)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;D.length>C;C++)r(v,_=D[C])&&!r(h,_)&&d(h,_,l(v,_));h.prototype=f,f.constructor=h,n(9)(i,"Number",h)}},172:function(t,e,n){"use strict";var i=n(166);n.n(i).a},182:function(t,e,n){"use strict";n.r(e);var i=n(167),r={components:{DatePick:i.a},props:{value:String,pickerProps:Object},data:function(){return{date:this.value||i.a.methods.formatDateToString(new Date,"YYYY-MM-DD")}}},a=n(0),s=Object(a.a)(r,function(){var t=this,e=t.$createElement;return(t._self._c||e)("date-pick",t._b({staticClass:"datePickExample",model:{value:t.date,callback:function(e){t.date=e},expression:"date"}},"date-pick",t.pickerProps,!1))},[],!1,null,null,null);s.options.__file="picker-wrapper.vue";e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/5.c4cde8fc.js b/docs/assets/js/5.c4cde8fc.js new file mode 100644 index 0000000..612ebeb --- /dev/null +++ b/docs/assets/js/5.c4cde8fc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{166:function(t,e,n){},167:function(t,e,n){"use strict";n(168),n(170),n(24);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n(14),n(73),n(93),n(23),n(171);var r=/,|\.|-| |:|\/|\\/,a=/D+/,s=/M+/,o=/Y+/,u=/h+/i,c=/m+/,l=/s+/;function d(t,e){return void 0!==t?t.toString().length>e?t:new Array(e-t.toString().length+1).join("0")+t:void 0}function p(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}var h={props:{value:{type:String,default:""},format:{type:String,default:"YYYY-MM-DD"},displayFormat:{type:String},hasInputElement:{type:Boolean,default:!0},inputAttributes:{type:Object},selectableYearRange:{type:Number,default:40},parseDate:{type:Function},formatDate:{type:Function},pickTime:{type:Boolean,default:!1},pickMinutes:{type:Boolean,default:!0},pickSeconds:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:function(){return!1}},nextMonthCaption:{type:String,default:"Next month"},prevMonthCaption:{type:String,default:"Previous month"},setTimeCaption:{type:String,default:"Set time:"},mobileBreakpointWidth:{type:Number,default:500},weekdays:{type:Array,default:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},months:{type:Array,default:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}},startWeekOnSunday:{type:Boolean,default:!1}},data:function(){return{inputValue:this.valueToInputFormat(this.value),currentPeriod:this.getPeriodFromValue(this.value,this.format),direction:void 0,positionClass:void 0,opened:!this.hasInputElement}},computed:{valueDate:function(){var t=this.value,e=this.format;return t?this.parseDateString(t,e):void 0},isValidValue:function(){var t=this.valueDate;return!this.value||Boolean(t)},currentPeriodDates:function(){var t=this,e=this.currentPeriod,n=e.year,i=e.month,r=[],a=new Date(n,i,1),s=new Date,o=this.startWeekOnSunday?1:0,u=a.getDay()||7;if(u>1-o)for(var c=u-(2-o);c>=0;c--){var l=new Date(a);l.setDate(-c),r.push({outOfRange:!0,date:l})}for(;a.getMonth()===i;)r.push({date:new Date(a)}),a.setDate(a.getDate()+1);for(var d=7-r.length%7,h=1;h<=d;h++){var v=new Date(a);v.setDate(h),r.push({outOfRange:!0,date:v})}return r.forEach(function(e){e.disabled=t.isDateDisabled(e.date),e.today=p(e.date,s),e.dateKey=[e.date.getFullYear(),e.date.getMonth()+1,e.date.getDate()].join("-"),e.selected=!!t.valueDate&&p(e.date,t.valueDate)}),function(t,e){var n=[];for(;t.length;)n.push(t.splice(0,e));return n}(r,7)},yearRange:function(){for(var t=[],e=this.currentPeriod.year,n=e-this.selectableYearRange,i=e+this.selectableYearRange,r=n;r<=i;r++)t.push(r);return t},currentTime:function(){var t=this.valueDate;return t?{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),hoursPadded:d(t.getHours(),1),minutesPadded:d(t.getMinutes(),2),secondsPadded:d(t.getSeconds(),2)}:void 0},directionClass:function(){return this.direction?"vdp".concat(this.direction,"Direction"):void 0},weekdaysSorted:function(){if(this.startWeekOnSunday){var t=this.weekdays.slice();return t.unshift(t.pop()),t}return this.weekdays}},watch:{value:function(t){this.isValidValue&&(this.inputValue=this.valueToInputFormat(t),this.currentPeriod=this.getPeriodFromValue(t,this.format))},currentPeriod:function(t,e){var n=new Date(t.year,t.month).getTime(),i=new Date(e.year,e.month).getTime();this.direction=n!==i?n>i?"Next":"Prev":void 0}},beforeDestroy:function(){this.removeCloseEvents(),this.teardownPosition()},methods:{valueToInputFormat:function(t){return this.displayFormat&&this.formatDateToString(this.parseDateString(t,this.format),this.displayFormat)||t},getPeriodFromValue:function(t,e){var n=this.parseDateString(t,e)||new Date;return{month:n.getMonth(),year:n.getFullYear()}},parseDateString:function(t,e){return t?this.parseDate?this.parseDate(t,e):this.parseSimpleDateString(t,e):void 0},formatDateToString:function(t,e){return t?this.formatDate?this.formatDate(t,e):this.formatSimpleDateToString(t,e):""},parseSimpleDateString:function(t,e){for(var n,p,h,v,f,m,g=t.split(r),y=e.split(r),_=y.length,D=0;D<_;D++)y[D].match(a)?n=parseInt(g[D],10):y[D].match(s)?p=parseInt(g[D],10):y[D].match(o)?h=parseInt(g[D],10):y[D].match(u)?v=parseInt(g[D],10):y[D].match(c)?f=parseInt(g[D],10):y[D].match(l)&&(m=parseInt(g[D],10));var C=new Date([d(h,4),d(p,2),d(n,2)].join("-"));if(!isNaN(C)){var P=new Date(h,p-1,n);return[[h,"setFullYear"],[v,"setHours"],[f,"setMinutes"],[m,"setSeconds"]].forEach(function(t){var e=i(t,2),n=e[0],r=e[1];void 0!==n&&P[r](n)}),P}},formatSimpleDateToString:function(t,e){return e.replace(o,function(e){return t.getFullYear()}).replace(s,function(e){return d(t.getMonth()+1,e.length)}).replace(a,function(e){return d(t.getDate(),e.length)}).replace(u,function(e){return d(t.getHours(),e.length)}).replace(c,function(e){return d(t.getMinutes(),e.length)}).replace(l,function(e){return d(t.getSeconds(),e.length)})},incrementMonth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=new Date(this.currentPeriod.year,this.currentPeriod.month),n=new Date(e.getFullYear(),e.getMonth()+t);this.currentPeriod={month:n.getMonth(),year:n.getFullYear()}},processUserInput:function(t){var e=this.parseDateString(t,this.displayFormat||this.format);this.inputValue=t,this.$emit("input",e?this.formatDateToString(e,this.format):t)},open:function(){this.opened||(this.opened=!0,this.currentPeriod=this.getPeriodFromValue(this.value,this.format),this.addCloseEvents(),this.setupPosition()),this.direction=void 0},close:function(){this.opened&&(this.opened=!1,this.direction=void 0,this.removeCloseEvents(),this.teardownPosition())},closeViaOverlay:function(t){this.hasInputElement&&t.target===this.$refs.outerWrap&&this.close()},addCloseEvents:function(){var t=this;this.closeEventListener||(this.closeEventListener=function(e){return t.inspectCloseEvent(e)},["click","keyup","focusin"].forEach(function(e){return document.addEventListener(e,t.closeEventListener)}))},inspectCloseEvent:function(t){t.keyCode?27===t.keyCode&&this.close():t.target===this.$el||this.$el.contains(t.target)||this.close()},removeCloseEvents:function(){var t=this;this.closeEventListener&&(["click","keyup"].forEach(function(e){return document.removeEventListener(e,t.closeEventListener)}),delete this.closeEventListener)},setupPosition:function(){var t=this;this.positionEventListener||(this.positionEventListener=function(){return t.positionFloater()},window.addEventListener("resize",this.positionEventListener)),this.positionFloater()},positionFloater:function(){var t=this,e=this.$el.getBoundingClientRect(),n="vdpPositionTop",i="vdpPositionLeft",r=function(){var r=t.$refs.outerWrap.getBoundingClientRect(),a=r.height,s=r.width;window.innerWidth>t.mobileBreakpointWidth?(e.top+e.height+a>window.innerHeight&&e.top-a>0&&(n="vdpPositionBottom"),e.left+s>window.innerWidth&&(i="vdpPositionRight"),t.positionClass=["vdpPositionReady",n,i].join(" ")):t.positionClass="vdpPositionFixed"};this.$refs.outerWrap?r():this.$nextTick(r)},teardownPosition:function(){this.positionEventListener&&(this.positionClass=void 0,window.removeEventListener("resize",this.positionEventListener),delete this.positionEventListener)},clear:function(){this.$emit("input","")},selectDateItem:function(t){if(!t.disabled){var e=new Date(t.date);this.currentTime&&(e.setHours(this.currentTime.hours),e.setMinutes(this.currentTime.minutes),e.setSeconds(this.currentTime.seconds)),this.$emit("input",this.formatDateToString(e,this.format)),this.hasInputElement&&!this.pickTime&&this.close()}},inputTime:function(t,e){var n=this.valueDate,i={setHours:23,setMinutes:59,setSeconds:59},r=parseInt(e.target.value,10)||0;r>i[t]?r=i[t]:r<0&&(r=0),e.target.value=d(r,"setHours"===t?1:2),n[t](r),this.$emit("input",this.formatDateToString(n,this.format))}}},v=(n(172),n(0)),f=Object(v.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vdpComponent",class:{vdpWithInput:t.hasInputElement}},[t.hasInputElement?n("input",t._b({attrs:{type:"text"},domProps:{value:t.inputValue},on:{input:function(e){t.processUserInput(e.target.value)},focus:t.open,click:t.open}},"input",t.inputAttributes,!1)):t._e(),t._v(" "),t.hasInputElement&&t.inputValue?n("button",{staticClass:"vdpClearInput",attrs:{type:"button"},on:{click:t.clear}}):t._e(),t._v(" "),n("transition",{attrs:{name:"vdp-toggle-calendar"}},[t.opened?n("div",{ref:"outerWrap",staticClass:"vdpOuterWrap",class:[t.positionClass,{vdpFloating:t.hasInputElement}],on:{click:t.closeViaOverlay}},[n("div",{staticClass:"vdpInnerWrap"},[n("header",{staticClass:"vdpHeader"},[n("button",{staticClass:"vdpArrow vdpArrowPrev",attrs:{title:t.prevMonthCaption,type:"button"},on:{click:function(e){t.incrementMonth(-1)}}},[t._v(t._s(t.prevMonthCaption))]),t._v(" "),n("button",{staticClass:"vdpArrow vdpArrowNext",attrs:{type:"button",title:t.nextMonthCaption},on:{click:function(e){t.incrementMonth(1)}}},[t._v(t._s(t.nextMonthCaption))]),t._v(" "),n("div",{staticClass:"vdpPeriodControls"},[n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.month,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.months[t.currentPeriod.month])+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.month,expression:"currentPeriod.month"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"month",e.target.multiple?n:n[0])}}},t._l(t.months,function(e,i){return n("option",{key:e,domProps:{value:i}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),n("div",{staticClass:"vdpPeriodControl"},[n("button",{key:t.currentPeriod.year,class:t.directionClass,attrs:{type:"button"}},[t._v("\n "+t._s(t.currentPeriod.year)+"\n ")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPeriod.year,expression:"currentPeriod.year"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.currentPeriod,"year",e.target.multiple?n:n[0])}}},t._l(t.yearRange,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)])])]),t._v(" "),n("table",{staticClass:"vdpTable"},[n("thead",[n("tr",t._l(t.weekdaysSorted,function(e){return n("th",{key:e,staticClass:"vdpHeadCell"},[n("span",{staticClass:"vdpHeadCellContent"},[t._v(t._s(e))])])}),0)]),t._v(" "),n("tbody",{key:t.currentPeriod.year+"-"+t.currentPeriod.month,class:t.directionClass},t._l(t.currentPeriodDates,function(e,i){return n("tr",{key:i,staticClass:"vdpRow"},t._l(e,function(e){return n("td",{key:e.dateKey,staticClass:"vdpCell",class:{selectable:!e.disabled,selected:e.selected,disabled:e.disabled,today:e.today,outOfRange:e.outOfRange},attrs:{"data-id":e.dateKey},on:{click:function(n){t.selectDateItem(e)}}},[n("div",{staticClass:"vdpCellContent"},[t._v(t._s(e.date.getDate()))])])}),0)}),0)]),t._v(" "),t.pickTime&&t.currentTime?n("div",{staticClass:"vdpTimeControls"},[n("span",{staticClass:"vdpTimeCaption"},[t._v(t._s(t.setTimeCaption))]),t._v(" "),n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.hoursPadded))]),n("br")]),t._v(" "),n("input",{staticClass:"vdpHoursInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.hoursPadded},on:{input:function(e){e.preventDefault(),t.inputTime("setHours",e)}}})]),t._v(" "),t.pickMinutes?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickMinutes?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.minutesPadded))]),n("br")]),t._v(" "),t.pickMinutes?n("input",{staticClass:"vdpMinutesInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.minutesPadded},on:{input:function(e){t.inputTime("setMinutes",e)}}}):t._e()]):t._e(),t._v(" "),t.pickSeconds?n("span",{staticClass:"vdpTimeSeparator"},[t._v(":")]):t._e(),t._v(" "),t.pickSeconds?n("div",{staticClass:"vdpTimeUnit"},[n("pre",[n("span",[t._v(t._s(t.currentTime.secondsPadded))]),n("br")]),t._v(" "),t.pickSeconds?n("input",{staticClass:"vdpSecondsInput",attrs:{type:"number",pattern:"\\d*"},domProps:{value:t.currentTime.secondsPadded},on:{input:function(e){t.inputTime("setSeconds",e)}}}):t._e()]):t._e()]):t._e()])]):t._e()])],1)},[],!1,null,null,null);f.options.__file="vueDatePick.vue";e.a=f.exports},168:function(t,e,n){"use strict";n(169);var i=n(5),r=n(70),a=n(7),s=/./.toString,o=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?o(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=s.name&&o(function(){return s.call(this)})},169:function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(70)})},170:function(t,e,n){var i=Date.prototype,r=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(9)(i,"toString",function(){var t=a.call(this);return t==t?r.call(this):"Invalid Date"})},171:function(t,e,n){"use strict";var i=n(3),r=n(13),a=n(12),s=n(74),o=n(71),u=n(6),c=n(96).f,l=n(95).f,d=n(8).f,p=n(94).trim,h=i.Number,v=h,f=h.prototype,m="Number"==a(n(72)(f)),g="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,a=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;cr)return NaN;return parseInt(u,i)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(m?u(function(){f.valueOf.call(n)}):"Number"!=a(n))?s(new v(y(e)),n,h):y(e)};for(var _,D=n(7)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;D.length>C;C++)r(v,_=D[C])&&!r(h,_)&&d(h,_,l(v,_));h.prototype=f,f.constructor=h,n(9)(i,"Number",h)}},172:function(t,e,n){"use strict";var i=n(166);n.n(i).a},182:function(t,e,n){"use strict";n.r(e);var i=n(167),r={components:{DatePick:i.a},props:{value:String,pickerProps:Object},data:function(){return{date:this.value||i.a.methods.formatDateToString(new Date,"YYYY-MM-DD")}}},a=n(0),s=Object(a.a)(r,function(){var t=this,e=t.$createElement;return(t._self._c||e)("date-pick",t._b({staticClass:"datePickExample",model:{value:t.date,callback:function(e){t.date=e},expression:"date"}},"date-pick",t.pickerProps,!1))},[],!1,null,null,null);s.options.__file="picker-wrapper.vue";e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/app.6fc45011.js b/docs/assets/js/app.f3035f23.js similarity index 96% rename from docs/assets/js/app.6fc45011.js rename to docs/assets/js/app.f3035f23.js index d416a70..dc8ef5e 100644 --- a/docs/assets/js/app.6fc45011.js +++ b/docs/assets/js/app.f3035f23.js @@ -1,8 +1,8 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],c=e[1],u=e[2],f=0,p=[];f0?o(r(t),9007199254740991):0}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){var r=n(17);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(110),o=n(87),i=n(18),a=n(31);t.exports=n(88)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(2),o=n(33)(3);r(r.P+r.F*!n(21)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(2),o=n(33)(0),i=n(21)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(5),o=n(19),i=n(16),a=n(27),s=n(66),c=n(67),u=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(69)("replace",2,function(t,e,n,h){return[function(r,o){var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=h(n,t,this,e);if(o.done)return o.value;var f=r(t),p=String(this),d="function"==typeof e;d||(e=String(e));var m=f.global;if(m){var g=f.unicode;f.lastIndex=0}for(var y=[];;){var _=c(f,p);if(null===_)break;if(y.push(_),!m)break;""===String(_[0])&&(f.lastIndex=s(p,i(f.lastIndex),g))}for(var b,x="",w=0,k=0;k=w&&(x+=p.slice(w,$)+j,w=$+C.length)}return x+p.slice(w)}];function v(t,e,r,i,a,s){var c=r+t.length,u=i.length,l=d;return void 0!==a&&(a=o(a),l=p),n.call(s,l,function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return n;if(l>u){var p=f(l/10);return 0===p?n:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}s=i[l-1]}return void 0===s?"":s})}})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(8).f,o=n(13),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(106)})},function(t,e,n){var r=n(83),o=n(62);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(60),o=n(17);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(19),o=n(30);n(86)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(10),o=n(60),i=n(19),a=n(16),s=n(114);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,m,g=i(e),y=o(g),_=r(s,h,3),b=a(y.length),x=0,w=n?d(e,b):c?d(e,0):void 0;b>x;x++)if((p||x in y)&&(m=_(v=y[x],x,g),t))if(n)w[x]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(l)return!1;return f?-1:u||l?l:w}}},function(t,e,n){"use strict";var r=n(2),o=n(33)(2);r(r.P+r.F*!n(21)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(2),o=n(33)(1);r(r.P+r.F*!n(21)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r,o; +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],c=e[1],u=e[2],f=0,p=[];f0?o(r(t),9007199254740991):0}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){var r=n(17);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(110),o=n(87),i=n(18),a=n(31);t.exports=n(88)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(2),o=n(33)(3);r(r.P+r.F*!n(21)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(2),o=n(33)(0),i=n(21)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(5),o=n(19),i=n(16),a=n(27),s=n(66),c=n(67),u=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(69)("replace",2,function(t,e,n,h){return[function(r,o){var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=h(n,t,this,e);if(o.done)return o.value;var f=r(t),p=String(this),d="function"==typeof e;d||(e=String(e));var m=f.global;if(m){var g=f.unicode;f.lastIndex=0}for(var y=[];;){var _=c(f,p);if(null===_)break;if(y.push(_),!m)break;""===String(_[0])&&(f.lastIndex=s(p,i(f.lastIndex),g))}for(var b,x="",w=0,k=0;k=w&&(x+=p.slice(w,$)+j,w=$+C.length)}return x+p.slice(w)}];function v(t,e,r,i,a,s){var c=r+t.length,u=i.length,l=d;return void 0!==a&&(a=o(a),l=p),n.call(s,l,function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return n;if(l>u){var p=f(l/10);return 0===p?n:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}s=i[l-1]}return void 0===s?"":s})}})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(8).f,o=n(13),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(106)})},function(t,e,n){var r=n(83),o=n(62);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(60),o=n(17);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(19),o=n(30);n(86)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(10),o=n(60),i=n(19),a=n(16),s=n(114);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,m,g=i(e),y=o(g),_=r(s,h,3),b=a(y.length),x=0,w=n?d(e,b):c?d(e,0):void 0;b>x;x++)if((p||x in y)&&(m=_(v=y[x],x,g),t))if(n)w[x]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(l)return!1;return f?-1:u||l?l:w}}},function(t,e,n){"use strict";var r=n(2),o=n(33)(2);r(r.P+r.F*!n(21)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(2),o=n(33)(1);r(r.P+r.F*!n(21)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r,o; /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */void 0===(o="function"==typeof(r=function(){var t,e,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(t,e,n){return tn?n:t}function i(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=o(t,r.minimum,1),n.status=1===t?null:t;var c=n.render(!e),u=c.querySelector(r.barSelector),l=r.speed,f=r.easing;return c.offsetWidth,a(function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,function(t,e,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+i(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(t)+"%,0)"}:{"margin-left":i(t)+"%"}).transition="all "+e+"ms "+n,o}(t,l,f)),1===t?(s(c,{transition:"none",opacity:1}),c.offsetWidth,setTimeout(function(){s(c,{transition:"all "+l+"ms linear",opacity:0}),setTimeout(function(){n.remove(),e()},l)},l)):setTimeout(e,l)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout(function(){n.status&&(n.trickle(),t())},r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*o(Math.random()*e,.1,.95)),e=o(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always(function(){0==--e?(t=0,n.done()):n.set((t-e)/t)}),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var o,a=e.querySelector(r.barSelector),c=t?"-100":i(n.status||0),l=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(o=e.querySelector(r.spinnerSelector))&&p(o),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(e),e},n.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&p(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()}),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,o=t.length,i=e.charAt(0).toUpperCase()+e.slice(1);o--;)if((r=t[o]+i)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,o,i=arguments;if(2==i.length)for(n in e)void 0!==(o=e[n])&&e.hasOwnProperty(n)&&r(t,n,o);else r(t,i[1],i[2])}}();function c(t,e){var n="string"==typeof t?t:f(t);return n.indexOf(" "+e+" ")>=0}function u(t,e){var n=f(t),r=n+e;c(n,e)||(t.className=r.substring(1))}function l(t,e){var n,r=f(t);c(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function f(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function p(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=o)},function(t,e){t.exports=!1},function(t,e,n){var r=n(12),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(4),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(10),o=n(98),i=n(99),a=n(5),s=n(16),c=n(100),u={},l={};(e=t.exports=function(t,e,n,f,p){var d,h,v,m,g=p?function(){return t}:c(t),y=r(n,f,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=s(t.length);d>_;_++)if((m=e?y(a(h=t[_])[0],h[1]):y(t[_]))===u||m===l)return m}else for(v=g.call(t);!(h=v.next()).done;)if((m=o(v,y,h.value,e))===u||m===l)return m}).BREAK=u,e.RETURN=l},function(t,e,n){var r=n(9);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(3),o=n(8),i=n(7),a=n(1)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(76)("keys"),o=n(26);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(26)("meta"),o=n(4),i=n(13),a=n(8).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(6)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&c(t)&&!i(t,r)&&l(t),t}}},function(t,e,n){var r=n(8).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(7)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(2),o=n(84)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(21)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(119)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){"use strict";var r=n(53),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){"use strict";var r,o,i=n(70),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,u=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(t){var e,n,r,o,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),u&&(e=c.lastIndex),r=a.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&s.call(r[0],n,function(){for(o=1;o")}),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=s(t),d=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),h=d?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e}):void 0;if(!d||!h||"replace"===t&&!l||"split"===t&&!f){var v=/./[p],m=n(a,p,""[t],function(t,e,n,r,o){return e.exec===c?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),g=m[0],y=m[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},function(t,e,n){"use strict";var r=n(5);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(5),o=n(112),i=n(62),a=n(61)("IE_PROTO"),s=function(){},c=function(){var t,e=n(54)("iframe"),r=i.length;for(e.style.display="none",n(80).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" + diff --git a/docs/examples.html b/docs/examples.html index 68ecedb..47aa8f2 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -7,7 +7,7 @@ - + @@ -205,7 +205,7 @@ 2058
MonTueWedThuFriSatSun
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
1
2
3
+
MonTueWedThuFriSatSun
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
1
2
3
Show code
<template>
     <date-pick
@@ -261,7 +261,7 @@
 };
 </script>
 

Custom date parser

Vue date pick comes with simple date parser. -If you need to work with complex date formats feel free to inject implementation of your choice.

+If you need to work with complex date formats feel free to inject implementation of your choice.

Show code
<template>
     <date-pick
@@ -383,6 +383,6 @@
         
         →
       

- + diff --git a/docs/getting-started.html b/docs/getting-started.html index 3a55ea5..cbe877f 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -7,7 +7,7 @@ - + @@ -41,6 +41,6 @@ →

- + diff --git a/docs/index.html b/docs/index.html index 03635f5..97cf324 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,7 @@ - + @@ -210,7 +210,7 @@ 2058
MonTueWedThuFriSatSun
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
1
2
3
- +
MonTueWedThuFriSatSun
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
1
2
3
+ diff --git a/docs/localization.html b/docs/localization.html index d72e225..47f169d 100644 --- a/docs/localization.html +++ b/docs/localization.html @@ -7,7 +7,7 @@ - + @@ -41,6 +41,6 @@ →

- + diff --git a/docs/props-reference.html b/docs/props-reference.html index 48e1b28..7d71668 100644 --- a/docs/props-reference.html +++ b/docs/props-reference.html @@ -7,7 +7,7 @@ - + @@ -51,6 +51,6 @@

- +