(window.webpackJsonp=window.webpackJsonp||[]).push([[198],{2698:function(t,e,n){"use strict";n.r(e);n(44),n(55);var l=n(2488),r=n(2393),o=n(1543),d=n(2491),c={props:{activeStart:{type:String,default:""},availability:{type:Array,default:[]}},components:{FullCalendar:l.a},data:function(){var t=this;return{calendarOptions:{plugins:[o.a,d.a,r.a],initialView:"dayGridMonth",headerToolbar:{start:"prev",center:"title",end:"next"},contentHeight:400,editable:!1,selectable:!1,showNonCurrentDates:!1,fixedWeekCount:!1,weekends:!0,dateClick:this.handleDateSelect,validRange:this.validRange,selectAllow:this.isAvailable,dayCellClassNames:function(e){return t.availability.includes(e.dow)?"":"week-disabled"}}}},watch:{activeStart:function(t){console.log(t);this.$refs.calendar;this.$refs.calendar.getApi().gotoDate(t)}},mounted:function(){this.$refs.calendar;this.$refs.calendar.getApi().gotoDate(this.activeStart)},methods:{handleDateSelect:function(t){console.log(t);var e=new Date(t.dateStr).getDay();this.availability.includes(e)&&this.$emit("selectDate",t.dateStr)},validRange:function(){var t=new Date,e=new Date(t);e.setDate(t.getDate()+1);var n=new Date(t);return n.setMonth(n.getMonth()+6),{start:e,end:n}},isAvailable:function(t){for(var e=new Date(t.dateStr).getDay(),i=0;i<this.availability.length;i++)if(e===this.availability[i])return!0;return!1}}},h=n(10),component=Object(h.a)(c,(function(){var t=this._self._c;return t("div",{staticClass:"app"},[t("FullCalendar",{ref:"calendar",attrs:{options:this.calendarOptions}})],1)}),[],!1,null,null,null);e.default=component.exports}}]);