primeng
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primeng) [{"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/button"),require("primeng/dom"),require("primeng/api"),require("@angular/forms")):"function"==typeof define&&define.amd?define("primeng/calendar",["exports","@angular/core","@angular/animations","@angular/common","primeng/button","primeng/dom","primeng/api","@angular/forms"],e):e(((t=t||self).primeng=t.primeng||{},t.primeng.calendar={}),t.ng.core,t.ng.animations,t.ng.common,t.primeng.button,t.primeng.dom,t.primeng.api,t.ng.forms)}(this,(function(t,e,n,i,o,a,r,s){"use strict";var l=this&&this.__decorate||function(t,e,n,i){var o,a=arguments.length,r=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,n,r):o(e,n))||r);return a>3&&r&&Object.defineProperty(e,n,r),r},u=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,a=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r},h=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t},c=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p={provide:s.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return d})),multi:!0},d=function(){function t(t,n,i,o){this.el=t,this.renderer=n,this.cd=i,this.zone=o,this.dateFormat="mm/dd/yy",this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="ui-button-secondary",this.clearButtonStyleClass="ui-button-secondary",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!1,this.numberOfMonths=1,this.view="date",this.timeSeparator=":",this.showTransitionOptions="225ms ease-out",this.hideTransitionOptions="195ms ease-in",this.onFocus=new e.EventEmitter,this.onBlur=new e.EventEmitter,this.onClose=new e.EventEmitter,this.onSelect=new e.EventEmitter,this.onInput=new e.EventEmitter,this.onTodayClick=new e.EventEmitter,this.onClearClick=new e.EventEmitter,this.onMonthChange=new e.EventEmitter,this.onYearChange=new e.EventEmitter,this.onClickOutside=new e.EventEmitter,this.onShow=new e.EventEmitter,this._locale={firstDayOfWeek:0,dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"mm/dd/yy",weekHeader:"Wk"},this.onModelChange=function(){},this.onModelTouched=function(){},this.inputFieldValue=null,this.navigationState=null}return Object.defineProperty(t.prototype,"content",{set:function(t){var e=this;this.contentViewChild=t,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then((function(){return e.updateFocus()})),this.isMonthNavigate=!1):this.initFocusableCell())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=t,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=t,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabledDates",{get:function(){return this._disabledDates},set:function(t){this._disabledDates=t,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabledDays",{get:function(){return this._disabledDays},set:function(t){this._disabledDays=t,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yearRange",{get:function(){return this._yearRange},set:function(t){if(this._yearRange=t,t){var e=t.split(":"),n=parseInt(e[0]),i=parseInt(e[1]);this.populateYearOptions(n,i)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTime",{get:function(){return this._showTime},set:function(t){this._showTime=t,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locale",{get:function(){return this._locale},set:function(t){this._locale=t,"date"===this.view?(this.createWeekDays(),this.createMonths(this.currentMonth,this.currentYear)):"month"===this.view&&this.createMonthPickerValues()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this.defaultDate||new Date;this.currentMonth=t.getMonth(),this.currentYear=t.getFullYear(),"date"===this.view?(this.createWeekDays(),this.initTime(t),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7):"month"===this.view&&this.createMonthPickerValues()},t.prototype.ngAfterContentInit=function(){var t=this;this.templates.forEach((function(e){switch(e.getType()){case"date":t.dateTemplate=e.template;break;case"disabledDate":t.disabledDateTemplate=e.template;break;default:t.dateTemplate=e.template}}))},t.prototype.populateYearOptions=function(t,e){this.yearOptions=[];for(var n=t;n<=e;n++)this.yearOptions.push(n)},t.prototype.createWeekDays=function(){this.weekDays=[];for(var t=this.locale.firstDayOfWeek,e=0;e<7;e++)this.weekDays.push(this.locale.dayNamesMin[t]),t=6==t?0:++t},t.prototype.createMonthPickerValues=function(){this.monthPickerValues=[];for(var t=0;t<=11;t++)this.monthPickerValues.push(this.locale.monthNamesShort[t])},t.prototype.createMonths=function(t,e){this.months=this.months=[];for(var n=0;n<this.numberOfMonths;n++){var i=t+n,o=e;i>11&&(i=i%11-1,o=e+1),this.months.push(this.createMonth(i,o))}},t.prototype.getWeekNumber=function(t){var e=new Date(t.getTime());e.setDate(e.getDate()+4-(e.getDay()||7));var n=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((n-e.getTime())/864e5)/7)+1},t.prototype.createMonth=function(t,e){for(var n=[],i=this.getFirstDayOfMonthIndex(t,e),o=this.getDaysCountInMonth(t,e),a=this.getDaysCountInPrevMonth(t,e),r=1,s=new Date,l=[],u=Math.ceil((o+i)/7),h=0;h<u;h++){var c=[];if(0==h){for(var p=a-i+1;p<=a;p++){var d=this.getPreviousMonthAndYear(t,e);c.push({day:p,month:d.month,year:d.year,otherMonth:!0,today:this.isToday(s,p,d.month,d.year),selectable:this.isSelectable(p,d.month,d.year,!0)})}var m=7-c.length;for(p=0;p<m;p++)c.push({day:r,month:t,year:e,today:this.isToday(s,r,t,e),selectable:this.isSelectable(r,t,e,!1)}),r++}else for(p=0;p<7;p++){if(r>o){var v=this.getNextMonthAndYear(t,e);c.push({day:r-o,month:v.month,year:v.year,otherMonth:!0,today:this.isToday(s,r-o,v.month,v.year),selectable:this.isSelectable(r-o,v.month,v.year,!0)})}else c.push({day:r,month:t,year:e,today:this.isToday(s,r,t,e),selectable:this.isSelectable(r,t,e,!1)});r++}this.showWeek&&l.push(this.getWeekNumber(new Date(c[0].year,c[0].month,c[0].day))),n.push(c)}return{month:t,year:e,dates:n,weekNumbers:l}},t.prototype.initTime=function(t){this.pm=t.getHours()>11,this.showTime?(this.currentMinute=t.getMinutes(),this.currentSecond=t.getSeconds(),"12"==this.hourFormat?this.currentHour=0==t.getHours()?12:t.getHours()%12:this.currentHour=t.getHours()):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)},t.prototype.navBackward=function(t){var e=this;t.stopPropagation(),this.disabled?t.preventDefault():(this.isMonthNavigate=!0,"month"===this.view?(this.decrementYear(),setTimeout((function(){e.updateFocus()}),1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))},t.prototype.navForward=function(t){var e=this;t.stopPropagation(),this.disabled?t.preventDefault():(this.isMonthNavigate=!0,"month"===this.view?(this.incrementYear(),setTimeout((function(){e.updateFocus()}),1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))},t.prototype.decrementYear=function(){if(this.currentYear--,this.yearNavigator&&this.currentYear<this.yearOptions[0]){var t=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]-t,this.yearOptions[this.yearOptions.length-1]-t)}},t.prototype.incrementYear=function(){if(this.currentYear++,this.yearNavigator&&this.currentYear>this.yearOptions[this.yearOptions.length-1]){var t=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+t,this.yearOptions[this.yearOptions.length-1]+t)}},t.prototype.onDateSelect=function(t,e){var n=this;!this.disabled&&e.selectable?(this.isMultipleSelection()&&this.isSelected(e)?(this.value=this.value.filter((function(t,i){return!n.isDateEquals(t,e)})),this.updateModel(this.value)):this.shouldSelectDate(e)&&(e.otherMonth?(this.currentMonth=e.month,this.currentYear=e.year,this.createMonths(this.currentMonth,this.currentYear),this.selectDate(e)):this.selectDate(e)),!this.isSingleSelection()||this.showTime&&!this.hideOnDateTimeSelect||setTimeout((function(){t.preventDefault(),n.hideOverlay(),n.mask&&n.disableModality(),n.cd.markForCheck()}),150),this.updateInputfield(),t.preventDefault()):t.preventDefault()},t.prototype.shouldSelectDate=function(t){return!this.isMultipleSelection()||(null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0))},t.prototype.onMonthSelect=function(t,e){a.DomHandler.hasClass(t.target,"ui-state-disabled")||this.onDateSelect(t,{year:this.currentYear,month:e,day:1,selectable:!0})},t.prototype.updateInputfield=function(){var t="";if(this.value)if(this.isSingleSelection())t=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(var e=0;e<this.value.length;e++){t+=this.formatDateTime(this.value[e]),e!==this.value.length-1&&(t+=this.multipleSeparator+" ")}else if(this.isRangeSelection()&&this.value&&this.value.length){var n=this.value[0],i=this.value[1];t=this.formatDateTime(n),i&&(t+=" "+this.rangeSeparator+" "+this.formatDateTime(i))}this.inputFieldValue=t,this.updateFilledState(),this.inputfieldViewChild&&this.inputfieldViewChild.nativeElement&&(this.inputfieldViewChild.nativeElement.value=this.inputFieldValue)},t.prototype.formatDateTime=function(t){var e=null;return t&&(this.timeOnly?e=this.formatTime(t):(e=this.formatDate(t,this.getDateFormat()),this.showTime&&(e+=" "+this.formatTime(t)))),e},t.prototype.selectDate=function(t){var e=new Date(t.year,t.month,t.day);if(this.showTime&&("12"==this.hourFormat?12===this.currentHour?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond)),this.minDate&&this.minDate>e&&(e=this.minDate,this.currentHour=e.getHours(),this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds()),this.maxDate&&this.maxDate<e&&(e=this.maxDate,this.currentHour=e.getHours(),this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds()),this.isSingleSelection())this.updateModel(e);else if(this.isMultipleSelection())this.updateModel(this.value?h(this.value,[e]):[e]);else if(this.isRangeSelection())if(this.value&&this.value.length){var n=this.value[0],i=this.value[1];!i&&e.getTime()>=n.getTime()?i=e:(n=e,i=null),this.updateModel([n,i])}else this.updateModel([e,null]);this.onSelect.emit(e)},t.prototype.updateModel=function(t){var e=this;if(this.value=t,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{var n=null;this.value&&(n=this.value.map((function(t){return e.formatDateTime(t)}))),this.onModelChange(n)}},t.prototype.getFirstDayOfMonthIndex=function(t,e){var n=new Date;n.setDate(1),n.setMonth(t),n.setFullYear(e);var i=n.getDay()+this.getSundayIndex();return i>=7?i-7:i},t.prototype.getDaysCountInMonth=function(t,e){return 32-this.daylightSavingAdjust(new Date(e,t,32)).getDate()},t.prototype.getDaysCountInPrevMonth=function(t,e){var n=this.getPreviousMonthAndYear(t,e);return this.getDaysCountInMonth(n.month,n.year)},t.prototype.getPreviousMonthAndYear=function(t,e){var n,i;return 0===t?(n=11,i=e-1):(n=t-1,i=e),{month:n,year:i}},t.prototype.getNextMonthAndYear=function(t,e){var n,i;return 11===t?(n=0,i=e+1):(n=t+1,i=e),{month:n,year:i}},t.prototype.getSundayIndex=function(){return this.locale.firstDayOfWeek>0?7-this.locale.firstDayOfWeek:0},t.prototype.isSelected=function(t){var e,n;if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,t);if(this.isMultipleSelection()){var i=!1;try{for(var o=c(this.value),a=o.next();!a.done;a=o.next()){var r=a.value;if(i=this.isDateEquals(r,t))break}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],t)||this.isDateEquals(this.value[1],t)||this.isDateBetween(this.value[0],this.value[1],t):this.isDateEquals(this.value[0],t):void 0},t.prototype.isMonthSelected=function(t){var e=this.value?Array.isArray(this.value)?this.value[0].getDate():this.value.getDate():1;return this.isSelected({year:this.currentYear,month:t,day:e,selectable:!0})},t.prototype.isDateEquals=function(t,e){return!!t&&(t.getDate()===e.day&&t.getMonth()===e.month&&t.getFullYear()===e.year)},t.prototype.isDateBetween=function(t,e,n){if(t&&e){var i=new Date(n.year,n.month,n.day);return t.getTime()<=i.getTime()&&e.getTime()>=i.getTime()}return!1},t.prototype.isSingleSelection=function(){return"single"===this.selectionMode},t.prototype.isRangeSelection=function(){return"range"===this.selectionMode},t.prototype.isMultipleSelection=function(){return"multiple"===this.selectionMode},t.prototype.isToday=function(t,e,n,i){return t.getDate()===e&&t.getMonth()===n&&t.getFullYear()===i},t.prototype.isSelectable=function(t,e,n,i){var o=!0,a=!0,r=!0,s=!0;return!(i&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>n?o=!1:this.minDate.getFullYear()===n&&(this.minDate.getMonth()>e?o=!1:this.minDate.getMonth()===e&&this.minDate.getDate()>t&&(o=!1))),this.maxDate&&(this.maxDate.getFullYear()<n?a=!1:this.maxDate.getFullYear()===n&&(this.maxDate.getMonth()<e?a=!1:this.maxDate.getMonth()===e&&this.maxDate.getDate()<t&&(a=!1))),this.disabledDates&&(r=!this.isDateDisabled(t,e,n)),this.disabledDays&&(s=!this.isDayDisabled(t,e,n)),o&&a&&r&&s)},t.prototype.isDateDisabled=function(t,e,n){var i,o;if(this.disabledDates)try{for(var a=c(this.disabledDates),r=a.next();!r.done;r=a.next()){var s=r.value;if(s.getFullYear()===n&&s.getMonth()===e&&s.getDate()===t)return!0}}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return!1},t.prototype.isDayDisabled=function(t,e,n){if(this.disabledDays){var i=new Date(n,e,t).getDay();return-1!==this.disabledDays.indexOf(i)}return!1},t.prototype.onInputFocus=function(t){this.focus=!0,this.showOnFocus&&this.showOverlay(),this.onFocus.emit(t)},t.prototype.onInputClick=function(t){this.overlay&&this.autoZIndex&&(this.overlay.style.zIndex=String(this.baseZIndex+ ++a.DomHandler.zindex)),this.showOnFocus&&!this.overlayVisible&&this.showOverlay()},t.prototype.onInputBlur=function(t){this.focus=!1,this.onBlur.emit(t),this.keepInvalid||this.updateInputfield(),this.onModelTouched()},t.prototype.onButtonClick=function(t,e){this.overlayVisible?this.hideOverlay():(e.focus(),this.showOverlay())},t.prototype.onPrevButtonClick=function(t){this.navigationState={backward:!0,button:!0},this.navBackward(t)},t.prototype.onNextButtonClick=function(t){this.navigationState={backward:!1,button:!0},this.navForward(t)},t.prototype.onContainerButtonKeydown=function(t){switch(t.which){case 9:this.inline||this.trapFocus(t);break;case 27:this.overlayVisible=!1,t.preventDefault()}},t.prototype.onInputKeydown=function(t){this.isKeydown=!0,9===t.keyCode&&this.contentViewChild?this.trapFocus(t):27===t.keyCode&&this.overlayVisible&&(this.overlayVisible=!1,t.preventDefault())},t.prototype.onDateCellKeydown=function(t,e,n){var i=t.currentTarget,o=i.parentElement;switch(t.which){case 40:i.tabIndex="-1";var r=a.DomHandler.index(o),s=o.parentElement.nextElementSibling;if(s){var l=s.children[r].children[0];a.DomHandler.hasClass(l,"ui-state-disabled")?(this.navigationState={backward:!1},this.navForward(t)):(s.children[r].children[0].tabIndex="0",s.children[r].children[0].focus())}else this.navigationState={backward:!1},this.navForward(t);t.preventDefault();break;case 38:i.tabIndex="-1";r=a.DomHandler.index(o);var u=o.parentElement.previousElementSibling;if(u){l=u.children[r].children[0];a.DomHandler.hasClass(l,"ui-state-disabled")?(this.navigationState={backward:!0},this.navBackward(t)):(l.tabIndex="0",l.focus())}else this.navigationState={backward:!0},this.navBackward(t);t.preventDefault();break;case 37:i.tabIndex="-1";var h=o.previousElementSibling;if(h){l=h.children[0];a.DomHandler.hasClass(l,"ui-state-disabled")||a.DomHandler.hasClass(l.parentElement,"ui-datepicker-weeknumber")?this.navigateToMonth(!0,n):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!0,n);t.preventDefault();break;case 39:i.tabIndex="-1";var c=o.nextElementSibling;if(c){l=c.children[0];a.DomHandler.hasClass(l,"ui-state-disabled")?this.navigateToMonth(!1,n):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!1,n);t.preventDefault();break;case 13:this.onDateSelect(t,e),t.preventDefault();break;case 27:this.overlayVisible=!1,t.preventDefault();break;case 9:this.inline||this.trapFocus(t)}},t.prototype.onMonthCellKeydown=function(t,e){var n=t.currentTarget;switch(t.which){case 38:case 40:n.tabIndex="-1";var i=n.parentElement.children,o=a.DomHandler.index(n);(s=i[40===t.which?o+3:o-3])&&(s.tabIndex="0",s.focus()),t.preventDefault();break;case 37:n.tabIndex="-1";var r=n.previousElementSibling;r&&(r.tabIndex="0",r.focus()),t.preventDefault();break;case 39:var s;n.tabIndex="-1",(s=n.nextElementSibling)&&(s.tabIndex="0",s.focus()),t.preventDefault();break;case 13:this.onMonthSelect(t,e),t.preventDefault();break;case 27:this.overlayVisible=!1,t.preventDefault();break;case 9:this.inline||this.trapFocus(t)}},t.prototype.navigateToMonth=function(t,e){if(t)if(1===this.numberOfMonths||0===e)this.navigationState={backward:!0},this.navBackward(event);else{var n=this.contentViewChild.nativeElement.children[e-1],i=a.DomHandler.find(n,".ui-datepicker-calendar td a");(o=i[i.length-1]).tabIndex="0",o.focus()}else if(1===this.numberOfMonths||e===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{var o,r=this.contentViewChild.nativeElement.children[e+1];(o=a.DomHandler.findSingle(r,".ui-datepicker-calendar td a")).tabIndex="0",o.focus()}},t.prototype.updateFocus=function(){var t;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-datepicker-prev").focus():a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-datepicker-next").focus();else{if(this.navigationState.backward){var e=a.DomHandler.find(this.contentViewChild.nativeElement,".ui-datepicker-calendar td a");t=e[e.length-1]}else t=a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-datepicker-calendar td a");t&&(t.tabIndex="0",t.focus())}this.navigationState=null}else this.initFocusableCell()},t.prototype.initFocusableCell=function(){var t;if("month"===this.view){var e=a.DomHandler.find(this.contentViewChild.nativeElement,".ui-monthpicker .ui-monthpicker-month:not(.ui-state-disabled)"),n=a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-monthpicker .ui-monthpicker-month.ui-state-highlight");if(e.forEach((function(t){return t.tabIndex=-1})),t=n||e[0],0===e.length)a.DomHandler.find(this.contentViewChild.nativeElement,'.ui-monthpicker .ui-monthpicker-month.ui-state-disabled[tabindex = "0"]').forEach((function(t){return t.tabIndex=-1}))}else if(!(t=a.DomHandler.findSingle(this.contentViewChild.nativeElement,"a.ui-state-active"))){var i=a.DomHandler.findSingle(this.contentViewChild.nativeElement,"td.ui-datepicker-today a:not(.ui-state-disabled)");t=i||a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-datepicker-calendar td a")}t&&(t.tabIndex="0")},t.prototype.trapFocus=function(t){t.preventDefault();var e=a.DomHandler.getFocusableElements(this.contentViewChild.nativeElement);if(e&&e.length>0)if(document.activeElement){var n=e.indexOf(document.activeElement);t.shiftKey?-1==n||0===n?e[e.length-1].focus():e[n-1].focus():-1==n||n===e.length-1?e[0].focus():e[n+1].focus()}else e[0].focus()},t.prototype.onMonthDropdownChange=function(t){this.currentMonth=parseInt(t),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)},t.prototype.onYearDropdownChange=function(t){this.currentYear=parseInt(t),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)},t.prototype.incrementHour=function(t){var e=this.currentHour,n=this.currentHour+this.stepHour;this.validateHour(n)&&("24"==this.hourFormat?this.currentHour=n>=24?n-24:n:"12"==this.hourFormat&&(e<12&&n>11&&(this.pm=!this.pm),this.currentHour=n>=13?n-12:n)),t.preventDefault()},t.prototype.onTimePickerElementMouseDown=function(t,e,n){this.disabled||(this.repeat(t,null,e,n),t.preventDefault())},t.prototype.onTimePickerElementMouseUp=function(t){this.disabled||(this.clearTimePickerTimer(),this.updateTime())},t.prototype.onTimePickerElementMouseOut=function(t){this.disabled||(this.clearTimePickerTimer(),this.updateTime())},t.prototype.repeat=function(t,e,n,i){var o=this,a=e||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout((function(){o.repeat(t,100,n,i)}),a),n){case 0:1===i?this.incrementHour(t):this.decrementHour(t);break;case 1:1===i?this.incrementMinute(t):this.decrementMinute(t);break;case 2:1===i?this.incrementSecond(t):this.decrementSecond(t)}this.updateInputfield()},t.prototype.clearTimePickerTimer=function(){this.timePickerTimer&&clearInterval(this.timePickerTimer)},t.prototype.decrementHour=function(t){var e=this.currentHour-this.stepHour;this.validateHour(e)&&("24"==this.hourFormat?this.currentHour=e<0?24+e:e:"12"==this.hourFormat&&(12===this.currentHour&&(this.pm=!this.pm),this.currentHour=e<=0?12+e:e)),t.preventDefault()},t.prototype.validateHour=function(t){var e=!0,n=this.value;this.isRangeSelection()&&(n=this.value[1]||this.value[0]),this.isMultipleSelection()&&(n=this.value[this.value.length-1]);var i=n?n.toDateString():null;return this.minDate&&i&&this.minDate.toDateString()===i&&this.minDate.getHours()>t&&(e=!1),this.maxDate&&i&&this.maxDate.toDateString()===i&&this.maxDate.getHours()<t&&(e=!1),e},t.prototype.incrementMinute=function(t){var e=this.currentMinute+this.stepMinute;this.validateMinute(e)&&(this.currentMinute=e>59?e-60:e),t.preventDefault()},t.prototype.decrementMinute=function(t){var e=this.currentMinute-this.stepMinute;e=e<0?60+e:e,this.validateMinute(e)&&(this.currentMinute=e),t.preventDefault()},t.prototype.validateMinute=function(t){var e=!0,n=this.value;this.isRangeSelection()&&(n=this.value[1]||this.value[0]),this.isMultipleSelection()&&(n=this.value[this.value.length-1]);var i=n?n.toDateString():null;return this.minDate&&i&&this.minDate.toDateString()===i&&n.getHours()==this.minDate.getHours()&&this.minDate.getMinutes()>t&&(e=!1),this.maxDate&&i&&this.maxDate.toDateString()===i&&n.getHours()==this.maxDate.getHours()&&this.maxDate.getMinutes()<t&&(e=!1),e},t.prototype.incrementSecond=function(t){var e=this.currentSecond+this.stepSecond;this.validateSecond(e)&&(this.currentSecond=e>59?e-60:e),t.preventDefault()},t.prototype.decrementSecond=function(t){var e=this.currentSecond-this.stepSecond;e=e<0?60+e:e,this.validateSecond(e)&&(this.currentSecond=e),t.preventDefault()},t.prototype.validateSecond=function(t){var e=!0,n=this.value;this.isRangeSelection()&&(n=this.value[1]||this.value[0]),this.isMultipleSelection()&&(n=this.value[this.value.length-1]);var i=n?n.toDateString():null;return this.minDate&&i&&this.minDate.toDateString()===i&&this.minDate.getSeconds()>t&&(e=!1),this.maxDate&&i&&this.maxDate.toDateString()===i&&this.maxDate.getSeconds()<t&&(e=!1),e},t.prototype.updateTime=function(){var t=this.value;this.isRangeSelection()&&(t=this.value[1]||this.value[0]),this.isMultipleSelection()&&(t=this.value[this.value.length-1]),t=t?new Date(t.getTime()):new Date,"12"==this.hourFormat?12===this.currentHour?t.setHours(this.pm?12:0):t.setHours(this.pm?this.currentHour+12:this.currentHour):t.setHours(this.currentHour),t.setMinutes(this.currentMinute),t.setSeconds(this.currentSecond),this.isRangeSelection()&&(t=this.value[1]?[this.value[0],t]:[t,null]),this.isMultipleSelection()&&(t=h(this.value.slice(0,-1),[t])),this.updateModel(t),this.onSelect.emit(t),this.updateInputfield()},t.prototype.toggleAMPM=function(t){this.pm=!this.pm,this.updateTime(),t.preventDefault()},t.prototype.onUserInput=function(t){if(this.isKeydown){this.isKeydown=!1;var e=t.target.value;try{var n=this.parseValueFromString(e);this.isValidSelection(n)&&(this.updateModel(n),this.updateUI())}catch(t){this.updateModel(null)}this.filled=null!=e&&e.length,this.onInput.emit(t)}},t.prototype.isValidSelection=function(t){var e=this,n=!0;return this.isSingleSelection()?this.isSelectable(t.getDate(),t.getMonth(),t.getFullYear(),!1)||(n=!1):t.every((function(t){return e.isSelectable(t.getDate(),t.getMonth(),t.getFullYear(),!1)}))&&this.isRangeSelection()&&(n=t.length>1&&t[1]>t[0]),n},t.prototype.parseValueFromString=function(t){var e,n,i;if(!t||0===t.trim().length)return null;if(this.isSingleSelection())i=this.parseDateTime(t);else if(this.isMultipleSelection()){var o=t.split(this.multipleSeparator);i=[];try{for(var a=c(o),r=a.next();!r.done;r=a.next()){var s=r.value;i.push(this.parseDateTime(s.trim()))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}else if(this.isRangeSelection()){o=t.split(" "+this.rangeSeparator+" ");i=[];for(var l=0;l<o.length;l++)i[l]=this.parseDateTime(o[l].trim())}return i},t.prototype.parseDateTime=function(t){var e,n=t.split(" ");if(this.timeOnly)e=new Date,this.populateTime(e,n[0],n[1]);else{var i=this.getDateFormat();if(this.showTime){var o="12"==this.hourFormat?n.pop():null,a=n.pop();e=this.parseDate(n.join(" "),i),this.populateTime(e,a,o)}else e=this.parseDate(t,i)}return e},t.prototype.populateTime=function(t,e,n){if("12"==this.hourFormat&&!n)throw"Invalid Time";this.pm="PM"===n||"pm"===n;var i=this.parseTime(e);t.setHours(i.hour),t.setMinutes(i.minute),t.setSeconds(i.second)},t.prototype.updateUI=function(){var t=this.value||this.defaultDate||new Date;if(Array.isArray(t)&&(t=t[0]),this.currentMonth=t.getMonth(),this.currentYear=t.getFullYear(),this.createMonths(this.currentMonth,this.currentYear),this.showTime||this.timeOnly){var e=t.getHours();"12"==this.hourFormat?(this.pm=e>11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=t.getHours(),this.currentMinute=t.getMinutes(),this.currentSecond=t.getSeconds()}},t.prototype.showOverlay=function(){this.overlayVisible||(this.updateUI(),this.overlayVisible=!0)},t.prototype.hideOverlay=function(){this.overlayVisible=!1,this.clearTimePickerTimer(),this.touchUI&&this.disableModality()},t.prototype.toggle=function(){this.inline||(this.overlayVisible?this.hideOverlay():(this.showOverlay(),this.inputfieldViewChild.nativeElement.focus()))},t.prototype.onOverlayAnimationStart=function(t){switch(t.toState){case"visible":case"visibleTouchUI":this.inline||(this.overlay=t.element,this.appendOverlay(),this.autoZIndex&&(this.overlay.style.zIndex=String(this.baseZIndex+ ++a.DomHandler.zindex)),this.alignOverlay(),this.onShow.emit(t));break;case"void":this.onOverlayHide(),this.onClose.emit(t)}},t.prototype.onOverlayAnimationDone=function(t){switch(t.toState){case"visible":case"visibleTouchUI":this.inline||(this.bindDocumentClickListener(),this.bindDocumentResizeListener())}},t.prototype.appendOverlay=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):a.DomHandler.appendChild(this.overlay,this.appendTo))},t.prototype.restoreOverlayAppend=function(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)},t.prototype.alignOverlay=function(){this.touchUI?this.enableModality(this.overlay):this.appendTo?a.DomHandler.absolutePosition(this.overlay,this.inputfieldViewChild.nativeElement):a.DomHandler.relativePosition(this.overlay,this.inputfieldViewChild.nativeElement)},t.prototype.enableModality=function(t){var e=this;if(!this.mask){this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(t.style.zIndex)-1);a.DomHandler.addMultipleClasses(this.mask,"ui-widget-overlay ui-datepicker-mask ui-datepicker-mask-scrollblocker"),this.maskClickListener=this.renderer.listen(this.mask,"click",(function(t){e.disableModality()})),document.body.appendChild(this.mask),a.DomHandler.addClass(document.body,"ui-overflow-hidden")}},t.prototype.disableModality=function(){if(this.mask){document.body.removeChild(this.mask);for(var t=document.body.children,e=void 0,n=0;n<t.length;n++){var i=t[n];if(a.DomHandler.hasClass(i,"ui-datepicker-mask-scrollblocker")){e=!0;break}}e||a.DomHandler.removeClass(document.body,"ui-overflow-hidden"),this.unbindMaskClickListener(),this.mask=null}},t.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},t.prototype.writeValue=function(t){this.value=t,this.value&&"string"==typeof this.value&&(this.value=this.parseValueFromString(this.value)),this.updateInputfield(),this.updateUI()},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype.getDateFormat=function(){return this.dateFormat||this.locale.dateFormat},t.prototype.formatDate=function(t,e){if(!t)return"";var n,i=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},o=function(t,e,n){var o=""+e;if(i(t))for(;o.length<n;)o="0"+o;return o},a=function(t,e,n,o){return i(t)?o[e]:n[e]},r="",s=!1;if(t)for(n=0;n<e.length;n++)if(s)"'"!==e.charAt(n)||i("'")?r+=e.charAt(n):s=!1;else switch(e.charAt(n)){case"d":r+=o("d",t.getDate(),2);break;case"D":r+=a("D",t.getDay(),this.locale.dayNamesShort,this.locale.dayNames);break;case"o":r+=o("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=o("m",t.getMonth()+1,2);break;case"M":r+=a("M",t.getMonth(),this.locale.monthNamesShort,this.locale.monthNames);break;case"y":r+=i("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=1e4*t.getTime()+this.ticksTo1970;break;case"'":i("'")?r+="'":s=!0;break;default:r+=e.charAt(n)}return r},t.prototype.formatTime=function(t){if(!t)return"";var e="",n=t.getHours(),i=t.getMinutes(),o=t.getSeconds();return"12"==this.hourFormat&&n>11&&12!=n&&(n-=12),"12"==this.hourFormat?e+=0===n?12:n<10?"0"+n:n:e+=n<10?"0"+n:n,e+=":",e+=i<10?"0"+i:i,this.showSeconds&&(e+=":",e+=o<10?"0"+o:o),"12"==this.hourFormat&&(e+=t.getHours()>11?" PM":" AM"),e},t.prototype.parseTime=function(t){var e=t.split(":"),n=this.showSeconds?3:2;if(e.length!==n)throw"Invalid time";var i=parseInt(e[0]),o=parseInt(e[1]),a=this.showSeconds?parseInt(e[2]):null;if(isNaN(i)||isNaN(o)||i>23||o>59||"12"==this.hourFormat&&i>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==i&&this.pm?i+=12:this.pm||12!==i||(i-=12)),{hour:i,minute:o,second:a}},t.prototype.parseDate=function(t,e){if(null==e||null==t)throw"Invalid arguments";if(""===(t="object"==typeof t?t.toString():t+""))return null;var n,i,o,a,r=0,s="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),l=-1,u=-1,h=-1,c=-1,p=!1,d=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},m=function(e){var n=d(e),i="@"===e?14:"!"===e?20:"y"===e&&n?4:"o"===e?3:2,o=new RegExp("^\\d{"+("y"===e?i:1)+","+i+"}"),a=t.substring(r).match(o);if(!a)throw"Missing number at position "+r;return r+=a[0].length,parseInt(a[0],10)},v=function(e,n,i){for(var o=-1,a=d(e)?i:n,s=[],l=0;l<a.length;l++)s.push([l,a[l]]);s.sort((function(t,e){return-(t[1].length-e[1].length)}));for(l=0;l<s.length;l++){var u=s[l][1];if(t.substr(r,u.length).toLowerCase()===u.toLowerCase()){o=s[l][0],r+=u.length;break}}if(-1!==o)return o+1;throw"Unknown name at position "+r},y=function(){if(t.charAt(r)!==e.charAt(n))throw"Unexpected literal at position "+r;r++};for("month"===this.view&&(h=1),n=0;n<e.length;n++)if(p)"'"!==e.charAt(n)||d("'")?y():p=!1;else switch(e.charAt(n)){case"d":h=m("d");break;case"D":v("D",this.locale.dayNamesShort,this.locale.dayNames);break;case"o":c=m("o");break;case"m":u=m("m");break;case"M":u=v("M",this.locale.monthNamesShort,this.locale.monthNames);break;case"y":l=m("y");break;case"@":l=(a=new Date(m("@"))).getFullYear(),u=a.getMonth()+1,h=a.getDate();break;case"!":l=(a=new Date((m("!")-this.ticksTo1970)/1e4)).getFullYear(),u=a.getMonth()+1,h=a.getDate();break;case"'":d("'")?y():p=!0;break;default:y()}if(r<t.length&&(o=t.substr(r),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===l?l=(new Date).getFullYear():l<100&&(l+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l<=s?0:-100)),c>-1)for(u=1,h=c;;){if(h<=(i=this.getDaysCountInMonth(l,u-1)))break;u++,h-=i}if((a=this.daylightSavingAdjust(new Date(l,u-1,h))).getFullYear()!==l||a.getMonth()+1!==u||a.getDate()!==h)throw"Invalid date";return a},t.prototype.daylightSavingAdjust=function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},t.prototype.updateFilledState=function(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue},t.prototype.onTodayButtonClick=function(t){var e=new Date,n={day:e.getDate(),month:e.getMonth(),year:e.getFullYear(),otherMonth:e.getMonth()!==this.currentMonth||e.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(t,n),this.onTodayClick.emit(t)},t.prototype.onClearButtonClick=function(t){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(t)},t.prototype.bindDocumentClickListener=function(){var t=this;this.documentClickListener||this.zone.runOutsideAngular((function(){t.documentClickListener=t.renderer.listen("document","click",(function(e){t.isOutsideClicked(e)&&t.overlayVisible&&t.zone.run((function(){t.hideOverlay(),t.onClickOutside.emit(e),t.cd.markForCheck()}))}))}))},t.prototype.unbindDocumentClickListener=function(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)},t.prototype.bindDocumentResizeListener=function(){this.documentResizeListener||this.touchUI||(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))},t.prototype.unbindDocumentResizeListener=function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},t.prototype.isOutsideClicked=function(t){return!(this.el.nativeElement.isSameNode(t.target)||this.isNavIconClicked(t)||this.el.nativeElement.contains(t.target)||this.overlay&&this.overlay.contains(t.target))},t.prototype.isNavIconClicked=function(t){return a.DomHandler.hasClass(t.target,"ui-datepicker-prev")||a.DomHandler.hasClass(t.target,"ui-datepicker-prev-icon")||a.DomHandler.hasClass(t.target,"ui-datepicker-next")||a.DomHandler.hasClass(t.target,"ui-datepicker-next-icon")},t.prototype.onWindowResize=function(){this.overlayVisible&&!a.DomHandler.isAndroid()&&this.hideOverlay()},t.prototype.onOverlayHide=function(){this.unbindDocumentClickListener(),this.unbindMaskClickListener(),this.unbindDocumentResizeListener(),this.overlay=null,this.disableModality()},t.prototype.ngOnDestroy=function(){this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.NgZone}]},l([e.Input()],t.prototype,"defaultDate",void 0),l([e.Input()],t.prototype,"style",void 0),l([e.Input()],t.prototype,"styleClass",void 0),l([e.Input()],t.prototype,"inputStyle",void 0),l([e.Input()],t.prototype,"inputId",void 0),l([e.Input()],t.prototype,"name",void 0),l([e.Input()],t.prototype,"inputStyleClass",void 0),l([e.Input()],t.prototype,"placeholder",void 0),l([e.Input()],t.prototype,"ariaLabelledBy",void 0),l([e.Input()],t.prototype,"disabled",void 0),l([e.Input()],t.prototype,"dateFormat",void 0),l([e.Input()],t.prototype,"multipleSeparator",void 0),l([e.Input()],t.prototype,"rangeSeparator",void 0),l([e.Input()],t.prototype,"inline",void 0),l([e.Input()],t.prototype,"showOtherMonths",void 0),l([e.Input()],t.prototype,"selectOtherMonths",void 0),l([e.Input()],t.prototype,"showIcon",void 0),l([e.Input()],t.prototype,"icon",void 0),l([e.Input()],t.prototype,"appendTo",void 0),l([e.Input()],t.prototype,"readonlyInput",void 0),l([e.Input()],t.prototype,"shortYearCutoff",void 0),l([e.Input()],t.prototype,"monthNavigator",void 0),l([e.Input()],t.prototype,"yearNavigator",void 0),l([e.Input()],t.prototype,"hourFormat",void 0),l([e.Input()],t.prototype,"timeOnly",void 0),l([e.Input()],t.prototype,"stepHour",void 0),l([e.Input()],t.prototype,"stepMinute",void 0),l([e.Input()],t.prototype,"stepSecond",void 0),l([e.Input()],t.prototype,"showSeconds",void 0),l([e.Input()],t.prototype,"required",void 0),l([e.Input()],t.prototype,"showOnFocus",void 0),l([e.Input()],t.prototype,"showWeek",void 0),l([e.Input()],t.prototype,"dataType",void 0),l([e.Input()],t.prototype,"selectionMode",void 0),l([e.Input()],t.prototype,"maxDateCount",void 0),l([e.Input()],t.prototype,"showButtonBar",void 0),l([e.Input()],t.prototype,"todayButtonStyleClass",void 0),l([e.Input()],t.prototype,"clearButtonStyleClass",void 0),l([e.Input()],t.prototype,"autoZIndex",void 0),l([e.Input()],t.prototype,"baseZIndex",void 0),l([e.Input()],t.prototype,"panelStyleClass",void 0),l([e.Input()],t.prototype,"panelStyle",void 0),l([e.Input()],t.prototype,"keepInvalid",void 0),l([e.Input()],t.prototype,"hideOnDateTimeSelect",void 0),l([e.Input()],t.prototype,"numberOfMonths",void 0),l([e.Input()],t.prototype,"view",void 0),l([e.Input()],t.prototype,"touchUI",void 0),l([e.Input()],t.prototype,"timeSeparator",void 0),l([e.Input()],t.prototype,"showTransitionOptions",void 0),l([e.Input()],t.prototype,"hideTransitionOptions",void 0),l([e.Output()],t.prototype,"onFocus",void 0),l([e.Output()],t.prototype,"onBlur",void 0),l([e.Output()],t.prototype,"onClose",void 0),l([e.Output()],t.prototype,"onSelect",void 0),l([e.Output()],t.prototype,"onInput",void 0),l([e.Output()],t.prototype,"onTodayClick",void 0),l([e.Output()],t.prototype,"onClearClick",void 0),l([e.Output()],t.prototype,"onMonthChange",void 0),l([e.Output()],t.prototype,"onYearChange",void 0),l([e.Output()],t.prototype,"onClickOutside",void 0),l([e.Output()],t.prototype,"onShow",void 0),l([e.ContentChildren(r.PrimeTemplate)],t.prototype,"templates",void 0),l([e.Input()],t.prototype,"tabindex",void 0),l([e.ViewChild("inputfield",{static:!1})],t.prototype,"inputfieldViewChild",void 0),l([e.ViewChild("contentWrapper",{static:!1})],t.prototype,"content",null),l([e.Input()],t.prototype,"minDate",null),l([e.Input()],t.prototype,"maxDate",null),l([e.Input()],t.prototype,"disabledDates",null),l([e.Input()],t.prototype,"disabledDays",null),l([e.Input()],t.prototype,"yearRange",null),l([e.Input()],t.prototype,"showTime",null),l([e.Input()],t.prototype,"locale",null),t=l([e.Component({selector:"p-calendar",template:'\n <span [ngClass]="{\'ui-calendar\':true, \'ui-calendar-w-btn\': showIcon, \'ui-calendar-timeonly\': timeOnly}" [ngStyle]="style" [class]="styleClass">\n <ng-template [ngIf]="!inline">\n <input #inputfield type="text" [attr.id]="inputId" [attr.name]="name" [attr.required]="required" [attr.aria-required]="required" [value]="inputFieldValue" (focus)="onInputFocus($event)" (keydown)="onInputKeydown($event)" (click)="onInputClick($event)" (blur)="onInputBlur($event)"\n [readonly]="readonlyInput" (input)="onUserInput($event)" [ngStyle]="inputStyle" [class]="inputStyleClass" [placeholder]="placeholder||\'\'" [disabled]="disabled" [attr.tabindex]="tabindex"\n [ngClass]="\'ui-inputtext ui-widget ui-state-default ui-corner-all\'" autocomplete="off" [attr.aria-labelledby]="ariaLabelledBy"\n ><button type="button" [icon]="icon" pButton *ngIf="showIcon" (click)="onButtonClick($event,inputfield)" class="ui-datepicker-trigger ui-calendar-button"\n [ngClass]="{\'ui-state-disabled\':disabled}" [disabled]="disabled" tabindex="0"></button>\n </ng-template>\n <div #contentWrapper [class]="panelStyleClass" [ngStyle]="panelStyle" [ngClass]="{\'ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all\': true, \'ui-datepicker-inline\':inline,\'ui-shadow\':!inline,\n \'ui-state-disabled\':disabled,\'ui-datepicker-timeonly\':timeOnly,\'ui-datepicker-multiple-month\': this.numberOfMonths > 1, \'ui-datepicker-monthpicker\': (view === \'month\'), \'ui-datepicker-touch-ui\': touchUI}"\n [@overlayAnimation]="touchUI ? {value: \'visibleTouchUI\', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}: \n {value: \'visible\', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" \n [@.disabled]="inline === true" (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationDone($event)" *ngIf="inline || overlayVisible">\n <ng-content select="p-header"></ng-content>\n <ng-container *ngIf="!timeOnly">\n <div class="ui-datepicker-group ui-widget-content" *ngFor="let month of months; let i = index;">\n <div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">\n <a class="ui-datepicker-prev ui-corner-all" (click)="onPrevButtonClick($event)" (keydown.enter)="onPrevButtonClick($event)" *ngIf="i === 0" tabindex="0" (keydown)="onInputKeydown($event)">\n <span class="ui-datepicker-prev-icon pi pi-chevron-left"></span>\n </a>\n <div class="ui-datepicker-title">\n <span class="ui-datepicker-month" *ngIf="!monthNavigator && (view !== \'month\')">{{locale.monthNames[month.month]}}</span>\n <select tabindex="0" class="ui-datepicker-month" *ngIf="monthNavigator && (view !== \'month\') && numberOfMonths === 1" (change)="onMonthDropdownChange($event.target.value)">\n <option [value]="i" *ngFor="let monthName of locale.monthNames;let i = index" [selected]="i === month.month">{{monthName}}</option>\n </select>\n <select tabindex="0" class="ui-datepicker-year" *ngIf="yearNavigator && numberOfMonths === 1" (change)="onYearDropdownChange($event.target.value)">\n <option [value]="year" *ngFor="let year of yearOptions" [selected]="year === currentYear">{{year}}</option>\n </select>\n <span class="ui-datepicker-year" *ngIf="!yearNavigator">{{view === \'month\' ? currentYear : month.year}}</span>\n </div>\n <a class="ui-datepicker-next ui-corner-all" (click)="onNextButtonClick($event)" (keydown.enter)="onNextButtonClick($event)" *ngIf="numberOfMonths === 1 ? true : (i === numberOfMonths -1)" tabindex="0" (keydown)="onInputKeydown($event)">\n <span class="ui-datepicker-next-icon pi pi-chevron-right"></span>\n </a>\n </div>\n <div class="ui-datepicker-calendar-container" *ngIf="view ===\'date\'">\n <table class="ui-datepicker-calendar">\n <thead>\n <tr>\n <th *ngIf="showWeek" class="ui-datepicker-weekheader">\n <span>{{locale[\'weekHeader\']}}</span>\n </th>\n <th scope="col" *ngFor="let weekDay of weekDays;let begin = first; let end = last">\n <span>{{weekDay}}</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let week of month.dates; let j = index;">\n <td *ngIf="showWeek" class="ui-datepicker-weeknumber ui-state-disabled">\n <span>\n {{month.weekNumbers[j]}}\n </span>\n </td>\n <td *ngFor="let date of week" [ngClass]="{\'ui-datepicker-other-month\': date.otherMonth,\n \'ui-datepicker-current-day\':isSelected(date),\'ui-datepicker-today\':date.today}">\n <ng-container *ngIf="date.otherMonth ? showOtherMonths : true">\n <a class="ui-state-default" *ngIf="date.selectable" [ngClass]="{\'ui-state-active\':isSelected(date), \'ui-state-highlight\':date.today}"\n (click)="onDateSelect($event,date)" draggable="false" (keydown)="onDateCellKeydown($event,date,i)">\n <ng-container *ngIf="!dateTemplate">{{date.day}}</ng-container>\n <ng-container *ngTemplateOutlet="dateTemplate; context: {$implicit: date}"></ng-container>\n </a>\n <span class="ui-state-default ui-state-disabled" [ngClass]="{\'ui-state-active\':isSelected(date), \'ui-state-highlight\':date.today}" *ngIf="!date.selectable">\n <ng-container *ngIf="!disabledDateTemplate">{{date.day}}</ng-container>\n <ng-container *ngTemplateOutlet="disabledDateTemplate; context: {$implicit: date}"></ng-container>\n </span>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class="ui-monthpicker" *ngIf="view === \'month\'">\n <a *ngFor="let m of monthPickerValues; let i = index" (click)="onMonthSelect($event, i)" (keydown)="onMonthCellKeydown($event,i)" class="ui-monthpicker-month" [ngClass]="{\'ui-state-active\': isMonthSelected(i), \'ui-state-disabled\':!isSelectable(1, i, this.currentYear, false)}">\n {{m}}\n </a>\n </div>\n </ng-container>\n <div class="ui-timepicker ui-widget-header ui-corner-all" *ngIf="showTime||timeOnly">\n <div class="ui-hour-picker">\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (keydown.enter)="incrementHour($event)" (mousedown)="onTimePickerElementMouseDown($event, 0, 1)" (mouseup)="onTimePickerElementMouseUp($event)" (mouseout)="onTimePickerElementMouseOut($event