Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-calendars

Package Overview
Dependencies
Maintainers
2
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-calendars - npm Package Compare versions

Comparing version 1.0.16 to 1.0.18

datepicker.d.ts

4

dist/ej2-calendars.umd.min.js
/*!
* filename: ej2-calendars.umd.min.js
* version : 1.0.16
* version : 1.0.18
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,2 +11,2 @@ * Use of this code is subject to the terms of our license.

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var i=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,function(e){return function(e){function t(a){if(i[a])return i[a].exports;var s=i[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var a,s;a=[i,t,i(1)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s;a=[i,t,i(2)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),n=this&&this.__decorate||function(e,t,i,a){var s,r=arguments.length,n=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};a=[i,t,i(3),i(3),i(3),i(3),i(3)],void 0!==(s=function(e,t,i,a,s,o,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l="e-disabled",c="e-overlay",d="e-other-month",u="e-selected",p="e-focused-date",v=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.effect="",a.keyConfigs={controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end"},a}return r(t,e),t.prototype.render=function(){this.globalize=new i.Internationalization(this.locale),this.element.classList.add("e-calendar"),this.enableRtl&&this.element.classList.add("e-rtl"),o.attributes(this.element,{"data-role":"calendar"}),this.processDate(),this.header(),this.content(),this.wireEvents()},t.prototype.processDate=function(){this.validateDate(),this.minMaxUpdate()},t.prototype.validateDate=function(){this.setProperties({value:new Date(""+this.value)},!0),this.currentDate=this.currentDate?this.currentDate:this.resetTime(new Date),!h.isNullOrUndefined(this.value)&&this.min<=this.max&&this.value>=this.min&&this.value<=this.max&&(this.currentDate=this.resetTime(new Date(""+this.value))),isNaN(+this.value)&&this.setProperties({value:null},!0)},t.prototype.minMaxUpdate=function(){this.min<=this.max?o.removeClass([this.element],c):(this.setProperties({min:this.min},!0),o.addClass([this.element],c)),this.min=h.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=h.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!h.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.resetTime(this.min)},!0),this.changedArgs={value:this.value}):!h.isNullOrUndefined(this.value)&&this.value>=this.max&&this.min<=this.max&&(this.setProperties({value:this.resetTime(this.max)},!0),this.changedArgs={value:this.value}),this.min<=this.max&&this.value&&this.value<=this.max&&this.value>=this.min?this.currentDate=new Date(""+this.value):this.min<=this.max&&!this.value&&this.currentDate>this.max?this.currentDate=new Date(""+this.max):this.currentDate<this.min&&(this.currentDate=new Date(""+this.min))},t.prototype.header=function(){var e={"aria-disabled":"false",role:"button","aria-label":"previous month"},t={"aria-disabled":"false",role:"button","aria-label":"next month"},i={"aria-atomic":"true","aria-live":"assertive","aria-label":"title",role:"button"};this.headerEle=o.createElement("div",{className:"e-header"});var a=o.createElement("div",{className:"e-icon-container"});this.prevIcon=o.createElement("a",{className:"e-prev"}),s.isRippleEnabled&&this.prevIcon.classList.add("e-ripple-style"),o.attributes(this.prevIcon,e),this.nextIcon=o.createElement("a",{className:"e-next"}),s.isRippleEnabled&&this.nextIcon.classList.add("e-ripple-style"),o.attributes(this.nextIcon,t),this.hdrTitleEle=o.createElement("a",{className:"e-day e-title",attrs:{}}),o.attributes(this.hdrTitleEle,i),this.headerEle.appendChild(this.hdrTitleEle),this.prevIcon.appendChild(o.createElement("span",{className:"e-icon-prev e-icons"})),this.nextIcon.appendChild(o.createElement("span",{className:"e-icon-next e-icons"})),a.appendChild(this.prevIcon),a.appendChild(this.nextIcon),this.headerEle.appendChild(a),this.element.appendChild(this.headerEle)},t.prototype.content=function(){this.previousDate=this.value,this.contentEle=o.createElement("div",{className:"e-content"}),this.table=o.createElement("table",{attrs:{tabIndex:"0",role:"grid","aria-activedescendant":""}}),this.element.appendChild(this.contentEle),this.contentEle.appendChild(this.table),this.contentHdr(),this.contentBody()},t.prototype.getCultureValues=function(){var e,t=[];e="en"===this.locale||"en-US"===this.locale?h.getValue("days.stand-alone.short",s.getDefaultDateObject()):this.getCultureObjects(s.cldrData,""+this.locale);for(var i=0,a=Object.keys(e);i<a.length;i++){var r=a[i];t.push(h.getValue(r,e))}return t},t.prototype.contentHdr=function(){h.isNullOrUndefined(this.element.querySelectorAll(".e-content .e-week-header")[0])||o.remove(this.element.querySelectorAll(".e-content .e-week-header")[0]);var e,t="";(this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:0},!0),this.theadEle=o.createElement("thead",{className:"e-week-header"}),this.weekNumber&&(t+='<th class="e-week-number"></th>'),e=this.shiftArray(this.getCultureValues().length>0&&this.getCultureValues(),this.firstDayOfWeek);for(var i=0;i<=6;i++)t+='<th class="">'+e[i]+"</th>";t="<tr>"+t+"</tr>",this.theadEle.innerHTML=t,this.table.appendChild(this.theadEle)},t.prototype.contentBody=function(){switch(h.isNullOrUndefined(this.element.querySelectorAll(".e-content tbody")[0])||o.remove(this.element.querySelectorAll(".e-content tbody")[0]),this.start){case"year":this.renderYears();break;case"decade":this.renderDecades();break;default:this.renderMonths()}},t.prototype.wireEvents=function(){i.EventHandler.add(this.hdrTitleEle,"click",this.navTitle,this),this.keyboardModule=new a.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.keyActionHandle=function(e){var t=this.getViewNumber(this.currentView()),i=this.tbodyEle.querySelector("tr td.e-focused-date"),a=this.tbodyEle.querySelector("tr td.e-selected"),s=this.getViewNumber(this.depth),r=t===s&&this.getViewNumber(this.start)>=s;switch(this.effect="",e.action){case"moveLeft":this.KeyboardNavigate(-1,t),e.preventDefault();break;case"moveRight":this.KeyboardNavigate(1,t),e.preventDefault();break;case"moveUp":0===t?this.KeyboardNavigate(-7,t):this.KeyboardNavigate(-4,t),e.preventDefault();break;case"moveDown":0===t?this.KeyboardNavigate(7,t):this.KeyboardNavigate(4,t),e.preventDefault();break;case"select":if(!h.isNullOrUndefined(i)||!h.isNullOrUndefined(a))if(r){var n=new Date(parseInt(""+(i||a).id,0));this.selectDate(e,this.resetTime(n),i||a)}else this.contentClick(null,--t,i||a);break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":h.isNullOrUndefined(i)&&(h.isNullOrUndefined(a)||r)||this.contentClick(null,--t,i||a),e.preventDefault();break;case"home":this.currentDate=this.firstDay(this.currentDate),o.remove(this.tbodyEle),this.renderMonths(),e.preventDefault();break;case"end":this.currentDate=this.lastDay(this.currentDate),o.remove(this.tbodyEle),this.renderMonths(),e.preventDefault();break;case"pageUp":this.addMonths(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"pageDown":this.addMonths(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageUp":this.addYears(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageDown":this.addYears(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"controlHome":this.navigateTo("month",new Date(this.currentDate.getFullYear(),0,1)),e.preventDefault();break;case"controlEnd":this.navigateTo("month",new Date(this.currentDate.getFullYear(),11,31)),e.preventDefault()}},t.prototype.KeyboardNavigate=function(e,t){var i=new Date(""+this.currentDate);switch(t){case 2:this.addYears(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderDecades()):this.currentDate=i;break;case 1:this.addMonths(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderYears()):this.currentDate=i;break;case 0:this.addDay(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderMonths()):this.currentDate=i}},t.prototype.preRender=function(){var e=this;this.changeHandler=function(t){e.triggerChange()},this.navigateHandler=function(t){e.triggerNavigate()}},t.prototype.renderMonths=function(){var e=[],t=this.resetTime(new Date(""+this.currentDate)),a=this.weekNumber?8:7,s=t.getMonth();this.titleUpdate(this.currentDate,"days");var r=t;for(t=new Date(r.getFullYear(),r.getMonth(),0,r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds());t.getDay()!==this.firstDayOfWeek;)this.setTime(t,-864e5);for(var n=0;n<42;++n){var h=o.createElement("td",{className:"e-cell"}),v=o.createElement("span");n%7==0&&this.weekNumber&&(v.textContent=""+this.getWeek(t),h.appendChild(v),o.addClass([h],"e-week-number"),e.push(h));var m=this.globalize.parseDate(this.globalize.formatDate(t,{skeleton:"full"}),{skeleton:"full"}),f=this.dayCell(t),g=this.globalize.formatDate(t,{type:"date",skeleton:"full"}),y=o.createElement("span");y.textContent=this.globalize.formatDate(t,{type:"date",skeleton:"d"});var D=this.min>t||this.max<t;D?(o.addClass([f],l),o.addClass([f],c)):y.setAttribute("title",""+g),s!==t.getMonth()&&o.addClass([f],d),0!==t.getDay()&&6!==t.getDay()||o.addClass([f],"e-weekend"),this.renderDaycellArg={date:t,isDisabled:!1,element:y,isOutOfRange:D};var b=this.renderDaycellArg;this.renderDayCellEvent(b),b.isDisabled&&this.value&&+this.resetTime(this.value)==+b.date&&this.setProperties({value:null},!0),this.renderDaycellArg.isDisabled&&!f.classList.contains(u)&&(o.addClass([f],l),o.addClass([f],c));var w=f.classList.contains(d),k=f.classList.contains(l);k||i.EventHandler.add(f,"click",this.clickHandler,this),b.isDisabled&&+this.value==+b.date&&this.setProperties({value:null},!0),w||k||!this.getDateVal(t)?this.currentDate.getDate()!==t.getDate()||w||k?(this.currentDate>=this.max&&parseInt(f.id,0)===+this.max&&!w&&!k&&o.addClass([f],p),this.currentDate<=this.min&&parseInt(f.id,0)===+this.min&&!w&&!k&&o.addClass([f],p)):o.addClass([f],p):o.addClass([f],u),this.resetTime(m).valueOf()===this.resetTime(new Date).valueOf()&&o.addClass([f],"e-today"),f.appendChild(this.renderDaycellArg.element),e.push(f),this.addDay(t,1)}this.contentHdr(),this.renderTemplate(e,a,"e-month")},t.prototype.renderYears=function(){this.removeTheadEle();var e=[],t=h.isNullOrUndefined(this.value),a=new Date(""+this.currentDate),s=a.getMonth(),r=a.getFullYear(),n=a,c=n.getFullYear(),d=new Date(""+this.min).getFullYear(),v=new Date(""+this.min).getMonth(),m=new Date(""+this.max).getFullYear(),f=new Date(""+this.max).getMonth();n.setMonth(0),this.titleUpdate(this.currentDate,"months");this.min>n||this.max;n.setDate(1);for(var g=0;g<12;++g){var y=this.dayCell(n),D=o.createElement("span"),b=this.value&&this.value.getMonth()===n.getMonth(),w=this.value&&this.value.getFullYear()===r&&b;D.textContent=this.globalize.formatDate(n,{type:"date",skeleton:"MMM"}),this.min&&(c<d||g<v&&c===d)||this.max&&(c>m||g>f&&c>=m)?o.addClass([y],l):!t&&w?o.addClass([y],u):n.getMonth()===s&&this.currentDate.getMonth()===s&&o.addClass([y],p),n.setDate(1),n.setMonth(n.getMonth()+1),y.classList.contains(l)||i.EventHandler.add(y,"click",this.clickHandler,this),y.appendChild(D),e.push(y)}this.renderTemplate(e,4,"e-year")},t.prototype.renderDecades=function(){this.removeTheadEle();var e=[],t=new Date(""+this.currentDate);t.setMonth(0),t.setDate(1);var a=t.getFullYear();this.hdrTitleEle.textContent=a-a%10+" - "+(a-a%10+9);for(var s=new Date(a-a%10-1,0,1),r=s.getFullYear(),n=0;n<12;++n){var c=r+n;t.setFullYear(c);var d=this.dayCell(t);o.attributes(d,{role:"gridcell"});var v=o.createElement("span");v.textContent=v.textContent=this.globalize.formatDate(t,{type:"date",skeleton:"y"}),c<new Date(""+this.min).getFullYear()||c>new Date(""+this.max).getFullYear()?o.addClass([d],l):h.isNullOrUndefined(this.value)||t.getFullYear()!==this.value.getFullYear()?t.getFullYear()!==this.currentDate.getFullYear()||d.classList.contains(l)||o.addClass([d],p):o.addClass([d],u),d.classList.contains(l)||i.EventHandler.add(d,"click",this.clickHandler,this),d.appendChild(v),e.push(d)}this.renderTemplate(e,4,"e-decade")},t.prototype.dayCell=function(e){var t=this.globalize.parseDate(this.globalize.formatDate(e,{skeleton:"full"}),{skeleton:"full"}),i=this.resetTime(t).valueOf(),a={className:"e-cell",attrs:{id:""+h.getUniqueID(""+i),"aria-selected":"false",role:"gridcell"}};return o.createElement("td",a)},t.prototype.firstDay=function(e){return new Date(e.getFullYear(),e.getMonth())},t.prototype.lastDay=function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.abs(t.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return i&&t.setHours(this.firstDay(e).getHours()+i/60),t},t.prototype.removeTheadEle=function(){h.isNullOrUndefined(this.element.querySelectorAll(".e-content table thead")[0])||o.remove(this.theadEle)},t.prototype.renderTemplate=function(e,t,i){var a,r=this.getViewNumber(this.currentView());this.tbodyEle=o.createElement("tbody"),this.table.appendChild(this.tbodyEle),o.removeClass([this.contentEle,this.headerEle],["e-month","e-decade","e-year"]),o.addClass([this.contentEle,this.headerEle],[i]);for(var n=t,l=0,c=0;c<e.length/t;++c){for(a=o.createElement("tr",{attrs:{role:"row"}}),l=0+l;l<n;l++)e[l].classList.contains("e-week-number")||h.isNullOrUndefined(e[l].children[0])||(o.addClass([e[l].children[0]],["e-day"]),s.isRippleEnabled&&o.addClass([e[l].children[0]],"e-ripple-style")),a.appendChild(e[l]),!this.weekNumber&&6===l&&e[6].classList.contains(d)&&o.addClass([a],"e-month-hide"),this.weekNumber?41===l&&e[41].classList.contains(d)&&o.addClass([a],"e-month-hide"):35===l&&e[35].classList.contains(d)&&o.addClass([a],"e-month-hide");n+=t,l+=0,this.tbodyEle.appendChild(a)}this.table.querySelector("tbody").className=this.effect,this.iconHandler(),this.changedArgs={value:this.value},(r!==this.getViewNumber(this.currentView())||0===r&&r!==this.getViewNumber(this.currentView()))&&this.navigateHandler(),this.setAriaActivedescendant(),this.changeHandler()},t.prototype.clickHandler=function(e){var t=e.currentTarget;e.preventDefault();var i=this.getViewNumber(this.currentView());t.classList.contains(d)?(this.value=this.getIdValue(e,null),this.contentClick(e,0,null)):i===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null):2===i?this.contentClick(e,1,null):t.classList.contains(d)||0!==i?this.contentClick(e,0,t):this.selectDate(e,this.getIdValue(e,null),null)},t.prototype.contentClick=function(e,t,i){var a=this.getViewNumber(this.currentView()),s=this.getIdValue(e,i);switch(t){case 0:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(o.remove(this.tbodyEle),this.currentDate=s,this.effect="e-zoomin",this.renderMonths()):(this.currentDate.setMonth(s.getMonth()),s.getMonth()>0&&this.currentDate.getMonth()!==s.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(s.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderMonths());break;case 1:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.selectDate(e,s,null):(this.currentDate.setFullYear(s.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderYears())}},t.prototype.switchView=function(e){switch(e){case 0:o.remove(this.tbodyEle),this.renderMonths();break;case 1:o.remove(this.tbodyEle),this.renderYears();break;case 2:o.remove(this.tbodyEle),this.renderDecades()}},t.prototype.getModuleName=function(){return"calendar"},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){this.effect="";for(var a=0,s=Object.keys(e);a<s.length;a++){switch(s[a]){case"value":isNaN(+this.value)&&this.setProperties({value:t.value},!0),this.validateDate(),this.minMaxUpdate(),this.setvalue();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl");break;case"weekNumber":case"firstDayOfWeek":this.contentHdr(),this.contentBody();break;case"min":case"max":this.setProperties({start:this.currentView()},!0),o.remove(this.tbodyEle),this.minMaxUpdate(),this.contentBody();break;case"locale":this.globalize=new i.Internationalization(this.locale),this.contentHdr(),this.contentBody()}}},t.prototype.setvalue=function(){this.tbodyEle.remove(),this.setProperties({start:this.currentView()},!0),this.contentBody()},t.prototype.titleUpdate=function(e,t){var a=new i.Internationalization(this.locale);switch(t){case"days":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"yMMMM"});break;case"months":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"y"})}},t.prototype.setActiveDescendant=function(){var e,t=this.tbodyEle.querySelector("tr td.e-focused-date"),i=this.tbodyEle.querySelector("tr td.e-selected"),a=this.globalize.formatDate(this.currentDate,{type:"date",skeleton:"full"});return(i||t)&&((t||i).setAttribute("aria-selected","true"),(t||i).setAttribute("aria-label","The current focused date is "+a),e=(t||i).getAttribute("id")),e},t.prototype.iconHandler=function(){switch(new Date(""+this.currentDate).setDate(1),this.currentView()){case"month":this.prevIconHandler(this.compareMonth(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareMonth(new Date(""+this.currentDate),this.max)>-1);break;case"year":this.prevIconHandler(this.compareYear(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareYear(new Date(""+this.currentDate),this.max)>-1);break;case"decade":this.prevIconHandler(this.compareDecade(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareDecade(new Date(""+this.currentDate),this.max)>-1)}},t.prototype.destroy=function(){this.element.classList.remove("e-calendar"),i.EventHandler.remove(this.hdrTitleEle,"click",this.navTitle),this.prevIconHandler(!0),this.nextIconHandler(!0),this.keyboardModule.destroy(),this.element.innerHTML="",e.prototype.destroy.call(this)},t.prototype.title=function(){var e=this.getViewNumber(this.currentView());this.effect="e-zoomin",this.switchView(++e)},t.prototype.getViewNumber=function(e){return"month"===e?0:"year"===e?1:2},t.prototype.navTitle=function(){this.title(),this.table.focus()},t.prototype.previous=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,-1),this.switchView(e);break;case"year":this.addYears(this.currentDate,-1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,-10),this.switchView(e)}},t.prototype.navPrev=function(){this.previous(),this.triggerNavigate(),this.table.focus()},t.prototype.next=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,1),this.switchView(e);break;case"year":this.addYears(this.currentDate,1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,10),this.switchView(e)}},t.prototype.navNext=function(){this.next(),this.triggerNavigate(),this.table.focus()},t.prototype.navigateTo=function(e,t){this.minMaxUpdate(),+t>=+this.min&&+t<=+this.max&&(this.currentDate=t),+t<=+this.min&&(this.currentDate=new Date(""+this.min)),+t>=+this.max&&(this.currentDate=new Date(""+this.max)),this.switchView(this.getViewNumber(e))},t.prototype.currentView=function(){return this.contentEle.classList.contains("e-year")?"year":this.contentEle.classList.contains("e-decade")?"decade":"month"},t.prototype.getDateVal=function(e){return!h.isNullOrUndefined(this.value)&&e.getDate()===this.value.getDate()&&e.getMonth()===this.value.getMonth()&&e.getFullYear()===this.value.getFullYear()},t.prototype.getCultureObjects=function(e,t){return h.getValue("main."+this.locale+".dates.calendars.gregorian.days.format.short",e)},t.prototype.getWeek=function(e){var t=new Date(""+e).valueOf(),i=new Date(e.getFullYear(),0,1).valueOf(),a=t-i;return Math.ceil((a/864e5+new Date(i).getDay()+1)/7)},t.prototype.setTime=function(e,t){var i=e.getTimezoneOffset(),a=new Date(e.getTime()+t),s=a.getTimezoneOffset()-i;e.setTime(a.getTime()+864e5*s)},t.prototype.addMonths=function(e,t){var i=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.addYears=function(e,t){var i=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.getIdValue=function(e,t){var i;i=e?e.currentTarget:t;var a=this.globalize.formatDate(new Date(parseInt(""+i.getAttribute("id"),0)),{skeleton:"full"});return this.resetTime(this.globalize.parseDate(a,{skeleton:"full",type:"date"}))},t.prototype.selectDate=function(e,t,i){var a=i||e.currentTarget;"decade"===this.currentView()?this.setDateDecade(this.currentDate,t.getFullYear()):"year"===this.currentView()?this.setDateYear(this.currentDate,t):(this.setProperties({value:new Date(""+t)},!0),this.currentDate=new Date(""+t)),h.isNullOrUndefined(this.tbodyEle.querySelector("."+u))||o.removeClass([this.tbodyEle.querySelector("."+u)],u),h.isNullOrUndefined(this.tbodyEle.querySelector("."+p))||o.removeClass([this.tbodyEle.querySelector("."+p)],p),o.addClass([a],u),this.changedArgs={value:this.value},this.changeHandler()},t.prototype.setAriaActivedescendant=function(){o.attributes(this.table,{"aria-activedescendant":""+this.setActiveDescendant()})},t.prototype.prevIconHandler=function(e){e?(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),o.addClass([this.prevIcon],""+l),o.addClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),i.EventHandler.add(this.prevIcon,"click",this.navPrev,this),o.removeClass([this.prevIcon],""+l),o.removeClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","false"))},t.prototype.renderDayCellEvent=function(e){h.extend(this.renderDaycellArg,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},t.prototype.navigatedEvent=function(){h.extend(this.navigatedArgs,{name:"navigated"}),this.trigger("navigated",this.navigatedArgs)},t.prototype.triggerNavigate=function(){this.navigatedArgs={view:this.currentView(),date:this.currentDate},this.navigatedEvent()},t.prototype.changeEvent=function(){this.trigger("change",this.changedArgs)},t.prototype.triggerChange=function(){h.extend(this.changedArgs,{name:"change"}),h.isNullOrUndefined(this.value)||this.setProperties({value:this.resetTime(this.value)},!0),+this.value!==Number.NaN&&+this.value!=+this.previousDate&&this.changeEvent(),this.previousDate=this.value},t.prototype.nextIconHandler=function(e){e?(i.EventHandler.remove(this.nextIcon,"click",this.navNext),o.addClass([this.nextIcon],l),o.addClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.nextIcon,"click",this.navNext),i.EventHandler.add(this.nextIcon,"click",this.navNext,this),o.removeClass([this.nextIcon],l),o.removeClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","false"))},t.prototype.compare=function(e,t,i){var a,s,r=t.getFullYear();return a=r,s=0,i&&(r-=r%i,a=r-r%i+i-1),e.getFullYear()>a?s=1:e.getFullYear()<r&&(s=-1),s},t.prototype.isMinMaxRange=function(e){return+e>=+this.min&&+e<=+this.max},t.prototype.compareYear=function(e,t){return this.compare(e,t,0)},t.prototype.compareDecade=function(e,t){return this.compare(e,t,10)},t.prototype.shiftArray=function(e,t){return e.slice(t).concat(e.slice(0,t))},t.prototype.resetTime=function(e){return e.setHours(0,0,0,0),e},t.prototype.addDay=function(e,t){e.setDate(e.getDate()+t)},t.prototype.getMaxDays=function(e){var t,i,a=new Date(""+e);for(t=28,i=a.getMonth();a.getMonth()===i;)++t,a.setDate(t);return t-1},t.prototype.setDateDecade=function(e,t){e.setFullYear(t),this.setProperties({value:new Date(""+e)},!0)},t.prototype.setDateYear=function(e,t){e.setFullYear(t.getFullYear(),t.getMonth(),e.getDate()),t.getMonth()!==e.getMonth()&&e.setDate(0),this.setProperties({value:new Date(""+e)},!0),this.currentDate=new Date(""+this.value)},t.prototype.compareMonth=function(e,t){return e.getFullYear()>t.getFullYear()?1:e.getFullYear()<t.getFullYear()?-1:e.getMonth()===t.getMonth()?0:e.getMonth()>t.getMonth()?1:-1},t}(i.Component);n([i.Property(null)],v.prototype,"value",void 0),n([i.Property(new Date(1900,0,1))],v.prototype,"min",void 0),n([i.Property(new Date(2099,11,31))],v.prototype,"max",void 0),n([i.Property(0)],v.prototype,"firstDayOfWeek",void 0),n([i.Property("month")],v.prototype,"start",void 0),n([i.Property("month")],v.prototype,"depth",void 0),n([i.Property(!1)],v.prototype,"weekNumber",void 0),n([i.Event()],v.prototype,"created",void 0),n([i.Event()],v.prototype,"destroyed",void 0),n([i.Event()],v.prototype,"change",void 0),n([i.Event()],v.prototype,"navigated",void 0),n([i.Event()],v.prototype,"renderDayCell",void 0),v=n([a.NotifyPropertyChanges],v),t.Calendar=v,t.calendarBuilder=i.CreateBuilder(v)}.apply(t,a))&&(e.exports=s)},function(t,i){t.exports=e}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-inputs"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-popups","@syncfusion/ej2-inputs"],t);else{var i="object"==typeof exports?t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-inputs")):t(e["@syncfusion/ej2-base"],e["@syncfusion/ej2-popups"],e["@syncfusion/ej2-inputs"]);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,function(e,t,i){return function(e){function t(a){if(i[a])return i[a].exports;var s=i[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var a,s;a=[i,t,i(1),i(4)],void 0!==(s=function(e,t,i,a){"use strict";function s(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),s(i),s(a)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s;a=[i,t,i(2)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),n=this&&this.__decorate||function(e,t,i,a){var s,r=arguments.length,n=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};a=[i,t,i(3),i(3),i(3),i(3),i(3)],void 0!==(s=function(e,t,i,a,s,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h="e-calendar",d="e-disabled",c="e-overlay",u="e-other-month",p="e-selected",v="e-focused-date",y=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.effect="",a.keyConfigs={controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end"},a}return r(t,e),t.prototype.render=function(){this.globalize=new i.Internationalization(this.locale),"calendar"===this.getModuleName()?(this.element.classList.add(h),this.enableRtl&&this.element.classList.add("e-rtl"),o.attributes(this.element,{"data-role":"calendar"})):(this.calendarElement=o.createElement("div"),this.calendarElement.classList.add(h),this.enableRtl&&this.calendarElement.classList.add("e-rtl"),o.attributes(this.calendarElement,{role:"calendar"})),this.processDate(),this.header(),this.content(),this.wireEvents()},t.prototype.processDate=function(){this.validateDate(),this.minMaxUpdate()},t.prototype.validateDate=function(){this.setProperties({value:new Date(""+this.value)},!0),this.currentDate=this.currentDate?this.currentDate:this.resetTime(new Date),!l.isNullOrUndefined(this.value)&&this.min<=this.max&&this.value>=this.min&&this.value<=this.max&&(this.currentDate=this.resetTime(new Date(""+this.value))),isNaN(+this.value)&&this.setProperties({value:null},!0)},t.prototype.minMaxUpdate=function(){this.min<=this.max?o.removeClass([this.element],c):(this.setProperties({min:this.min},!0),o.addClass([this.element],c)),this.min=l.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=l.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!l.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.resetTime(this.min)},!0),this.changedArgs={value:this.value}):!l.isNullOrUndefined(this.value)&&this.value>=this.max&&this.min<=this.max&&(this.setProperties({value:this.resetTime(this.max)},!0),this.changedArgs={value:this.value}),this.min<=this.max&&this.value&&this.value<=this.max&&this.value>=this.min?this.currentDate=new Date(""+this.value):this.min<=this.max&&!this.value&&this.currentDate>this.max?this.currentDate=new Date(""+this.max):this.currentDate<this.min&&(this.currentDate=new Date(""+this.min))},t.prototype.header=function(){var e={"aria-disabled":"false",role:"button","aria-label":"previous month"},t={"aria-disabled":"false",role:"button","aria-label":"next month"},i={"aria-atomic":"true","aria-live":"assertive","aria-label":"title",role:"button"};this.headerEle=o.createElement("div",{className:"e-header"});var a=o.createElement("div",{className:"e-icon-container"});this.prevIcon=o.createElement("a",{className:"e-prev"}),l.Browser.isIos||l.Browser.isIos7||l.Browser.isIE||s.rippleEffect(this.prevIcon,{duration:400,selector:".e-prev",isCenterRipple:!0}),o.attributes(this.prevIcon,e),this.nextIcon=o.createElement("a",{className:"e-next"}),l.Browser.isIos||l.Browser.isIos7||l.Browser.isIE||s.rippleEffect(this.nextIcon,{selector:".e-next",duration:400,isCenterRipple:!0}),o.attributes(this.nextIcon,t),this.hdrTitleEle=o.createElement("a",{className:"e-day e-title",attrs:{}}),o.attributes(this.hdrTitleEle,i),this.headerEle.appendChild(this.hdrTitleEle),this.prevIcon.appendChild(o.createElement("span",{className:"e-date-icon-prev e-icons"})),this.nextIcon.appendChild(o.createElement("span",{className:"e-date-icon-next e-icons"})),a.appendChild(this.prevIcon),a.appendChild(this.nextIcon),this.headerEle.appendChild(a),"calendar"===this.getModuleName()?this.element.appendChild(this.headerEle):this.calendarElement.appendChild(this.headerEle)},t.prototype.content=function(){this.previousDate=this.value,this.contentEle=o.createElement("div",{className:"e-content"}),this.table=o.createElement("table",{attrs:{tabIndex:"0",role:"grid","aria-activedescendant":""}}),"calendar"===this.getModuleName()?this.element.appendChild(this.contentEle):this.calendarElement.appendChild(this.contentEle),this.contentEle.appendChild(this.table),this.contentHdr(),this.contentBody()},t.prototype.getCultureValues=function(){var e,t=[];e="en"===this.locale||"en-US"===this.locale?l.getValue("days.stand-alone.short",s.getDefaultDateObject()):this.getCultureObjects(s.cldrData,""+this.locale);for(var i=0,a=Object.keys(e);i<a.length;i++){var r=a[i];t.push(l.getValue(r,e))}return t},t.prototype.contentHdr=function(){"calendar"===this.getModuleName()?l.isNullOrUndefined(this.element.querySelectorAll(".e-content .e-week-header")[0])||o.detach(this.element.querySelectorAll(".e-content .e-week-header")[0]):l.isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0])||o.detach(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0]);var e,t="";(this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:0},!0),this.theadEle=o.createElement("thead",{className:"e-week-header"}),this.weekNumber&&(t+='<th class="e-week-number"></th>'),e=this.shiftArray(this.getCultureValues().length>0&&this.getCultureValues(),this.firstDayOfWeek);for(var i=0;i<=6;i++)t+='<th class="">'+e[i]+"</th>";t="<tr>"+t+"</tr>",this.theadEle.innerHTML=t,this.table.appendChild(this.theadEle)},t.prototype.contentBody=function(){switch("calendar"===this.getModuleName()?l.isNullOrUndefined(this.element.querySelectorAll(".e-content tbody")[0])||o.detach(this.element.querySelectorAll(".e-content tbody")[0]):l.isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content tbody")[0])||o.detach(this.calendarElement.querySelectorAll(".e-content tbody")[0]),this.start){case"year":this.renderYears();break;case"decade":this.renderDecades();break;default:this.renderMonths()}},t.prototype.wireEvents=function(){i.EventHandler.add(this.hdrTitleEle,"click",this.navTitle,this),"calendar"===this.getModuleName()?this.keyboardModule=new a.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs}):this.keyboardModule=new a.KeyboardEvents(this.calendarElement,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.keyActionHandle=function(e){var t=this.getViewNumber(this.currentView()),i=this.tbodyEle.querySelector("tr td.e-focused-date"),a=this.tbodyEle.querySelector("tr td.e-selected"),s=this.getViewNumber(this.depth),r=t===s&&this.getViewNumber(this.start)>=s;switch(this.effect="",e.action){case"moveLeft":this.KeyboardNavigate(-1,t,e),e.preventDefault();break;case"moveRight":this.KeyboardNavigate(1,t,e),e.preventDefault();break;case"moveUp":0===t?this.KeyboardNavigate(-7,t,e):this.KeyboardNavigate(-4,t,e),e.preventDefault();break;case"moveDown":0===t?this.KeyboardNavigate(7,t,e):this.KeyboardNavigate(4,t,e),e.preventDefault();break;case"select":if(!l.isNullOrUndefined(i)||!l.isNullOrUndefined(a))if(r){var n=new Date(parseInt(""+(i||a).id,0));this.selectDate(e,this.resetTime(n),i||a)}else this.contentClick(null,--t,i||a);break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":l.isNullOrUndefined(i)&&(l.isNullOrUndefined(a)||r)||this.contentClick(null,--t,i||a),e.preventDefault();break;case"home":this.currentDate=this.firstDay(this.currentDate),o.detach(this.tbodyEle),this.renderMonths(e),e.preventDefault();break;case"end":this.currentDate=this.lastDay(this.currentDate),o.detach(this.tbodyEle),this.renderMonths(e),e.preventDefault();break;case"pageUp":this.addMonths(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"pageDown":this.addMonths(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageUp":this.addYears(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageDown":this.addYears(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"controlHome":this.navigateTo("month",new Date(this.currentDate.getFullYear(),0,1)),e.preventDefault();break;case"controlEnd":this.navigateTo("month",new Date(this.currentDate.getFullYear(),11,31)),e.preventDefault()}},t.prototype.KeyboardNavigate=function(e,t,i){var a=new Date(""+this.currentDate);switch(t){case 2:this.addYears(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.detach(this.tbodyEle),this.renderDecades(i)):this.currentDate=a;break;case 1:this.addMonths(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.detach(this.tbodyEle),this.renderYears(i)):this.currentDate=a;break;case 0:this.addDay(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.detach(this.tbodyEle),this.renderMonths(i)):this.currentDate=a}},t.prototype.preRender=function(){var e=this;this.changeHandler=function(t){e.triggerChange(t)},this.navigateHandler=function(t){e.triggerNavigate(t)}},t.prototype.renderMonths=function(e){var t=[],a=this.resetTime(new Date(""+this.currentDate)),s=this.weekNumber?8:7,r=a.getMonth();this.titleUpdate(this.currentDate,"days");var n=a;for(a=new Date(n.getFullYear(),n.getMonth(),0,n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds());a.getDay()!==this.firstDayOfWeek;)this.setTime(a,-864e5);for(var l=0;l<42;++l){var h=o.createElement("td",{className:"e-cell"}),y=o.createElement("span");l%7==0&&this.weekNumber&&(y.textContent=""+this.getWeek(a),h.appendChild(y),o.addClass([h],"e-week-number"),t.push(h));var f=this.globalize.parseDate(this.globalize.formatDate(a,{skeleton:"full"}),{skeleton:"full"}),m=this.dayCell(a),g=this.globalize.formatDate(a,{type:"date",skeleton:"full"}),b=o.createElement("span");b.textContent=this.globalize.formatDate(a,{type:"date",skeleton:"d"});var D=this.min>a||this.max<a;D?(o.addClass([m],d),o.addClass([m],c)):b.setAttribute("title",""+g),r!==a.getMonth()&&o.addClass([m],u),0!==a.getDay()&&6!==a.getDay()||o.addClass([m],"e-weekend"),this.renderDaycellArg={date:a,isDisabled:!1,element:b,isOutOfRange:D};var E=this.renderDaycellArg;this.renderDayCellEvent(E),E.isDisabled&&this.value&&+this.resetTime(this.value)==+E.date&&this.setProperties({value:null},!0),this.renderDaycellArg.isDisabled&&!m.classList.contains(p)&&(o.addClass([m],d),o.addClass([m],c));var w=m.classList.contains(u),C=m.classList.contains(d);C||i.EventHandler.add(m,"click",this.clickHandler,this),E.isDisabled&&+this.value==+E.date&&this.setProperties({value:null},!0),w||C||!this.getDateVal(a)?this.currentDate.getDate()!==a.getDate()||w||C?(this.currentDate>=this.max&&parseInt(m.id,0)===+this.max&&!w&&!C&&o.addClass([m],v),this.currentDate<=this.min&&parseInt(m.id,0)===+this.min&&!w&&!C&&o.addClass([m],v)):o.addClass([m],v):o.addClass([m],p),this.resetTime(f).valueOf()===this.resetTime(new Date).valueOf()&&o.addClass([m],"e-today"),m.appendChild(this.renderDaycellArg.element),t.push(m),this.addDay(a,1)}this.contentHdr(),this.renderTemplate(t,s,"e-month",e)},t.prototype.renderYears=function(e){this.removeTheadEle();var t=[],a=l.isNullOrUndefined(this.value),s=new Date(""+this.currentDate),r=s.getMonth(),n=s.getFullYear(),h=s,c=h.getFullYear(),u=new Date(""+this.min).getFullYear(),y=new Date(""+this.min).getMonth(),f=new Date(""+this.max).getFullYear(),m=new Date(""+this.max).getMonth();h.setMonth(0),this.titleUpdate(this.currentDate,"months");this.min>h||this.max;h.setDate(1);for(var g=0;g<12;++g){var b=this.dayCell(h),D=o.createElement("span"),E=this.value&&this.value.getMonth()===h.getMonth(),w=this.value&&this.value.getFullYear()===n&&E;D.textContent=this.globalize.formatDate(h,{type:"date",skeleton:"MMM"}),this.min&&(c<u||g<y&&c===u)||this.max&&(c>f||g>m&&c>=f)?o.addClass([b],d):!a&&w?o.addClass([b],p):h.getMonth()===r&&this.currentDate.getMonth()===r&&o.addClass([b],v),h.setDate(1),h.setMonth(h.getMonth()+1),b.classList.contains(d)||i.EventHandler.add(b,"click",this.clickHandler,this),b.appendChild(D),t.push(b)}this.renderTemplate(t,4,"e-year",e)},t.prototype.renderDecades=function(e){this.removeTheadEle();var t=[],a=new Date(""+this.currentDate);a.setMonth(0),a.setDate(1);var s=a.getFullYear(),r=new Date(""+(s-s%10)),n=new Date(""+(s-s%10+9)),h=this.globalize.formatDate(r,{type:"date",skeleton:"y"}),c=this.globalize.formatDate(n,{type:"date",skeleton:"y"});this.hdrTitleEle.textContent=h+" - "+c;for(var u=new Date(s-s%10-1,0,1),y=u.getFullYear(),f=0;f<12;++f){var m=y+f;a.setFullYear(m);var g=this.dayCell(a);o.attributes(g,{role:"gridcell"});var b=o.createElement("span");b.textContent=this.globalize.formatDate(a,{type:"date",skeleton:"y"}),m<new Date(""+this.min).getFullYear()||m>new Date(""+this.max).getFullYear()?o.addClass([g],d):l.isNullOrUndefined(this.value)||a.getFullYear()!==this.value.getFullYear()?a.getFullYear()!==this.currentDate.getFullYear()||g.classList.contains(d)||o.addClass([g],v):o.addClass([g],p),g.classList.contains(d)||i.EventHandler.add(g,"click",this.clickHandler,this),g.appendChild(b),t.push(g)}this.renderTemplate(t,4,"e-decade",e)},t.prototype.dayCell=function(e){var t=this.globalize.parseDate(this.globalize.formatDate(e,{skeleton:"full"}),{skeleton:"full"}),i=this.resetTime(t).valueOf(),a={className:"e-cell",attrs:{id:""+l.getUniqueID(""+i),"aria-selected":"false",role:"gridcell"}};return o.createElement("td",a)},t.prototype.firstDay=function(e){return new Date(e.getFullYear(),e.getMonth())},t.prototype.lastDay=function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.abs(t.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return i&&t.setHours(this.firstDay(e).getHours()+i/60),t},t.prototype.removeTheadEle=function(){"calendar"===this.getModuleName()?l.isNullOrUndefined(this.element.querySelectorAll(".e-content table thead")[0])||o.detach(this.theadEle):l.isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content table thead")[0])||o.detach(this.theadEle)},t.prototype.renderTemplate=function(e,t,i,a){var r,n=this.getViewNumber(this.currentView());this.tbodyEle=o.createElement("tbody"),this.table.appendChild(this.tbodyEle),o.removeClass([this.contentEle,this.headerEle],["e-month","e-decade","e-year"]),o.addClass([this.contentEle,this.headerEle],[i]);for(var h=t,d=0,c=0;c<e.length/t;++c){for(r=o.createElement("tr",{attrs:{role:"row"}}),d=0+d;d<h;d++)e[d].classList.contains("e-week-number")||l.isNullOrUndefined(e[d].children[0])||(o.addClass([e[d].children[0]],["e-day"]),s.rippleEffect(e[d].children[0],{duration:600,isCenterRipple:!0})),r.appendChild(e[d]),!this.weekNumber&&6===d&&e[6].classList.contains(u)&&o.addClass([r],"e-month-hide"),this.weekNumber?41===d&&e[41].classList.contains(u)&&o.addClass([r],"e-month-hide"):35===d&&e[35].classList.contains(u)&&o.addClass([r],"e-month-hide");h+=t,d+=0,this.tbodyEle.appendChild(r)}this.table.querySelector("tbody").className=this.effect,this.iconHandler(),this.changedArgs={value:this.value},(n!==this.getViewNumber(this.currentView())||0===n&&n!==this.getViewNumber(this.currentView()))&&this.navigateHandler(a),this.setAriaActivedescendant(),this.changeHandler()},t.prototype.clickHandler=function(e){var t=e.currentTarget;e.preventDefault();var i=this.getViewNumber(this.currentView());t.classList.contains(u)?(this.value=this.getIdValue(e,null),this.contentClick(e,0,null)):i===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null):2===i?this.contentClick(e,1,null):t.classList.contains(u)||0!==i?this.contentClick(e,0,t):this.selectDate(e,this.getIdValue(e,null),null)},t.prototype.contentClick=function(e,t,i){var a=this.getViewNumber(this.currentView()),s=this.getIdValue(e,i);switch(t){case 0:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(o.detach(this.tbodyEle),this.currentDate=s,this.effect="e-zoomin",this.renderMonths(e)):(this.currentDate.setMonth(s.getMonth()),s.getMonth()>0&&this.currentDate.getMonth()!==s.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(s.getFullYear()),this.effect="e-zoomin",o.detach(this.tbodyEle),this.renderMonths(e));break;case 1:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.selectDate(e,s,null):(this.currentDate.setFullYear(s.getFullYear()),this.effect="e-zoomin",o.detach(this.tbodyEle),this.renderYears(e))}},t.prototype.switchView=function(e,t){switch(e){case 0:o.detach(this.tbodyEle),this.renderMonths(t);break;case 1:o.detach(this.tbodyEle),this.renderYears(t);break;case 2:o.detach(this.tbodyEle),this.renderDecades(t)}},t.prototype.getModuleName=function(){return"calendar"},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){this.effect="";for(var a=0,s=Object.keys(e);a<s.length;a++){switch(s[a]){case"value":isNaN(+this.value)&&this.setProperties({value:t.value},!0),this.validateDate(),this.minMaxUpdate(),this.setvalue();break;case"enableRtl":e.enableRtl?"calendar"===this.getModuleName()?this.element.classList.add("e-rtl"):this.calendarElement.classList.add("e-rtl"):"calendar"===this.getModuleName()?this.element.classList.remove("e-rtl"):this.calendarElement.classList.remove("e-rtl");break;case"weekNumber":case"firstDayOfWeek":this.contentHdr(),this.contentBody();break;case"min":case"max":this.setProperties({start:this.currentView()},!0),o.detach(this.tbodyEle),this.minMaxUpdate(),this.contentBody();break;case"locale":this.globalize=new i.Internationalization(this.locale),this.contentHdr(),this.contentBody()}}},t.prototype.setvalue=function(){this.tbodyEle.remove(),this.setProperties({start:this.currentView()},!0),this.contentBody()},t.prototype.titleUpdate=function(e,t){var a=new i.Internationalization(this.locale);switch(t){case"days":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"yMMMM"});break;case"months":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"y"})}},t.prototype.setActiveDescendant=function(){var e,t=this.tbodyEle.querySelector("tr td.e-focused-date"),i=this.tbodyEle.querySelector("tr td.e-selected"),a=this.globalize.formatDate(this.currentDate,{type:"date",skeleton:"full"});return(i||t)&&((t||i).setAttribute("aria-selected","true"),(t||i).setAttribute("aria-label","The current focused date is "+a),e=(t||i).getAttribute("id")),e},t.prototype.iconHandler=function(){switch(new Date(""+this.currentDate).setDate(1),this.currentView()){case"month":this.prevIconHandler(this.compareMonth(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareMonth(new Date(""+this.currentDate),this.max)>-1);break;case"year":this.prevIconHandler(this.compareYear(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareYear(new Date(""+this.currentDate),this.max)>-1);break;case"decade":this.prevIconHandler(this.compareDecade(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareDecade(new Date(""+this.currentDate),this.max)>-1)}},t.prototype.destroy=function(){"calendar"===this.getModuleName()?this.element.classList.remove(h):this.calendarElement.classList.remove(h),i.EventHandler.remove(this.hdrTitleEle,"click",this.navTitle),this.prevIconHandler(!0),this.nextIconHandler(!0),this.keyboardModule.destroy(),this.element.innerHTML="",e.prototype.destroy.call(this)},t.prototype.title=function(e){var t=this.getViewNumber(this.currentView());this.effect="e-zoomin",this.switchView(++t,e)},t.prototype.getViewNumber=function(e){return"month"===e?0:"year"===e?1:2},t.prototype.navTitle=function(e){this.title(e),this.table.focus()},t.prototype.previous=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,-1),this.switchView(e);break;case"year":this.addYears(this.currentDate,-1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,-10),this.switchView(e)}},t.prototype.navPrev=function(e){this.previous(),this.triggerNavigate(e),this.table.focus()},t.prototype.next=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,1),this.switchView(e);break;case"year":this.addYears(this.currentDate,1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,10),this.switchView(e)}},t.prototype.navNext=function(e){this.next(),this.triggerNavigate(e),this.table.focus()},t.prototype.navigateTo=function(e,t){this.minMaxUpdate(),+t>=+this.min&&+t<=+this.max&&(this.currentDate=t),+t<=+this.min&&(this.currentDate=new Date(""+this.min)),+t>=+this.max&&(this.currentDate=new Date(""+this.max)),this.switchView(this.getViewNumber(e))},t.prototype.currentView=function(){return this.contentEle.classList.contains("e-year")?"year":this.contentEle.classList.contains("e-decade")?"decade":"month"},t.prototype.getDateVal=function(e){return!l.isNullOrUndefined(this.value)&&e.getDate()===this.value.getDate()&&e.getMonth()===this.value.getMonth()&&e.getFullYear()===this.value.getFullYear()},t.prototype.getCultureObjects=function(e,t){return l.getValue("main."+this.locale+".dates.calendars.gregorian.days.format.short",e)},t.prototype.getWeek=function(e){var t=new Date(""+e).valueOf(),i=new Date(e.getFullYear(),0,1).valueOf(),a=t-i;return Math.ceil((a/864e5+new Date(i).getDay()+1)/7)},t.prototype.setTime=function(e,t){var i=e.getTimezoneOffset(),a=new Date(e.getTime()+t),s=a.getTimezoneOffset()-i;e.setTime(a.getTime()+864e5*s)},t.prototype.addMonths=function(e,t){var i=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.addYears=function(e,t){var i=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.getIdValue=function(e,t){var i;i=e?e.currentTarget:t;var a=this.globalize.formatDate(new Date(parseInt(""+i.getAttribute("id"),0)),{skeleton:"full"});return this.resetTime(this.globalize.parseDate(a,{skeleton:"full",type:"date"}))},t.prototype.selectDate=function(e,t,i){var a=i||e.currentTarget;"decade"===this.currentView()?this.setDateDecade(this.currentDate,t.getFullYear()):"year"===this.currentView()?this.setDateYear(this.currentDate,t):(this.setProperties({value:new Date(""+t)},!0),this.currentDate=new Date(""+t)),l.isNullOrUndefined(this.tbodyEle.querySelector("."+p))||o.removeClass([this.tbodyEle.querySelector("."+p)],p),l.isNullOrUndefined(this.tbodyEle.querySelector("."+v))||o.removeClass([this.tbodyEle.querySelector("."+v)],v),o.addClass([a],p),this.changedArgs={value:this.value},this.changeHandler(e)},t.prototype.setAriaActivedescendant=function(){o.attributes(this.table,{"aria-activedescendant":""+this.setActiveDescendant()})},t.prototype.prevIconHandler=function(e){e?(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),o.addClass([this.prevIcon],""+d),o.addClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),i.EventHandler.add(this.prevIcon,"click",this.navPrev,this),o.removeClass([this.prevIcon],""+d),o.removeClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","false"))},t.prototype.renderDayCellEvent=function(e){l.extend(this.renderDaycellArg,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},t.prototype.navigatedEvent=function(e){l.extend(this.navigatedArgs,{name:"navigated",event:e}),this.trigger("navigated",this.navigatedArgs)},t.prototype.triggerNavigate=function(e){this.navigatedArgs={view:this.currentView(),date:this.currentDate},this.navigatedEvent(e)},t.prototype.changeEvent=function(e){this.trigger("change",this.changedArgs)},t.prototype.triggerChange=function(e){this.changedArgs.event=e,l.isNullOrUndefined(this.value)||this.setProperties({value:this.resetTime(this.value)},!0),+this.value!==Number.NaN&&+this.value!=+this.previousDate&&this.changeEvent(e),this.previousDate=this.value},t.prototype.nextIconHandler=function(e){e?(i.EventHandler.remove(this.nextIcon,"click",this.navNext),o.addClass([this.nextIcon],d),o.addClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.nextIcon,"click",this.navNext),i.EventHandler.add(this.nextIcon,"click",this.navNext,this),o.removeClass([this.nextIcon],d),o.removeClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","false"))},t.prototype.compare=function(e,t,i){var a,s,r=t.getFullYear();return a=r,s=0,i&&(r-=r%i,a=r-r%i+i-1),e.getFullYear()>a?s=1:e.getFullYear()<r&&(s=-1),s},t.prototype.isMinMaxRange=function(e){return+e>=+this.min&&+e<=+this.max},t.prototype.compareYear=function(e,t){return this.compare(e,t,0)},t.prototype.compareDecade=function(e,t){return this.compare(e,t,10)},t.prototype.shiftArray=function(e,t){return e.slice(t).concat(e.slice(0,t))},t.prototype.resetTime=function(e){return e.setHours(0,0,0,0),e},t.prototype.addDay=function(e,t){e.setDate(e.getDate()+t)},t.prototype.getMaxDays=function(e){var t,i,a=new Date(""+e);for(t=28,i=a.getMonth();a.getMonth()===i;)++t,a.setDate(t);return t-1},t.prototype.setDateDecade=function(e,t){e.setFullYear(t),this.setProperties({value:new Date(""+e)},!0)},t.prototype.setDateYear=function(e,t){e.setFullYear(t.getFullYear(),t.getMonth(),e.getDate()),t.getMonth()!==e.getMonth()&&e.setDate(0),this.setProperties({value:new Date(""+e)},!0),this.currentDate=new Date(""+this.value)},t.prototype.compareMonth=function(e,t){return e.getFullYear()>t.getFullYear()?1:e.getFullYear()<t.getFullYear()?-1:e.getMonth()===t.getMonth()?0:e.getMonth()>t.getMonth()?1:-1},t}(i.Component);n([i.Property(null)],y.prototype,"value",void 0),n([i.Property(new Date(1900,0,1))],y.prototype,"min",void 0),n([i.Property(new Date(2099,11,31))],y.prototype,"max",void 0),n([i.Property(0)],y.prototype,"firstDayOfWeek",void 0),n([i.Property("month")],y.prototype,"start",void 0),n([i.Property("month")],y.prototype,"depth",void 0),n([i.Property(!1)],y.prototype,"weekNumber",void 0),n([i.Event()],y.prototype,"created",void 0),n([i.Event()],y.prototype,"destroyed",void 0),n([i.Event()],y.prototype,"change",void 0),n([i.Event()],y.prototype,"navigated",void 0),n([i.Event()],y.prototype,"renderDayCell",void 0),y=n([a.NotifyPropertyChanges],y),t.Calendar=y,t.calendarBuilder=i.CreateBuilder(y)}.apply(t,a))&&(e.exports=s)},function(t,i){t.exports=e},function(e,t,i){var a,s;a=[i,t,i(5)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),n=this&&this.__decorate||function(e,t,i,a){var s,r=arguments.length,n=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};a=[i,t,i(3),i(3),i(3),i(3),i(6),i(7),i(2)],void 0!==(s=function(e,t,i,a,s,o,l,h,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-datepicker",u=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.previousEleValue="",a.isDateIconClicked=!1,a.keyConfigs={altUpArrow:"alt+uparrow",altDownArrow:"alt+downarrow",escape:"escape",enter:"enter",controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end",tab:"tab"},a.calendarKeyConfigs={escape:"escape",enter:"enter",tab:"tab"},a}return r(t,e),t.prototype.render=function(){this.initialize(),this.bindEvents()},t.prototype.initialize=function(){this.createInput(),this.updateInput(),this.previousEleValue=this.inputEle.value},t.prototype.createInput=function(){var e={"aria-live":"assertive","aria-atomic":"true","aria-haspopup":"true","aria-activedescendant":"null","aria-owns":this.inputEle.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off"},t={placeholder:null};this.globalize=new i.Internationalization(this.locale),this.l10n=new a.L10n("datepicker",t,this.locale),this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.inputWrapper=h.Input.createInput({element:this.inputEle,customTag:this.ngTag,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:this.cssClass,enabled:this.enabled,enableRtl:this.enableRtl},buttons:["e-input-group-icon e-date-icon e-icons"]}),this.setWidth(this.width),""!==this.inputEle.name?this.inputEle.setAttribute("name",""+this.inputEle.getAttribute("name")):this.inputEle.setAttribute("name",""+this.inputEle.id),s.attributes(this.inputEle,e),this.enabled||this.inputEle.setAttribute("aria-disabled","true"),h.Input.addAttributes({"aria-label":"select"},this.inputWrapper.buttons[0]),s.addClass([this.inputWrapper.container],"e-date-wrapper")},t.prototype.updateInput=function(){if(this.value&&!this.isCalendar()&&this.disabledDates(),+new Date(""+this.value)){var t={format:this.format,type:"date",skeleton:"yMd"},i=this.globalize.formatDate(this.value,t);this.setProperties({value:this.globalize.parseDate(i,t)},!0)}if(this.strictMode&&e.prototype.processDate.call(this),!o.isNullOrUndefined(this.value)){var a=this.resetTime(this.value),i=this.globalize.formatDate(this.value,{format:this.format,type:"date",skeleton:"yMd"});if(+a<=+this.max&&+a>=+this.min)h.Input.setValue(i,this.inputEle,this.floatLabelType,!1);else{var s=+a>=+this.max||!+this.value||+a<=+this.min||!+this.value;!this.strictMode&&s&&(h.Input.setValue(i,this.inputEle,this.floatLabelType,!1),this.setProperties({value:null},!0))}}o.isNullOrUndefined(this.value)&&this.strictMode&&h.Input.setValue("",this.inputEle,this.floatLabelType,!1),this.changedArgs={value:this.value},this.errorClass()},t.prototype.bindEvents=function(){this.enabled?(i.EventHandler.add(this.inputWrapper.buttons[0],"click",this.dateIconHandler,this),i.EventHandler.add(this.inputEle,"focus",this.inputFocusHandler,this),i.EventHandler.add(this.inputEle,"blur",this.inputBlurHandler,this),a.Browser.isAndroid||i.EventHandler.add(this.inputWrapper.buttons[0],"blur",this.iconBlurHandler,this)):(i.EventHandler.remove(this.inputWrapper.buttons[0],"click",this.dateIconHandler),i.EventHandler.remove(this.inputEle,"focus",this.inputFocusHandler),i.EventHandler.remove(this.inputEle,"blur",this.inputBlurHandler),a.Browser.isAndroid||i.EventHandler.remove(this.inputWrapper.buttons[0],"blur",this.iconBlurHandler)),this.keyboardModules=new a.KeyboardEvents(this.inputEle,{eventName:"keydown",keyAction:this.inputKeyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.dateIconHandler=function(){this.isCalendar()?this.hide():(this.isDateIconClicked=!0,this.show(),a.Browser.isDevice||this.addIconTabindex(),s.addClass(this.inputWrapper.buttons,"e-active"))},t.prototype.iconBlurHandler=function(){o.isNullOrUndefined(this.inputWrapper.container.children[1])||this.removeIconTabindex(),o.isNullOrUndefined(this.calendarKeyboardModules)||this.calendarKeyboardModules.destroy()},t.prototype.CalendarKeyActionHandle=function(e){switch(e.action){case"escape":this.isCalendar()?this.hide():(this.inputWrapper.container.children[1].blur(),this.iconBlurHandler());break;case"enter":this.isCalendar()?(this.addIconTabindex(),this.inputWrapper.container.children[1].focus()):this.show();break;case"tab":this.hide()}},t.prototype.inputFocusHandler=function(){this.isDateIconClicked=!1,this.trigger("focus")},t.prototype.inputBlurHandler=function(){this.strictModeUpdate(),this.updateInput(),this.changeTrigger(),this.errorClass(),this.isCalendar()&&document.activeElement===this.inputEle&&this.hide(),this.inputEle.blur(),this.trigger("blur"),this.isCalendar()&&(this.calendarKeyboardModules=new a.KeyboardEvents(this.calendarElement.children[1].firstElementChild,{eventName:"keydown",keyAction:this.CalendarKeyActionHandle.bind(this),keyConfigs:this.calendarKeyConfigs}))},t.prototype.documentHandler=function(e){var t=e.target;s.closest(t,".e-calendar")||s.closest(t,".e-input-group")===this.inputWrapper.container||(a.Browser.isDevice||this.iconBlurHandler(),this.hide())},t.prototype.removeIconTabindex=function(){this.inputWrapper.container.children[1].removeAttribute("tabindex")},t.prototype.addIconTabindex=function(){s.attributes(this.inputWrapper.container.children[1],{tabindex:"0"})},t.prototype.inputKeyActionHandle=function(t){switch(t.action){case"altUpArrow":this.hide(),this.inputEle.focus();break;case"altDownArrow":this.strictModeUpdate(),this.updateInput(),this.show();break;case"escape":this.hide();break;case"enter":this.strictModeUpdate(),this.updateInput(),this.changeTrigger(),this.errorClass(),this.isCalendar()||document.activeElement!==this.inputEle||this.hide();break;case"tab":this.strictModeUpdate(),this.updateInput(),this.changeTrigger(),this.errorClass(),this.hide();break;default:this.isCalendar()&&e.prototype.keyActionHandle.call(this,t)}},t.prototype.strictModeUpdate=function(){var e={format:this.format,type:"date",skeleton:"yMd"},t=this.globalize.parseDate(this.inputEle.value,e);this.strictMode&&t?(h.Input.setValue(this.globalize.formatDate(t,e),this.inputEle,this.floatLabelType,!1),this.setProperties({value:t},!0)):this.strictMode||this.setProperties({value:t},!0),this.strictMode&&!t&&""===this.inputEle.value&&this.setProperties({value:null},!0),isNaN(+this.value)&&this.setProperties({value:null},!0)},t.prototype.createCalendar=function(){var e=this;this.popupWrapper=s.createElement("div",{className:c+" e-popup-wrapper"}),document.body.appendChild(this.popupWrapper),a.Browser.isDevice&&(this.modal=s.createElement("div"),document.body.appendChild(this.modal)),this.calendarElement.querySelector("table tbody").className="",this.popupObj=new l.Popup(this.popupWrapper,{content:this.calendarElement,relateTo:a.Browser.isDevice?document.body:this.inputWrapper.container,position:a.Browser.isDevice?{X:"center",Y:"center"}:{X:"left",Y:"bottom"},offsetY:4,targetType:"container",enableRtl:this.enableRtl,collision:!a.Browser.isDevice&&{X:"flip",Y:"flip"},open:function(){document.activeElement===e.inputEle||a.Browser.isDevice||(e.calendarElement.children[1].firstElementChild.focus(),e.calendarKeyboardModules=new a.KeyboardEvents(e.calendarElement.children[1].firstElementChild,{eventName:"keydown",keyAction:e.CalendarKeyActionHandle.bind(e),keyConfigs:e.calendarKeyConfigs}),e.calendarKeyboardModules=new a.KeyboardEvents(e.inputWrapper.container.children[1],{eventName:"keydown",keyAction:e.CalendarKeyActionHandle.bind(e),keyConfigs:e.calendarKeyConfigs})),i.EventHandler.add(document,"mousedown touchstart",e.documentHandler,e)},close:function(){a.Browser.isDevice||(e.isDateIconClicked?(e.addIconTabindex(),e.inputWrapper.container.children[1].focus()):e.iconBlurHandler()),i.EventHandler.remove(document,"mousedown touchstart",e.documentHandler),e.value&&e.disabledDates(),e.popupObj.destroy(),s.detach(e.popupWrapper),e.popupObj=e.popupWrapper=null,e.setAriaAttributes()}}),this.setAriaAttributes(),a.Browser.isDevice&&(this.modal.className=c+" e-date-modal",document.body.className+=" e-date-overflow")},t.prototype.changeTrigger=function(){this.inputEle.value!==this.previousEleValue&&(this.previousDate&&this.previousDate.valueOf())!==(this.value&&this.value.valueOf())&&(this.changedArgs.value=this.value,this.previousDate=this.value,this.trigger("change",this.changedArgs),this.previousEleValue=this.inputEle.value)},t.prototype.navigatedEvent=function(){this.trigger("navigated",this.navigatedArgs)},t.prototype.changeEvent=function(e){this.selectCalendar(e),this.trigger("change",this.changedArgs),this.previousDate=this.value},t.prototype.selectCalendar=function(e){var t;this.value&&(t=this.globalize.formatDate(this.changedArgs.value,{format:this.format,type:"date",skeleton:"yMd"})),h.Input.setValue(t,this.inputEle,this.floatLabelType,!1),this.hide(),this.previousEleValue=this.inputEle.value,this.errorClass()},t.prototype.isCalendar=function(){return!(!this.popupWrapper||!this.popupWrapper.classList.contains("e-popup-wrapper"))},t.prototype.setWidth=function(e){this.inputWrapper.container.style.width="number"==typeof e?e+"px":"string"==typeof e?e:this.inputWrapper.container.offsetWidth+"px"},t.prototype.show=function(){var t={popupElement:this.popupObj},i=!0;if(this.isCalendar()||(e.prototype.render.call(this),this.createCalendar()),this.preventArgs={preventDefault:function(){i=!1}},o.merge(t,this.preventArgs),this.trigger("open",t),i){s.addClass(this.inputWrapper.buttons,"e-active"),document.body.appendChild(this.popupObj.element),this.popupObj.refreshPosition();var r={name:"FadeIn",duration:a.Browser.isDevice?0:300};this.popupObj.show(new a.Animation(r)),this.setAriaAttributes(),a.Browser.isDevice&&(this.modal.style.display="block")}else s.detach(this.popupWrapper),this.popupObj.destroy(),this.popupWrapper=this.popupObj=null},t.prototype.hide=function(){var e={popupElement:this.popupObj};this.preventArgs={preventDefault:function(){t=!1}};var t=!0;if(s.removeClass([document.body],"e-date-overflow"),o.merge(e,this.preventArgs),this.trigger("close",e),this.isCalendar()&&t){this.popupObj.hide(),this.keyboardModule.destroy(),s.removeClass(this.inputWrapper.buttons,"e-active")}this.setAriaAttributes(),this.previousEleValue=this.inputEle.value,a.Browser.isDevice&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},t.prototype.focusIn=function(){this.inputEle.focus(),s.addClass([this.inputWrapper.container],["e-input-focus"]),this.trigger("focus")},t.prototype.focusOut=function(){this.inputEle.blur(),s.removeClass([this.inputWrapper.container],["e-input-focus"]),this.trigger("blur")},t.prototype.currentView=function(){var t;return this.calendarElement&&(t=e.prototype.currentView.call(this)),t},t.prototype.navigateTo=function(t,i){this.calendarElement&&e.prototype.navigateTo.call(this,t,i)},t.prototype.destroy=function(){this.popupObj&&this.popupObj.element.classList.contains("e-popup")&&e.prototype.destroy.call(this);var t={"aria-live":"assertive","aria-atomic":"true","aria-haspopup":"true","aria-activedescendant":"null","aria-owns":this.inputEle.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off"};h.Input.removeAttributes(t,this.inputEle),this.isCalendar()&&(s.detach(this.popupWrapper),this.popupObj=this.popupWrapper=null,this.keyboardModule.destroy()),i.EventHandler.remove(this.inputEle,"blur",this.inputBlurHandler),i.EventHandler.remove(this.inputEle,"focus",this.inputFocusHandler),this.inputWrapper.container.parentElement.appendChild(this.inputEleCopy),s.removeClass([this.inputEle],[c,"e-rtl"]),s.removeClass([this.inputWrapper.container],"e-date-wrapper"),s.detach(this.inputWrapper.container)},t.prototype.preRender=function(){this.inputEleCopy=this.element,this.inputEle=this.element;var t=o.getValue("ej2_instances",this.element);if(this.ngTag=null,"EJ-DATEPICKER"===this.element.tagName){this.ngTag=this.element.tagName;var i=s.createElement("input");this.element.parentNode.appendChild(i),this.element.parentNode.removeChild(this.element),this.inputEle=i,o.setValue("ej2_instances",t,this.inputEle)}this.element.getAttribute("id")?this.inputEle.id=this.element.getAttribute("id"):(this.inputEle.id=o.getUniqueID("ej2-datepicker"),s.attributes(this.element,{id:this.inputEle.id})),this.checkHtmlAttributes(),e.prototype.preRender.call(this)},t.prototype.checkHtmlAttributes=function(){this.globalize=new i.Internationalization(this.locale);for(var e=["value","min","max","disabled","readonly","style","name","placeholder"],t=0,a=e;t<a.length;t++){var s=a[t];if(!o.isNullOrUndefined(this.inputEle.getAttribute(s)))switch(s){case"disabled":var r="disabled"===this.inputEle.getAttribute(s)||""===this.inputEle.getAttribute(s);this.setProperties({enabled:r},!0),r||this.inputEle.setAttribute("aria-disabled","true");break;case"readonly":var n="readonly"===this.inputEle.getAttribute(s)||""===this.inputEle.getAttribute(s);this.setProperties({readonly:n},!0);break;case"placeholder":if(null===this.placeholder){this.inputEle.getAttribute(s);this.setProperties({placeholder:this.inputEle.getAttribute(s)},!0)}break;case"style":this.inputEle.setAttribute("style",""+this.inputEle.getAttribute(s));break;case"name":this.inputEle.setAttribute("name",""+this.inputEle.getAttribute(s));break;case"value":this.value||this.setProperties(o.setValue(s,this.globalize.parseDate(this.inputEle.getAttribute(s)),{}),!0);break;case"min":+this.min==+new Date(1900,0,1)&&this.setProperties(o.setValue(s,this.globalize.parseDate(this.inputEle.getAttribute(s)),{}),!0);break;case"max":+this.max==+new Date(2099,11,31)&&this.setProperties(o.setValue(s,this.globalize.parseDate(this.inputEle.getAttribute(s)),{}),!0)}}},t.prototype.getModuleName=function(){return"datepicker"},t.prototype.disabledDates=function(){var t=new Date(""+this.value),i=this.previousDate;e.prototype.render.call(this),this.previousDate=i;var a=t&&+this.resetTime(t),s='*[id^="/id"]'.replace("/id",""+a);this.strictMode||this.setProperties({value:t},!0),o.isNullOrUndefined(this.calendarElement.querySelectorAll(s)[0])||this.calendarElement.querySelectorAll(s)[0].classList.contains("e-disabled")&&this.setProperties({value:null},!0);var r=this.globalize.formatDate(t,{format:this.format,type:"date",skeleton:"yMd"});h.Input.setValue(r,this.inputEle,this.floatLabelType,!1)},t.prototype.setAriaAttributes=function(){this.isCalendar()?(h.Input.addAttributes({"aria-expanded":"true"},this.inputEle),s.attributes(this.inputEle,{"aria-activedescendant":""+this.setActiveDescendant()})):(h.Input.addAttributes({"aria-expanded":"false"},this.inputEle),s.attributes(this.inputEle,{"aria-activedescendant":"null"}))},t.prototype.errorClass=function(){o.isNullOrUndefined(this.value)&&!this.strictMode&&""!==this.inputEle.value?s.addClass([this.inputWrapper.container],"e-error"):s.removeClass([this.inputWrapper.container],"e-error")},t.prototype.onPropertyChanged=function(t,a){for(var s=0,r=Object.keys(t);s<r.length;s++){switch(r[s]){case"value":this.previousEleValue=this.inputEle.value,o.isNullOrUndefined(this.value)&&h.Input.setValue("",this.inputEle,this.floatLabelType,!1),this.updateInput(),this.changeTrigger();break;case"format":this.updateInput();break;case"placeholder":h.Input.setPlaceholder(this.placeholder,this.inputEle);break;case"readonly":h.Input.setReadonly(this.readonly,this.inputEle);break;case"enabled":h.Input.setEnabled(this.enabled,this.inputEle),this.bindEvents();break;case"locale":this.globalize=new i.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),h.Input.setPlaceholder(this.placeholder,this.inputEle),this.updateInput();break;case"enableRtl":h.Input.setEnableRtl(this.enableRtl,[this.inputWrapper.container]);break;case"cssClass":h.Input.setCssClass(t.cssClass,[this.inputWrapper.container]);break;case"strictMode":this.updateInput();break;case"width":this.setWidth(t.width);break;default:this.calendarElement&&e.prototype.onPropertyChanged.call(this,t,a)}this.hide()}},t}(d.Calendar);n([i.Property(null)],u.prototype,"width",void 0),n([i.Property(null)],u.prototype,"cssClass",void 0),n([i.Property(!1)],u.prototype,"strictMode",void 0),n([i.Property(null)],u.prototype,"format",void 0),n([i.Property(!0)],u.prototype,"enabled",void 0),n([i.Property(!1)],u.prototype,"readonly",void 0),n([i.Property(null)],u.prototype,"placeholder",void 0),n([i.Property("Never")],u.prototype,"floatLabelType",void 0),n([a.Event()],u.prototype,"open",void 0),n([a.Event()],u.prototype,"close",void 0),n([a.Event()],u.prototype,"blur",void 0),n([a.Event()],u.prototype,"focus",void 0),n([a.Event()],u.prototype,"created",void 0),n([a.Event()],u.prototype,"destroyed",void 0),u=n([i.NotifyPropertyChanges],u),t.DatePicker=u,t.datepickerBuilder=i.CreateBuilder(u)}.apply(t,a))&&(e.exports=s)},function(e,i){e.exports=t},function(e,t){e.exports=i}])});

@@ -19,5 +19,5 @@ var __extends = (this && this.__extends) || (function () {

import { NotifyPropertyChanges, KeyboardEvents } from '@syncfusion/ej2-base';
import { cldrData, getDefaultDateObject, isRippleEnabled } from '@syncfusion/ej2-base';
import { createElement, removeClass, remove, addClass, attributes } from '@syncfusion/ej2-base';
import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base';
import { cldrData, getDefaultDateObject, rippleEffect } from '@syncfusion/ej2-base';
import { createElement, removeClass, detach, addClass, attributes } from '@syncfusion/ej2-base';
import { isNullOrUndefined, getValue, getUniqueID, extend, Browser } from '@syncfusion/ej2-base';
var ROOT = 'e-calendar';

@@ -34,4 +34,4 @@ var HEADER = 'e-header';

var RIPPLESTYLE = 'e-ripple-style';
var PREVSPAN = 'e-icon-prev';
var NEXTSPAN = 'e-icon-next ';
var PREVSPAN = 'e-date-icon-prev';
var NEXTSPAN = 'e-date-icon-next ';
var ICONCONTAINER = 'e-icon-container';

@@ -78,9 +78,21 @@ var DISABLED = 'e-disabled';

this.globalize = new Internationalization(this.locale);
this.element.classList.add(ROOT);
if (this.enableRtl) {
this.element.classList.add(RTL);
if (this.getModuleName() === 'calendar') {
this.element.classList.add(ROOT);
if (this.enableRtl) {
this.element.classList.add(RTL);
}
attributes(this.element, {
'data-role': 'calendar'
});
}
attributes(this.element, {
'data-role': 'calendar'
});
else {
this.calendarElement = createElement('div');
this.calendarElement.classList.add(ROOT);
if (this.enableRtl) {
this.calendarElement.classList.add(RTL);
}
attributes(this.calendarElement, {
'role': 'calendar'
});
}
this.processDate();

@@ -156,9 +168,17 @@ this.header();

this.prevIcon = createElement('a', { className: '' + PREVICON });
if (isRippleEnabled) {
this.prevIcon.classList.add(RIPPLESTYLE);
if (!Browser.isIos && !Browser.isIos7 && !Browser.isIE) {
rippleEffect(this.prevIcon, {
duration: 400,
selector: '.e-prev',
isCenterRipple: true
});
}
attributes(this.prevIcon, ariaPrevAttrs);
this.nextIcon = createElement('a', { className: '' + NEXTICON });
if (isRippleEnabled) {
this.nextIcon.classList.add(RIPPLESTYLE);
if (!Browser.isIos && !Browser.isIos7 && !Browser.isIE) {
rippleEffect(this.nextIcon, {
selector: '.e-next',
duration: 400,
isCenterRipple: true
});
}

@@ -174,3 +194,8 @@ attributes(this.nextIcon, ariaNextAttrs);

this.headerEle.appendChild(iconContainer);
this.element.appendChild(this.headerEle);
if (this.getModuleName() === 'calendar') {
this.element.appendChild(this.headerEle);
}
else {
this.calendarElement.appendChild(this.headerEle);
}
};

@@ -181,3 +206,8 @@ Calendar.prototype.content = function () {

this.table = createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '' } });
this.element.appendChild(this.contentEle);
if (this.getModuleName() === 'calendar') {
this.element.appendChild(this.contentEle);
}
else {
this.calendarElement.appendChild(this.contentEle);
}
this.contentEle.appendChild(this.table);

@@ -203,5 +233,12 @@ this.contentHdr();

Calendar.prototype.contentHdr = function () {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);
if (this.getModuleName() === 'calendar') {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
detach(this.element.querySelectorAll('.e-content .e-week-header')[0]);
}
}
else {
if (!isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0])) {
detach(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0]);
}
}
var daysCount = 6;

@@ -226,5 +263,12 @@ var html = '';

Calendar.prototype.contentBody = function () {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {
remove(this.element.querySelectorAll('.e-content tbody')[0]);
if (this.getModuleName() === 'calendar') {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {
detach(this.element.querySelectorAll('.e-content tbody')[0]);
}
}
else {
if (!isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content tbody')[0])) {
detach(this.calendarElement.querySelectorAll('.e-content tbody')[0]);
}
}
switch (this.start) {

@@ -243,7 +287,16 @@ case 'year':

EventHandler.add(this.hdrTitleEle, 'click', this.navTitle, this);
this.keyboardModule = new KeyboardEvents(this.element, {
eventName: 'keydown',
keyAction: this.keyActionHandle.bind(this),
keyConfigs: this.keyConfigs
});
if (this.getModuleName() === 'calendar') {
this.keyboardModule = new KeyboardEvents(this.element, {
eventName: 'keydown',
keyAction: this.keyActionHandle.bind(this),
keyConfigs: this.keyConfigs
});
}
else {
this.keyboardModule = new KeyboardEvents(this.calendarElement, {
eventName: 'keydown',
keyAction: this.keyActionHandle.bind(this),
keyConfigs: this.keyConfigs
});
}
};

@@ -259,7 +312,7 @@ Calendar.prototype.keyActionHandle = function (e) {

case 'moveLeft':
this.KeyboardNavigate(-1, view);
this.KeyboardNavigate(-1, view, e);
e.preventDefault();
break;
case 'moveRight':
this.KeyboardNavigate(1, view);
this.KeyboardNavigate(1, view, e);
e.preventDefault();

@@ -269,6 +322,6 @@ break;

if (view === 0) {
this.KeyboardNavigate(-7, view);
this.KeyboardNavigate(-7, view, e);
}
else {
this.KeyboardNavigate(-4, view);
this.KeyboardNavigate(-4, view, e);
}

@@ -279,6 +332,6 @@ e.preventDefault();

if (view === 0) {
this.KeyboardNavigate(7, view);
this.KeyboardNavigate(7, view, e);
}
else {
this.KeyboardNavigate(4, view);
this.KeyboardNavigate(4, view, e);
}

@@ -310,4 +363,4 @@ e.preventDefault();

this.currentDate = this.firstDay(this.currentDate);
remove(this.tbodyEle);
this.renderMonths();
detach(this.tbodyEle);
this.renderMonths(e);
e.preventDefault();

@@ -317,4 +370,4 @@ break;

this.currentDate = this.lastDay(this.currentDate);
remove(this.tbodyEle);
this.renderMonths();
detach(this.tbodyEle);
this.renderMonths(e);
e.preventDefault();

@@ -352,3 +405,3 @@ break;

};
Calendar.prototype.KeyboardNavigate = function (num, currentView) {
Calendar.prototype.KeyboardNavigate = function (num, currentView, e) {
var date = new Date('' + this.currentDate);

@@ -359,4 +412,4 @@ switch (currentView) {

if (this.isMinMaxRange(this.currentDate)) {
remove(this.tbodyEle);
this.renderDecades();
detach(this.tbodyEle);
this.renderDecades(e);
}

@@ -370,4 +423,4 @@ else {

if (this.isMinMaxRange(this.currentDate)) {
remove(this.tbodyEle);
this.renderYears();
detach(this.tbodyEle);
this.renderYears(e);
}

@@ -381,4 +434,4 @@ else {

if (this.isMinMaxRange(this.currentDate)) {
remove(this.tbodyEle);
this.renderMonths();
detach(this.tbodyEle);
this.renderMonths(e);
}

@@ -394,10 +447,10 @@ else {

this.changeHandler = function (e) {
_this.triggerChange();
_this.triggerChange(e);
};
this.navigateHandler = function (e) {
_this.triggerNavigate();
_this.triggerNavigate(e);
};
};
;
Calendar.prototype.renderMonths = function () {
Calendar.prototype.renderMonths = function (e) {
var tdEles = [];

@@ -491,5 +544,5 @@ var cellsCount = 42;

this.contentHdr();
this.renderTemplate(tdEles, numCells, MONTH);
this.renderTemplate(tdEles, numCells, MONTH, e);
};
Calendar.prototype.renderYears = function () {
Calendar.prototype.renderYears = function (e) {
this.removeTheadEle();

@@ -538,5 +591,5 @@ var numCells = 4;

}
this.renderTemplate(tdEles, numCells, YEAR);
this.renderTemplate(tdEles, numCells, YEAR, e);
};
Calendar.prototype.renderDecades = function () {
Calendar.prototype.renderDecades = function (e) {
this.removeTheadEle();

@@ -550,3 +603,7 @@ var numCells = 4;

var localYr = localDate.getFullYear();
this.hdrTitleEle.textContent = (localYr - localYr % 10) + ' - ' + (localYr - localYr % 10 + (10 - 1));
var startYr = new Date('' + (localYr - localYr % 10));
var endYr = new Date('' + (localYr - localYr % 10 + (10 - 1)));
var startHdrYr = this.globalize.formatDate(startYr, { type: 'date', skeleton: 'y' });
var endHdrYr = this.globalize.formatDate(endYr, { type: 'date', skeleton: 'y' });
this.hdrTitleEle.textContent = startHdrYr + ' - ' + (endHdrYr);
var start = new Date(localYr - (localYr % 10) - 1, 0, 1);

@@ -560,3 +617,3 @@ var startYear = start.getFullYear();

var dayLink = createElement('span');
dayLink.textContent = dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'y' });
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'y' });
if (year < new Date('' + this.min).getFullYear() || year > new Date('' + this.max).getFullYear()) {

@@ -579,3 +636,3 @@ addClass([tdEle], DISABLED);

}
this.renderTemplate(tdEles, numCells, 'e-decade');
this.renderTemplate(tdEles, numCells, 'e-decade', e);
};

@@ -603,7 +660,14 @@ Calendar.prototype.dayCell = function (localDate) {

Calendar.prototype.removeTheadEle = function () {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {
remove(this.theadEle);
if (this.getModuleName() === 'calendar') {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {
detach(this.theadEle);
}
}
else {
if (!isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content table thead')[0])) {
detach(this.theadEle);
}
}
};
Calendar.prototype.renderTemplate = function (elements, numCells, classNm) {
Calendar.prototype.renderTemplate = function (elements, numCells, classNm, e) {
var view = this.getViewNumber(this.currentView());

@@ -625,5 +689,6 @@ var trEle;

addClass([elements[rowIterator].children[0]], [LINK]);
if (isRippleEnabled) {
addClass([elements[rowIterator].children[0]], RIPPLESTYLE);
}
rippleEffect(elements[rowIterator].children[0], {
duration: 600,
isCenterRipple: true
});
}

@@ -653,3 +718,3 @@ trEle.appendChild(elements[rowIterator]);

if (view !== this.getViewNumber(this.currentView()) || (view === 0 && view !== this.getViewNumber(this.currentView()))) {
this.navigateHandler();
this.navigateHandler(e);
}

@@ -686,6 +751,6 @@ this.setAriaActivedescendant();

if (currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {
remove(this.tbodyEle);
detach(this.tbodyEle);
this.currentDate = d;
this.effect = ZOOMIN;
this.renderMonths();
this.renderMonths(e);
}

@@ -699,4 +764,4 @@ else {

this.effect = ZOOMIN;
remove(this.tbodyEle);
this.renderMonths();
detach(this.tbodyEle);
this.renderMonths(e);
}

@@ -711,20 +776,20 @@ break;

this.effect = ZOOMIN;
remove(this.tbodyEle);
this.renderYears();
detach(this.tbodyEle);
this.renderYears(e);
}
}
};
Calendar.prototype.switchView = function (view) {
Calendar.prototype.switchView = function (view, e) {
switch (view) {
case 0:
remove(this.tbodyEle);
this.renderMonths();
detach(this.tbodyEle);
this.renderMonths(e);
break;
case 1:
remove(this.tbodyEle);
this.renderYears();
detach(this.tbodyEle);
this.renderYears(e);
break;
case 2:
remove(this.tbodyEle);
this.renderDecades();
detach(this.tbodyEle);
this.renderDecades(e);
}

@@ -754,6 +819,16 @@ };

if (newProp.enableRtl) {
this.element.classList.add('e-rtl');
if (this.getModuleName() === 'calendar') {
this.element.classList.add('e-rtl');
}
else {
this.calendarElement.classList.add('e-rtl');
}
}
else {
this.element.classList.remove('e-rtl');
if (this.getModuleName() === 'calendar') {
this.element.classList.remove('e-rtl');
}
else {
this.calendarElement.classList.remove('e-rtl');
}
}

@@ -769,3 +844,3 @@ break;

this.setProperties({ start: this.currentView() }, true);
remove(this.tbodyEle);
detach(this.tbodyEle);
this.minMaxUpdate();

@@ -826,3 +901,8 @@ this.contentBody();

Calendar.prototype.destroy = function () {
this.element.classList.remove(ROOT);
if (this.getModuleName() === 'calendar') {
this.element.classList.remove(ROOT);
}
else {
this.calendarElement.classList.remove(ROOT);
}
EventHandler.remove(this.hdrTitleEle, 'click', this.navTitle);

@@ -835,6 +915,6 @@ this.prevIconHandler(true);

};
Calendar.prototype.title = function () {
Calendar.prototype.title = function (e) {
var currentView = this.getViewNumber(this.currentView());
this.effect = ZOOMIN;
this.switchView(++currentView);
this.switchView(++currentView, e);
};

@@ -852,4 +932,4 @@ Calendar.prototype.getViewNumber = function (stringVal) {

};
Calendar.prototype.navTitle = function () {
this.title();
Calendar.prototype.navTitle = function (e) {
this.title(e);
this.table.focus();

@@ -875,5 +955,5 @@ };

};
Calendar.prototype.navPrev = function () {
Calendar.prototype.navPrev = function (e) {
this.previous();
this.triggerNavigate();
this.triggerNavigate(e);
this.table.focus();

@@ -899,5 +979,5 @@ };

};
Calendar.prototype.navNext = function () {
Calendar.prototype.navNext = function (eve) {
this.next();
this.triggerNavigate();
this.triggerNavigate(eve);
this.table.focus();

@@ -992,3 +1072,3 @@ };

this.changedArgs = { value: this.value };
this.changeHandler();
this.changeHandler(e);
};

@@ -1019,15 +1099,15 @@ Calendar.prototype.setAriaActivedescendant = function () {

};
Calendar.prototype.navigatedEvent = function () {
extend(this.navigatedArgs, { name: 'navigated' });
Calendar.prototype.navigatedEvent = function (eve) {
extend(this.navigatedArgs, { name: 'navigated', event: eve });
this.trigger('navigated', this.navigatedArgs);
};
Calendar.prototype.triggerNavigate = function () {
Calendar.prototype.triggerNavigate = function (event) {
this.navigatedArgs = { view: this.currentView(), date: this.currentDate };
this.navigatedEvent();
this.navigatedEvent(event);
};
Calendar.prototype.changeEvent = function () {
Calendar.prototype.changeEvent = function (e) {
this.trigger('change', this.changedArgs);
};
Calendar.prototype.triggerChange = function () {
extend(this.changedArgs, { name: 'change' });
Calendar.prototype.triggerChange = function (e) {
this.changedArgs.event = e;
if (!isNullOrUndefined(this.value)) {

@@ -1037,3 +1117,3 @@ this.setProperties({ value: this.resetTime(this.value) }, true);

if (+this.value !== Number.NaN && +this.value !== +this.previousDate) {
this.changeEvent();
this.changeEvent(e);
}

@@ -1040,0 +1120,0 @@ this.previousDate = this.value;

export * from './calendar/index';
export * from './datepicker/index';
{
"name": "@syncfusion/ej2-calendars",
"version": "1.0.16",
"version": "1.0.18",
"description": "Essential JS 2 Calendar Components",

@@ -9,3 +9,5 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "^1.0.16",
"@syncfusion/ej2-base": "^1.0.18",
"@syncfusion/ej2-popups": "^1.0.17",
"@syncfusion/ej2-inputs": "^1.0.18",
"intl": "^1.2.5"

@@ -12,0 +14,0 @@ },

@@ -7,4 +7,6 @@ # Calendar

[Demo](http://ej2.syncfusion.com/demos/#/calendar/default.html)
[Documentation](http://ej2.syncfusion.com/documentation/calendar)
[Calendar Demo](http://ej2.syncfusion.com/demos/#/calendar/default.html)
[Calendar Documentation](http://ej2.syncfusion.com/documentation/calendar)
[DatePicker Demo](http://ej2.syncfusion.com/demos/#/datepicker/default.html)
[DatePicker Documentation](http://ej2.syncfusion.com/documentation/datepicker)

@@ -11,0 +13,0 @@ ## Changelog

@@ -13,24 +13,24 @@ import{Calendar} from "./calendar";

/**
* Triggers when the calendar value has been changed.
* Triggers when the Calendar value is changed.
*/
change(value:Function): BuilderProperties;
/**
* Triggers when calendar is created.
* Triggers when Calendar is created.
*/
created(value:Function): BuilderProperties;
/**
* Triggers when calendar is destroyed.
* Triggers when Calendar is destroyed.
*/
destroyed(value:Function): BuilderProperties;
/**
* Triggers when the calendar has been navigated to another level or within the same level of view.
* Triggers when the Calendar is navigated to another level or within the same level of view.
*/
navigated(value:Function): BuilderProperties;
/**
* Triggers on rendering of each day cell of the calendar.
* Triggers when each day cell of the Calendar is rendered
*/
renderDayCell(value:Function): BuilderProperties;
/**
* Sets the maximum level of view(month, year, decade)in the calendar.
depth view should be smaller than the start view, so that it will restricts the view navigation.
* Sets the maximum level of view (month, year, decade) in the Calendar.
Depth view should be smaller than the start view to restrict its view navigation.
*/

