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xB,EAAQqB,EAAKZ,WACbN,EAAO,GAGAkB,EAAKZ,aAAeT,IACvBmB,EAAW,IAAIG,KAAKD,EAAKI,YAChBC,GAAK,YACdvB,EAAKwB,KAAKR,GACVE,EAAKO,QAAQP,EAAKQ,UAAY,GAIlC,IAFAN,EAAMA,GAAO,EACbF,EAAO,IAAIC,KAAKnB,EAAK,GAAGsB,WACnBL,EAAIG,EAAM,EAAGH,EAAI,EAAGA,IACrBC,EAAKO,QAAQP,EAAKQ,UAAY,IAC9BV,EAAW,IAAIG,KAAKD,EAAKI,YAChBC,GAAK,YACdvB,EAAK2B,QAAQX,GAEjB,GAAIhB,EAAK4B,OAAS,GAEd,IADAV,EAAO,IAAIC,KAAKnB,EAAKA,EAAK4B,OAAS,GAAGN,WACjCL,EAAIjB,EAAK4B,OAAQX,EAAI,GAAIA,IAC1BC,EAAKO,QAAQP,EAAKQ,UAAY,IAC9BV,EAAW,IAAIG,KAAKD,EAAKI,YAChBC,GAAK,YACdvB,EAAKwB,KAAKR,GAIlBjB,KAAKW,QAAQV,EACjB,GAIR,G","sources":["webpack://app/./node_modules/datepicker/src/calendarmodel.js"],"sourcesContent":["DP.define(function (D, require) {\r\n\r\n var CalendarModel = D.Class({\r\n Implements: 'events',\r\n initialize: function (year, month, options) {\r\n // Mix otions\r\n this.year = year\r\n this.month = month\r\n this.days = []\r\n this.caculateDays()\r\n\r\n },\r\n setMonth: function (month) {\r\n if (month >= 13) {\r\n month = 1\r\n this.nextYear()\r\n }\r\n if (month <= 0) {\r\n month = 12\r\n this.preYear()\r\n }\r\n this.month = month\r\n this.caculateDays()\r\n this.fire('change')\r\n },\r\n getMonth: function () {\r\n return this.month\r\n },\r\n getMonthString: function () {\r\n return this.year + '年' + this.month + '月'\r\n },\r\n setYear: function (year) {\r\n this.year = year\r\n this.caculateDays()\r\n this.fire('change')\r\n },\r\n getYear: function () {\r\n return this.year\r\n },\r\n setDays: function (days) {\r\n this.days = days\r\n },\r\n getDays: function () {\r\n return this.days\r\n },\r\n preMonth: function () {\r\n var prevMonth = this.getMonth() - 1\r\n if (prevMonth < 1) {\r\n this.prevYear()\r\n } else {\r\n this.setMonth(prevMonth)\r\n }\r\n this.caculateDays()\r\n this.fire('change')\r\n },\r\n nextMonth: function () {\r\n var nextMonth = this.getMonth() + 1\r\n if (nextMonth > 12) {\r\n this.nextYear()\r\n } else {\r\n this.setMonth(nextMonth)\r\n }\r\n this.caculateDays()\r\n this.fire('change')\r\n },\r\n nextYear: function () {\r\n this.setMonth(1)\r\n this.setYear(this.getYear() + 1);\r\n },\r\n prevYear: function () {\r\n this.setMonth(12)\r\n this.setYear(this.getYear() - 1);\r\n },\r\n caculateDays: function () {\r\n var date = new Date(this.getYear(), this.getMonth() - 1, 1),\r\n day = date.getDay(),\r\n month = date.getMonth(),\r\n days = [],\r\n tempDate,\r\n i\r\n while (date.getMonth() === month) {\r\n tempDate = new Date(date.getTime())\r\n tempDate.at = 'thisMonth'\r\n days.push(tempDate)\r\n date.setDate(date.getDate() + 1)\r\n }\r\n day = day || 7\r\n date = new Date(days[0].getTime())\r\n for (i = day - 1; i > 0; i--) {\r\n date.setDate(date.getDate() - 1)\r\n tempDate = new Date(date.getTime())\r\n tempDate.at = 'lastMonth'\r\n days.unshift(tempDate)\r\n }\r\n if (days.length < 42) {\r\n date = new Date(days[days.length - 1].getTime())\r\n for (i = days.length; i < 42; i++) {\r\n date.setDate(date.getDate() + 1)\r\n tempDate = new Date(date.getTime())\r\n tempDate.at = 'nextMonth'\r\n days.push(tempDate)\r\n\r\n }\r\n }\r\n this.setDays(days)\r\n }\r\n })\r\n \r\n return CalendarModel\r\n});\r\n\r\n"],"names":["DP","define","D","require","Class","Implements","initialize","year","month","options","this","days","caculateDays","setMonth","nextYear","preYear","fire","getMonth","getMonthString","setYear","getYear","setDays","getDays","preMonth","prevMonth","prevYear","nextMonth","tempDate","i","date","Date","day","getDay","getTime","at","push","setDate","getDate","unshift","length"],"sourceRoot":""}