@@ -47,4 +47,3 @@ depth(value:CalendarView): BuilderProperties;

/**
* Gets or sets the calendar's first day of week, by default the first day of the week will
be based on the current culture.
* Gets or sets the Calendar's first day of the week. By default, the first day of the week will be based on the current culture.
*/

@@ -54,27 +53,27 @@ firstDayOfWeek(value:number): BuilderProperties;

/**
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US'
* Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
*/
locale(value:string): BuilderProperties;
/**
* Gets or sets the maximum date that can be allowed to select in the calendar
* Gets or sets the maximum date that can be selected in the Calendar.
*/
max(value:Date): BuilderProperties;
/**
* Gets or sets the minimum date that can be allowed to select in the calendar.
* Gets or sets the minimum date that can be selected in the Calendar.
*/
min(value:Date): BuilderProperties;
/**
* Specifies the initial view of the calendar, when it is opened.
With help of this property, initial view can be changed to year or decade view.
* Specifies the initial view of the Calendar when it is opened.
With the help of this property, initial view can be changed to year or decade view.
*/
start(value:CalendarView): BuilderProperties;
/**
* Gets or sets the selected date of the calendar.
* Gets or sets the selected date of the Calendar
*/
value(value:Date): BuilderProperties;
/**
* Determines whether the week number of the calendar to be displayed.
It will display the week number in every week row.
* Determines whether the week number of the Calendar is to be displayed or not.
The week number is displayed in every week row.
*/
weekNumber(value:boolean): BuilderProperties;
}

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

import { Component, EventHandler, Property, Event, CreateBuilder, Internationalization, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { cldrData, BaseEventArgs, getDefaultDateObject, isRippleEnabled } from '@syncfusion/ej2-base';import { createElement, removeClass, remove, addClass, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base';import { CalendarHelper } from './calendar-builder';
import { Component, EventHandler, Property, Event, CreateBuilder, Internationalization, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { cldrData, BaseEventArgs, getDefaultDateObject, rippleEffect } from '@syncfusion/ej2-base';import { createElement, removeClass, detach, addClass, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined, getValue, getUniqueID, extend, Browser } from '@syncfusion/ej2-base';import { CalendarHelper } from './calendar-builder';
import {CalendarView,ChangedEventArgs,NavigatedEventArgs,RenderDayCellEventArgs} from "./calendar";

@@ -11,3 +11,3 @@ import {ComponentModel} from '@syncfusion/ej2-base';

/**
* Gets or sets the selected date of the calendar.
* Gets or sets the selected date of the Calendar
* @default null

@@ -18,3 +18,3 @@ */

/**
* Gets or sets the minimum date that can be allowed to select in the calendar.
* Gets or sets the minimum date that can be selected in the Calendar.
* @default new Date(1900, 00, 01)

@@ -25,3 +25,3 @@ */

/**
* Gets or sets the maximum date that can be allowed to select in the calendar
* Gets or sets the maximum date that can be selected in the Calendar.
* @default new Date(2099, 11, 31)

@@ -32,4 +32,3 @@ */

/**
* Gets or sets the calendar's first day of week, by default the first day of the week will
* be based on the current culture.
* Gets or sets the Calendar's first day of the week. By default, the first day of the week will be based on the current culture.
* @default '0'

@@ -40,4 +39,4 @@ */

/**
* Specifies the initial view of the calendar, when it is opened.
* With help of this property, initial view can be changed to year or decade view.
* Specifies the initial view of the Calendar when it is opened.
* With the help of this property, initial view can be changed to year or decade view.
* @default month

@@ -48,4 +47,4 @@ */

/**
* Sets the maximum level of view(month, year, decade)in the calendar.
* depth view should be smaller than the start view, so that it will restricts the view navigation.
* Sets the maximum level of view (month, year, decade) in the Calendar.
* Depth view should be smaller than the start view to restrict its view navigation.
* @default month

@@ -56,4 +55,4 @@ */

/**
* Determines whether the week number of the calendar to be displayed.
* It will display the week number in every week row.
* Determines whether the week number of the Calendar is to be displayed or not.
* The week number is displayed in every week row.
* @default false

@@ -64,3 +63,3 @@ */

/**
     * Triggers when calendar is created.
     * Triggers when Calendar is created.
     * @event

@@ -71,3 +70,3 @@ */

/**
     * Triggers when calendar is destroyed.
     * Triggers when Calendar is destroyed.
     * @event

@@ -78,3 +77,3 @@ */

/**
* Triggers when the calendar value has been changed.
* Triggers when the Calendar value is changed.
* @event

@@ -85,3 +84,3 @@ */

/**
* Triggers when the calendar has been navigated to another level or within the same level of view.
* Triggers when the Calendar is navigated to another level or within the same level of view.
* @event

@@ -92,3 +91,3 @@ */

/**
* Triggers on rendering of each day cell of the calendar.
* Triggers when each day cell of the Calendar is rendered
* @event

@@ -95,0 +94,0 @@ */

import { Component, Internationalization, EmitType } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged, KeyboardEvents } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';
import { BaseEventArgs } from '@syncfusion/ej2-base';

@@ -7,3 +7,3 @@ import { CalendarModel } from './calendar-model';

/**
* Specifies the view of the calendar
* Specifies the view of the calendar.
*/

@@ -42,2 +42,3 @@ export declare type CalendarView = 'month' | 'year' | 'decade';

protected navigateHandler: Function;
protected calendarElement: HTMLElement;
protected keyConfigs: {

@@ -47,3 +48,3 @@ [key: string]: string;

/**
* Gets or sets the selected date of the calendar.
* Gets or sets the selected date of the Calendar
* @default null

@@ -53,3 +54,3 @@ */

/**
* Gets or sets the minimum date that can be allowed to select in the calendar.
* Gets or sets the minimum date that can be selected in the Calendar.
* @default new Date(1900, 00, 01)

@@ -59,3 +60,3 @@ */

/**
* Gets or sets the maximum date that can be allowed to select in the calendar
* Gets or sets the maximum date that can be selected in the Calendar.
* @default new Date(2099, 11, 31)

@@ -65,4 +66,3 @@ */

/**
* Gets or sets the calendar's first day of week, by default the first day of the week will
* be based on the current culture.
* Gets or sets the Calendar's first day of the week. By default, the first day of the week will be based on the current culture.
* @default '0'

@@ -72,4 +72,4 @@ */

/**
* Specifies the initial view of the calendar, when it is opened.
* With help of this property, initial view can be changed to year or decade view.
* Specifies the initial view of the Calendar when it is opened.
* With the help of this property, initial view can be changed to year or decade view.
* @default month

@@ -79,4 +79,4 @@ */

/**
* Sets the maximum level of view(month, year, decade)in the calendar.
* depth view should be smaller than the start view, so that it will restricts the view navigation.
* Sets the maximum level of view (month, year, decade) in the Calendar.
* Depth view should be smaller than the start view to restrict its view navigation.
* @default month

@@ -86,4 +86,4 @@ */

/**
* Determines whether the week number of the calendar to be displayed.
* It will display the week number in every week row.
* Determines whether the week number of the Calendar is to be displayed or not.
* The week number is displayed in every week row.
* @default false

@@ -93,3 +93,3 @@ */

/**
* Triggers when calendar is created.
* Triggers when Calendar is created.
* @event

@@ -99,3 +99,3 @@ */

/**
* Triggers when calendar is destroyed.
* Triggers when Calendar is destroyed.
* @event

@@ -105,3 +105,3 @@ */

/**
* Triggers when the calendar value has been changed.
* Triggers when the Calendar value is changed.
* @event

@@ -111,3 +111,3 @@ */

/**
* Triggers when the calendar has been navigated to another level or within the same level of view.
* Triggers when the Calendar is navigated to another level or within the same level of view.
* @event

@@ -117,3 +117,3 @@ */

/**
* Triggers on rendering of each day cell of the calendar.
* Triggers when each day cell of the Calendar is rendered
* @event

@@ -144,4 +144,4 @@ */

protected wireEvents(): void;
private keyActionHandle(e);
private KeyboardNavigate(num, currentView);
protected keyActionHandle(e: KeyboardEventArgs): void;
private KeyboardNavigate(num, currentView, e);
/**

@@ -152,5 +152,5 @@ * Initialize the event handler

protected preRender(): void;
private renderMonths();
private renderYears();
private renderDecades();
private renderMonths(e?);
private renderYears(e?);
private renderDecades(e?);
private dayCell(localDate);

@@ -160,6 +160,6 @@ private firstDay(date);

private removeTheadEle();
private renderTemplate(elements, numCells, classNm);
private renderTemplate(elements, numCells, classNm, e?);
private clickHandler(e);
private contentClick(e, view, ele);
private switchView(view);
private switchView(view, e?);
/**

@@ -171,3 +171,3 @@ * To get component name

/**
* To get the properties to be maintained upon browser refresh.
* Gets the properties to be maintained upon browser refresh.
* @returns string

@@ -187,16 +187,16 @@ */

/**
* To destroy the widget.
* Destroys the widget.
* @returns void
*/
destroy(): void;
private title();
private title(e?);
private getViewNumber(stringVal);
private navTitle();
private navTitle(e);
private previous();
private navPrev();
private navPrev(e);
private next();
private navNext();
private navNext(eve);
/**
* This method used to navigate to the month/year/decade view of the calendar.
* @param {string} view - Specifies the view of the calendar.
* This method is used to navigate to the month/year/decade view of the Calendar.
* @param {string} view - Specifies the view of the Calendar.
* @param {Date} date - Specifies the focused date in a view.

@@ -207,3 +207,3 @@ * @returns void

/**
* Gets the current view of the calendar.
* Gets the current view of the Calendar.
* @returns string

@@ -223,6 +223,6 @@ */

protected renderDayCellEvent(args: RenderDayCellEventArgs): void;
protected navigatedEvent(): void;
private triggerNavigate();
protected changeEvent(): void;
private triggerChange();
protected navigatedEvent(eve: MouseEvent | KeyboardEvent): void;
private triggerNavigate(event);
protected changeEvent(e: Event): void;
private triggerChange(e);
private nextIconHandler(disabled);

@@ -242,21 +242,25 @@ private compare(startDate, endDate, modifier);

export interface RenderDayCellEventArgs extends BaseEventArgs {
/** Specifies the current date to be disabled or not. */
/** Specifies whether to disable the current date or not. */
isDisabled?: boolean;
/** Specifies the day cell element. */
element?: HTMLElement;
/** Defines the current date of the calendar. */
/** Defines the current date of the Calendar. */
date?: Date;
/** Defines whether the current date is in out of range(less than min or greater than max). */
/** Defines whether the current date is out of range (less than min or greater than max) or not. */
isOutOfRange?: boolean;
}
export interface ChangedEventArgs extends BaseEventArgs {
/** Defines the selected date of the calendar. */
/** Defines the selected date of the Calendar. */
value?: Date;
/** Defines the event of the Calendar. */
event?: KeyboardEvent | MouseEvent;
}
export interface NavigatedEventArgs extends BaseEventArgs {
/** Defines the current view of the calendar. */
/** Defines the current view of the Calendar. */
view?: string;
/** Defines the focused date in a view. */
date?: Date;
/** Defines the event of the Calendar. */
event?: KeyboardEvent | MouseEvent;
}
export declare let calendarBuilder: CalendarHelper;

@@ -31,4 +31,4 @@ var __extends = (this && this.__extends) || (function () {

var RIPPLESTYLE = 'e-ripple-style';
var PREVSPAN = 'e-icon-prev';
var NEXTSPAN = 'e-icon-next ';
var PREVSPAN = 'e-date-icon-prev';
var NEXTSPAN = 'e-date-icon-next ';
var ICONCONTAINER = 'e-icon-container';

@@ -75,9 +75,21 @@ var DISABLED = 'e-disabled';

this.globalize = new ej2_base_1.Internationalization(this.locale);
this.element.classList.add(ROOT);
if (this.enableRtl) {
this.element.classList.add(RTL);
if (this.getModuleName() === 'calendar') {
this.element.classList.add(ROOT);
if (this.enableRtl) {
this.element.classList.add(RTL);
}
ej2_base_4.attributes(this.element, {
'data-role': 'calendar'
});
}
ej2_base_4.attributes(this.element, {
'data-role': 'calendar'
});
else {
this.calendarElement = ej2_base_4.createElement('div');
this.calendarElement.classList.add(ROOT);
if (this.enableRtl) {
this.calendarElement.classList.add(RTL);
}
ej2_base_4.attributes(this.calendarElement, {
'role': 'calendar'
});
}
this.processDate();

@@ -153,9 +165,17 @@ this.header();

this.prevIcon = ej2_base_4.createElement('a', { className: '' + PREVICON });
if (ej2_base_3.isRippleEnabled) {
this.prevIcon.classList.add(RIPPLESTYLE);
if (!ej2_base_5.Browser.isIos && !ej2_base_5.Browser.isIos7 && !ej2_base_5.Browser.isIE) {
ej2_base_3.rippleEffect(this.prevIcon, {
duration: 400,
selector: '.e-prev',
isCenterRipple: true
});
}
ej2_base_4.attributes(this.prevIcon, ariaPrevAttrs);
this.nextIcon = ej2_base_4.createElement('a', { className: '' + NEXTICON });
if (ej2_base_3.isRippleEnabled) {
this.nextIcon.classList.add(RIPPLESTYLE);
if (!ej2_base_5.Browser.isIos && !ej2_base_5.Browser.isIos7 && !ej2_base_5.Browser.isIE) {
ej2_base_3.rippleEffect(this.nextIcon, {
selector: '.e-next',
duration: 400,
isCenterRipple: true
});
}

@@ -171,3 +191,8 @@ ej2_base_4.attributes(this.nextIcon, ariaNextAttrs);

this.headerEle.appendChild(iconContainer);
this.element.appendChild(this.headerEle);
if (this.getModuleName() === 'calendar') {
this.element.appendChild(this.headerEle);
}
else {
this.calendarElement.appendChild(this.headerEle);
}
};

@@ -178,3 +203,8 @@ Calendar.prototype.content = function () {

this.table = ej2_base_4.createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '' } });
this.element.appendChild(this.contentEle);
if (this.getModuleName() === 'calendar') {
this.element.appendChild(this.contentEle);
}
else {
this.calendarElement.appendChild(this.contentEle);
}
this.contentEle.appendChild(this.table);

@@ -200,5 +230,12 @@ this.contentHdr();

Calendar.prototype.contentHdr = function () {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
ej2_base_4.remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);
if (this.getModuleName() === 'calendar') {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
ej2_base_4.detach(this.element.querySelectorAll('.e-content .e-week-header')[0]);
}
}
else {
if (!ej2_base_5.isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0])) {
ej2_base_4.detach(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0]);
}
}
var daysCount = 6;

@@ -223,5 +260,12 @@ var html = '';

Calendar.prototype.contentBody = function () {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {
ej2_base_4.remove(this.element.querySelectorAll('.e-content tbody')[0]);
if (this.getModuleName() === 'calendar') {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {
ej2_base_4.detach(this.element.querySelectorAll('.e-content tbody')[0]);
}
}
else {
if (!ej2_base_5.isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content tbody')[0])) {
ej2_base_4.detach(this.calendarElement.querySelectorAll('.e-content tbody')[0]);
}
}
switch (this.start) {

@@ -240,7 +284,16 @@ case 'year':

ej2_base_1.EventHandler.add(this.hdrTitleEle, 'click', this.navTitle, this);
this.keyboardModule = new ej2_base_2.KeyboardEvents(this.element, {
eventName: 'keydown',
keyAction: this.keyActionHandle.bind(this),
keyConfigs: this.keyConfigs
});
if (this.getModuleName() === 'calendar') {
this.keyboardModule = new ej2_base_2.KeyboardEvents(this.element, {
eventName: 'keydown',
keyAction: this.keyActionHandle.bind(this),
keyConfigs: this.keyConfigs
});
}
else {
this.keyboardModule = new ej2_base_2.KeyboardEvents(this.calendarElement, {
eventName: 'keydown',
keyAction: this.keyActionHandle.bind(this),
keyConfigs: this.keyConfigs
});
}
};

@@ -256,7 +309,7 @@ Calendar.prototype.keyActionHandle = function (e) {

case 'moveLeft':
this.KeyboardNavigate(-1, view);
this.KeyboardNavigate(-1, view, e);
e.preventDefault();
break;
case 'moveRight':
this.KeyboardNavigate(1, view);
this.KeyboardNavigate(1, view, e);
e.preventDefault();

@@ -266,6 +319,6 @@ break;

if (view === 0) {
this.KeyboardNavigate(-7, view);
this.KeyboardNavigate(-7, view, e);
}
else {
this.KeyboardNavigate(-4, view);
this.KeyboardNavigate(-4, view, e);
}

@@ -276,6 +329,6 @@ e.preventDefault();

if (view === 0) {
this.KeyboardNavigate(7, view);
this.KeyboardNavigate(7, view, e);
}
else {
this.KeyboardNavigate(4, view);
this.KeyboardNavigate(4, view, e);
}

@@ -307,4 +360,4 @@ e.preventDefault();

this.currentDate = this.firstDay(this.currentDate);
ej2_base_4.remove(this.tbodyEle);
this.renderMonths();
ej2_base_4.detach(this.tbodyEle);
this.renderMonths(e);
e.preventDefault();

@@ -314,4 +367,4 @@ break;

this.currentDate = this.lastDay(this.currentDate);
ej2_base_4.remove(this.tbodyEle);
this.renderMonths();
ej2_base_4.detach(this.tbodyEle);
this.renderMonths(e);
e.preventDefault();

@@ -349,3 +402,3 @@ break;

};
Calendar.prototype.KeyboardNavigate = function (num, currentView) {
Calendar.prototype.KeyboardNavigate = function (num, currentView, e) {
var date = new Date('' + this.currentDate);

@@ -356,4 +409,4 @@ switch (currentView) {

if (this.isMinMaxRange(this.currentDate)) {
ej2_base_4.remove(this.tbodyEle);
this.renderDecades();
ej2_base_4.detach(this.tbodyEle);
this.renderDecades(e);
}

@@ -367,4 +420,4 @@ else {

if (this.isMinMaxRange(this.currentDate)) {
ej2_base_4.remove(this.tbodyEle);
this.renderYears();
ej2_base_4.detach(this.tbodyEle);
this.renderYears(e);
}

@@ -378,4 +431,4 @@ else {

if (this.isMinMaxRange(this.currentDate)) {
ej2_base_4.remove(this.tbodyEle);
this.renderMonths();
ej2_base_4.detach(this.tbodyEle);
this.renderMonths(e);
}

@@ -391,10 +444,10 @@ else {

this.changeHandler = function (e) {
_this.triggerChange();
_this.triggerChange(e);
};
this.navigateHandler = function (e) {
_this.triggerNavigate();
_this.triggerNavigate(e);
};
};
;
Calendar.prototype.renderMonths = function () {
Calendar.prototype.renderMonths = function (e) {
var tdEles = [];

@@ -488,5 +541,5 @@ var cellsCount = 42;

this.contentHdr();
this.renderTemplate(tdEles, numCells, MONTH);
this.renderTemplate(tdEles, numCells, MONTH, e);
};
Calendar.prototype.renderYears = function () {
Calendar.prototype.renderYears = function (e) {
this.removeTheadEle();

@@ -535,5 +588,5 @@ var numCells = 4;

}
this.renderTemplate(tdEles, numCells, YEAR);
this.renderTemplate(tdEles, numCells, YEAR, e);
};
Calendar.prototype.renderDecades = function () {
Calendar.prototype.renderDecades = function (e) {
this.removeTheadEle();

@@ -547,3 +600,7 @@ var numCells = 4;

var localYr = localDate.getFullYear();
this.hdrTitleEle.textContent = (localYr - localYr % 10) + ' - ' + (localYr - localYr % 10 + (10 - 1));
var startYr = new Date('' + (localYr - localYr % 10));
var endYr = new Date('' + (localYr - localYr % 10 + (10 - 1)));
var startHdrYr = this.globalize.formatDate(startYr, { type: 'date', skeleton: 'y' });
var endHdrYr = this.globalize.formatDate(endYr, { type: 'date', skeleton: 'y' });
this.hdrTitleEle.textContent = startHdrYr + ' - ' + (endHdrYr);
var start = new Date(localYr - (localYr % 10) - 1, 0, 1);

@@ -557,3 +614,3 @@ var startYear = start.getFullYear();

var dayLink = ej2_base_4.createElement('span');
dayLink.textContent = dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'y' });
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'y' });
if (year < new Date('' + this.min).getFullYear() || year > new Date('' + this.max).getFullYear()) {

@@ -576,3 +633,3 @@ ej2_base_4.addClass([tdEle], DISABLED);

}
this.renderTemplate(tdEles, numCells, 'e-decade');
this.renderTemplate(tdEles, numCells, 'e-decade', e);
};

@@ -600,7 +657,14 @@ Calendar.prototype.dayCell = function (localDate) {

Calendar.prototype.removeTheadEle = function () {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {
ej2_base_4.remove(this.theadEle);
if (this.getModuleName() === 'calendar') {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {
ej2_base_4.detach(this.theadEle);
}
}
else {
if (!ej2_base_5.isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content table thead')[0])) {
ej2_base_4.detach(this.theadEle);
}
}
};
Calendar.prototype.renderTemplate = function (elements, numCells, classNm) {
Calendar.prototype.renderTemplate = function (elements, numCells, classNm, e) {
var view = this.getViewNumber(this.currentView());

@@ -622,5 +686,6 @@ var trEle;

ej2_base_4.addClass([elements[rowIterator].children[0]], [LINK]);
if (ej2_base_3.isRippleEnabled) {
ej2_base_4.addClass([elements[rowIterator].children[0]], RIPPLESTYLE);
}
ej2_base_3.rippleEffect(elements[rowIterator].children[0], {
duration: 600,
isCenterRipple: true
});
}

@@ -650,3 +715,3 @@ trEle.appendChild(elements[rowIterator]);

if (view !== this.getViewNumber(this.currentView()) || (view === 0 && view !== this.getViewNumber(this.currentView()))) {
this.navigateHandler();
this.navigateHandler(e);
}

@@ -683,6 +748,6 @@ this.setAriaActivedescendant();

if (currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {
ej2_base_4.remove(this.tbodyEle);
ej2_base_4.detach(this.tbodyEle);
this.currentDate = d;
this.effect = ZOOMIN;
this.renderMonths();
this.renderMonths(e);
}

@@ -696,4 +761,4 @@ else {

this.effect = ZOOMIN;
ej2_base_4.remove(this.tbodyEle);
this.renderMonths();
ej2_base_4.detach(this.tbodyEle);
this.renderMonths(e);
}

@@ -708,20 +773,20 @@ break;

this.effect = ZOOMIN;
ej2_base_4.remove(this.tbodyEle);
this.renderYears();
ej2_base_4.detach(this.tbodyEle);
this.renderYears(e);
}
}
};
Calendar.prototype.switchView = function (view) {
Calendar.prototype.switchView = function (view, e) {
switch (view) {
case 0:
ej2_base_4.remove(this.tbodyEle);
this.renderMonths();
ej2_base_4.detach(this.tbodyEle);
this.renderMonths(e);
break;
case 1:
ej2_base_4.remove(this.tbodyEle);
this.renderYears();
ej2_base_4.detach(this.tbodyEle);
this.renderYears(e);
break;
case 2:
ej2_base_4.remove(this.tbodyEle);
this.renderDecades();
ej2_base_4.detach(this.tbodyEle);
this.renderDecades(e);
}

@@ -751,6 +816,16 @@ };

if (newProp.enableRtl) {
this.element.classList.add('e-rtl');
if (this.getModuleName() === 'calendar') {
this.element.classList.add('e-rtl');
}
else {
this.calendarElement.classList.add('e-rtl');
}
}
else {
this.element.classList.remove('e-rtl');
if (this.getModuleName() === 'calendar') {
this.element.classList.remove('e-rtl');
}
else {
this.calendarElement.classList.remove('e-rtl');
}
}

@@ -766,3 +841,3 @@ break;

this.setProperties({ start: this.currentView() }, true);
ej2_base_4.remove(this.tbodyEle);
ej2_base_4.detach(this.tbodyEle);
this.minMaxUpdate();

@@ -823,3 +898,8 @@ this.contentBody();

Calendar.prototype.destroy = function () {
this.element.classList.remove(ROOT);
if (this.getModuleName() === 'calendar') {
this.element.classList.remove(ROOT);
}
else {
this.calendarElement.classList.remove(ROOT);
}
ej2_base_1.EventHandler.remove(this.hdrTitleEle, 'click', this.navTitle);

@@ -832,6 +912,6 @@ this.prevIconHandler(true);

};
Calendar.prototype.title = function () {
Calendar.prototype.title = function (e) {
var currentView = this.getViewNumber(this.currentView());
this.effect = ZOOMIN;
this.switchView(++currentView);
this.switchView(++currentView, e);
};

@@ -849,4 +929,4 @@ Calendar.prototype.getViewNumber = function (stringVal) {

};
Calendar.prototype.navTitle = function () {
this.title();
Calendar.prototype.navTitle = function (e) {
this.title(e);
this.table.focus();

@@ -872,5 +952,5 @@ };

};
Calendar.prototype.navPrev = function () {
Calendar.prototype.navPrev = function (e) {
this.previous();
this.triggerNavigate();
this.triggerNavigate(e);
this.table.focus();

@@ -896,5 +976,5 @@ };

};
Calendar.prototype.navNext = function () {
Calendar.prototype.navNext = function (eve) {
this.next();
this.triggerNavigate();
this.triggerNavigate(eve);
this.table.focus();

@@ -989,3 +1069,3 @@ };

this.changedArgs = { value: this.value };
this.changeHandler();
this.changeHandler(e);
};

@@ -1016,15 +1096,15 @@ Calendar.prototype.setAriaActivedescendant = function () {

};
Calendar.prototype.navigatedEvent = function () {
ej2_base_5.extend(this.navigatedArgs, { name: 'navigated' });
Calendar.prototype.navigatedEvent = function (eve) {
ej2_base_5.extend(this.navigatedArgs, { name: 'navigated', event: eve });
this.trigger('navigated', this.navigatedArgs);
};
Calendar.prototype.triggerNavigate = function () {
Calendar.prototype.triggerNavigate = function (event) {
this.navigatedArgs = { view: this.currentView(), date: this.currentDate };
this.navigatedEvent();
this.navigatedEvent(event);
};
Calendar.prototype.changeEvent = function () {
Calendar.prototype.changeEvent = function (e) {
this.trigger('change', this.changedArgs);
};
Calendar.prototype.triggerChange = function () {
ej2_base_5.extend(this.changedArgs, { name: 'change' });
Calendar.prototype.triggerChange = function (e) {
this.changedArgs.event = e;
if (!ej2_base_5.isNullOrUndefined(this.value)) {

@@ -1034,3 +1114,3 @@ this.setProperties({ value: this.resetTime(this.value) }, true);

if (+this.value !== Number.NaN && +this.value !== +this.previousDate) {
this.changeEvent();
this.changeEvent(e);
}

@@ -1037,0 +1117,0 @@ this.previousDate = this.value;

@@ -5,1 +5,2 @@ /**

export * from './calendar/index';
export * from './datepicker/index';

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

define(["require", "exports", "./calendar/index"], function (require, exports, index_1) {
define(["require", "exports", "./calendar/index", "./datepicker/index"], function (require, exports, index_1, index_2) {
"use strict";

@@ -8,2 +8,3 @@ function __export(m) {

__export(index_1);
__export(index_2);
});

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

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

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc