UNPKG

55.8 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(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"],t):t(((e=e||self).primeng=e.primeng||{},e.primeng.calendar={}),e.ng.core,e.ng.animations,e.ng.common,e.primeng.button,e.primeng.dom,e.primeng.api,e.ng.forms)}(this,(function(e,t,n,i,o,a,r,s){"use strict";var l=this&&this.__decorate||function(e,t,n,i){var o,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,n,r):o(t,n))||r);return a>3&&r&&Object.defineProperty(t,n,r),r},u=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}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 e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},p={provide:s.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return d})),multi:!0},d=function(){function e(e,n,i,o){this.el=e,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=!0,this.numberOfMonths=1,this.view="date",this.timeSeparator=":",this.showTransitionOptions="225ms ease-out",this.hideTransitionOptions="195ms ease-in",this.onFocus=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClose=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onInput=new t.EventEmitter,this.onTodayClick=new t.EventEmitter,this.onClearClick=new t.EventEmitter,this.onMonthChange=new t.EventEmitter,this.onYearChange=new t.EventEmitter,this.onClickOutside=new t.EventEmitter,this.onShow=new t.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,this.convertTo24Hour=function(e,t){return"12"==this.hourFormat?12===e?t?12:0:t?e+12:e:e}}return Object.defineProperty(e.prototype,"content",{set:function(e){var t=this;this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then((function(){return t.updateFocus()})),this.isMonthNavigate=!1):this.initFocusableCell())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabledDates",{get:function(){return this._disabledDates},set:function(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabledDays",{get:function(){return this._disabledDays},set:function(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yearRange",{get:function(){return this._yearRange},set:function(e){if(this._yearRange=e,e){var t=e.split(":"),n=parseInt(t[0]),i=parseInt(t[1]);this.populateYearOptions(n,i)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTime",{get:function(){return this._showTime},set:function(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale},set:function(e){this._locale=e,"date"===this.view?(this.createWeekDays(),this.createMonths(this.currentMonth,this.currentYear)):"month"===this.view&&this.createMonthPickerValues()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.defaultDate||new Date;this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),"date"===this.view?(this.createWeekDays(),this.initTime(e),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()},e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"date":e.dateTemplate=t.template;break;case"disabledDate":e.disabledDateTemplate=t.template;break;default:e.dateTemplate=t.template}}))},e.prototype.populateYearOptions=function(e,t){this.yearOptions=[];for(var n=e;n<=t;n++)this.yearOptions.push(n)},e.prototype.createWeekDays=function(){this.weekDays=[];for(var e=this.locale.firstDayOfWeek,t=0;t<7;t++)this.weekDays.push(this.locale.dayNamesMin[e]),e=6==e?0:++e},e.prototype.createMonthPickerValues=function(){this.monthPickerValues=[];for(var e=0;e<=11;e++)this.monthPickerValues.push(this.locale.monthNamesShort[e])},e.prototype.createMonths=function(e,t){this.months=this.months=[];for(var n=0;n<this.numberOfMonths;n++){var i=e+n,o=t;i>11&&(i=i%11-1,o=t+1),this.months.push(this.createMonth(i,o))}},e.prototype.getWeekNumber=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},e.prototype.createMonth=function(e,t){for(var n=[],i=this.getFirstDayOfMonthIndex(e,t),o=this.getDaysCountInMonth(e,t),a=this.getDaysCountInPrevMonth(e,t),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(e,t);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:e,year:t,today:this.isToday(s,r,e,t),selectable:this.isSelectable(r,e,t,!1)}),r++}else for(p=0;p<7;p++){if(r>o){var v=this.getNextMonthAndYear(e,t);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:e,year:t,today:this.isToday(s,r,e,t),selectable:this.isSelectable(r,e,t,!1)});r++}this.showWeek&&l.push(this.getWeekNumber(new Date(c[0].year,c[0].month,c[0].day))),n.push(c)}return{month:e,year:t,dates:n,weekNumbers:l}},e.prototype.initTime=function(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)},e.prototype.navBackward=function(e){var t=this;e.stopPropagation(),this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.view?(this.decrementYear(),setTimeout((function(){t.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)))},e.prototype.navForward=function(e){var t=this;e.stopPropagation(),this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.view?(this.incrementYear(),setTimeout((function(){t.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)))},e.prototype.decrementYear=function(){if(this.currentYear--,this.yearNavigator&&this.currentYear<this.yearOptions[0]){var e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]-e,this.yearOptions[this.yearOptions.length-1]-e)}},e.prototype.incrementYear=function(){if(this.currentYear++,this.yearNavigator&&this.currentYear>this.yearOptions[this.yearOptions.length-1]){var e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}},e.prototype.onDateSelect=function(e,t){var n=this;!this.disabled&&t.selectable?(this.isMultipleSelection()&&this.isSelected(t)?(this.value=this.value.filter((function(e,i){return!n.isDateEquals(e,t)})),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(t)&&this.selectDate(t),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout((function(){e.preventDefault(),n.hideOverlay(),n.mask&&n.disableModality(),n.cd.markForCheck()}),150),this.updateInputfield(),e.preventDefault()):e.preventDefault()},e.prototype.shouldSelectDate=function(e){return!this.isMultipleSelection()||(null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0))},e.prototype.onMonthSelect=function(e,t){a.DomHandler.hasClass(e.target,"ui-state-disabled")||this.onDateSelect(e,{year:this.currentYear,month:t,day:1,selectable:!0})},e.prototype.updateInputfield=function(){var e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(var t=0;t<this.value.length;t++){e+=this.formatDateTime(this.value[t]),t!==this.value.length-1&&(e+=this.multipleSeparator+" ")}else if(this.isRangeSelection()&&this.value&&this.value.length){var n=this.value[0],i=this.value[1];e=this.formatDateTime(n),i&&(e+=" "+this.rangeSeparator+" "+this.formatDateTime(i))}this.inputFieldValue=e,this.updateFilledState(),this.inputfieldViewChild&&this.inputfieldViewChild.nativeElement&&(this.inputfieldViewChild.nativeElement.value=this.inputFieldValue)},e.prototype.formatDateTime=function(e){var t=null;return e&&(this.timeOnly?t=this.formatTime(e):(t=this.formatDate(e,this.getDateFormat()),this.showTime&&(t+=" "+this.formatTime(e)))),t},e.prototype.setCurrentHourPM=function(e){"12"==this.hourFormat?(this.pm=e>11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e},e.prototype.selectDate=function(e){var t=new Date(e.year,e.month,e.day);if(this.showTime&&("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.minDate&&this.minDate>t&&(t=this.minDate,this.setCurrentHourPM(t.getHours()),this.currentMinute=t.getMinutes(),this.currentSecond=t.getSeconds()),this.maxDate&&this.maxDate<t&&(t=this.maxDate,this.setCurrentHourPM(t.getHours()),this.currentMinute=t.getMinutes(),this.currentSecond=t.getSeconds()),this.isSingleSelection())this.updateModel(t);else if(this.isMultipleSelection())this.updateModel(this.value?h(this.value,[t]):[t]);else if(this.isRangeSelection())if(this.value&&this.value.length){var n=this.value[0],i=this.value[1];!i&&t.getTime()>=n.getTime()?i=t:(n=t,i=null),this.updateModel([n,i])}else this.updateModel([t,null]);this.onSelect.emit(t)},e.prototype.updateModel=function(e){var t=this;if(this.value=e,"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(e){return t.formatDateTime(e)}))),this.onModelChange(n)}},e.prototype.getFirstDayOfMonthIndex=function(e,t){var n=new Date;n.setDate(1),n.setMonth(e),n.setFullYear(t);var i=n.getDay()+this.getSundayIndex();return i>=7?i-7:i},e.prototype.getDaysCountInMonth=function(e,t){return 32-this.daylightSavingAdjust(new Date(t,e,32)).getDate()},e.prototype.getDaysCountInPrevMonth=function(e,t){var n=this.getPreviousMonthAndYear(e,t);return this.getDaysCountInMonth(n.month,n.year)},e.prototype.getPreviousMonthAndYear=function(e,t){var n,i;return 0===e?(n=11,i=t-1):(n=e-1,i=t),{month:n,year:i}},e.prototype.getNextMonthAndYear=function(e,t){var n,i;return 11===e?(n=0,i=t+1):(n=e+1,i=t),{month:n,year:i}},e.prototype.getSundayIndex=function(){return this.locale.firstDayOfWeek>0?7-this.locale.firstDayOfWeek:0},e.prototype.isSelected=function(e){var t,n;if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);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,e))break}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0},e.prototype.isMonthSelected=function(e){var t=this.value?Array.isArray(this.value)?this.value[0].getDate():this.value.getDate():1;return this.isSelected({year:this.currentYear,month:e,day:t,selectable:!0})},e.prototype.isDateEquals=function(e,t){return!!e&&(e.getDate()===t.day&&e.getMonth()===t.month&&e.getFullYear()===t.year)},e.prototype.isDateBetween=function(e,t,n){if(e&&t){var i=new Date(n.year,n.month,n.day);return e.getTime()<=i.getTime()&&t.getTime()>=i.getTime()}return!1},e.prototype.isSingleSelection=function(){return"single"===this.selectionMode},e.prototype.isRangeSelection=function(){return"range"===this.selectionMode},e.prototype.isMultipleSelection=function(){return"multiple"===this.selectionMode},e.prototype.isToday=function(e,t,n,i){return e.getDate()===t&&e.getMonth()===n&&e.getFullYear()===i},e.prototype.isSelectable=function(e,t,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()>t?o=!1:this.minDate.getMonth()===t&&this.minDate.getDate()>e&&(o=!1))),this.maxDate&&(this.maxDate.getFullYear()<n?a=!1:this.maxDate.getFullYear()===n&&(this.maxDate.getMonth()<t?a=!1:this.maxDate.getMonth()===t&&this.maxDate.getDate()<e&&(a=!1))),this.disabledDates&&(r=!this.isDateDisabled(e,t,n)),this.disabledDays&&(s=!this.isDayDisabled(e,t,n)),o&&a&&r&&s)},e.prototype.isDateDisabled=function(e,t,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()===t&&s.getDate()===e)return!0}}catch(e){i={error:e}}finally{try{r&&!r.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return!1},e.prototype.isDayDisabled=function(e,t,n){if(this.disabledDays){var i=new Date(n,t,e).getDay();return-1!==this.disabledDays.indexOf(i)}return!1},e.prototype.onInputFocus=function(e){this.focus=!0,this.showOnFocus&&this.showOverlay(),this.onFocus.emit(e)},e.prototype.onInputClick=function(){this.overlay&&this.autoZIndex&&(this.overlay.style.zIndex=String(this.baseZIndex+ ++a.DomHandler.zindex)),this.showOnFocus&&!this.overlayVisible&&this.showOverlay()},e.prototype.onInputBlur=function(e){this.focus=!1,this.onBlur.emit(e),this.keepInvalid||this.updateInputfield(),this.onModelTouched()},e.prototype.onButtonClick=function(e,t){this.overlayVisible?this.hideOverlay():(t.focus(),this.showOverlay())},e.prototype.onPrevButtonClick=function(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)},e.prototype.onNextButtonClick=function(e){this.navigationState={backward:!1,button:!0},this.navForward(e)},e.prototype.onContainerButtonKeydown=function(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}},e.prototype.onInputKeydown=function(e){this.isKeydown=!0,9===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode&&this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault())},e.prototype.onDateCellKeydown=function(e,t,n){var i=e.currentTarget,o=i.parentElement;switch(e.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(e)):(s.children[r].children[0].tabIndex="0",s.children[r].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.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(e)):(l.tabIndex="0",l.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.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);e.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);e.preventDefault();break;case 13:this.onDateSelect(e,t),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}},e.prototype.onMonthCellKeydown=function(e,t){var n=e.currentTarget;switch(e.which){case 38:case 40:n.tabIndex="-1";var i=n.parentElement.children,o=a.DomHandler.index(n);(s=i[40===e.which?o+3:o-3])&&(s.tabIndex="0",s.focus()),e.preventDefault();break;case 37:n.tabIndex="-1";var r=n.previousElementSibling;r&&(r.tabIndex="0",r.focus()),e.preventDefault();break;case 39:var s;n.tabIndex="-1",(s=n.nextElementSibling)&&(s.tabIndex="0",s.focus()),e.preventDefault();break;case 13:this.onMonthSelect(e,t),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}},e.prototype.navigateToMonth=function(e,t){if(e)if(1===this.numberOfMonths||0===t)this.navigationState={backward:!0},this.navBackward(event);else{var n=this.contentViewChild.nativeElement.children[t-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||t===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{var o,r=this.contentViewChild.nativeElement.children[t+1];(o=a.DomHandler.findSingle(r,".ui-datepicker-calendar td a")).tabIndex="0",o.focus()}},e.prototype.updateFocus=function(){var e;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 t=a.DomHandler.find(this.contentViewChild.nativeElement,".ui-datepicker-calendar td a");e=t[t.length-1]}else e=a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-datepicker-calendar td a");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()},e.prototype.initFocusableCell=function(){var e;if("month"===this.view){var t=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(t.forEach((function(e){return e.tabIndex=-1})),e=n||t[0],0===t.length)a.DomHandler.find(this.contentViewChild.nativeElement,'.ui-monthpicker .ui-monthpicker-month.ui-state-disabled[tabindex = "0"]').forEach((function(e){return e.tabIndex=-1}))}else if(!(e=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)");e=i||a.DomHandler.findSingle(this.contentViewChild.nativeElement,".ui-datepicker-calendar td a")}e&&(e.tabIndex="0")},e.prototype.trapFocus=function(e){e.preventDefault();var t=a.DomHandler.getFocusableElements(this.contentViewChild.nativeElement);if(t&&t.length>0)if(document.activeElement){var n=t.indexOf(document.activeElement);e.shiftKey?-1==n||0===n?t[t.length-1].focus():t[n-1].focus():-1==n||n===t.length-1?t[0].focus():t[n+1].focus()}else t[0].focus()},e.prototype.onMonthDropdownChange=function(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)},e.prototype.onYearDropdownChange=function(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)},e.prototype.validateTime=function(e,t,n,i){var o=this.value,a=this.convertTo24Hour(e,i);this.isRangeSelection()&&(o=this.value[1]||this.value[0]),this.isMultipleSelection()&&(o=this.value[this.value.length-1]);var r=o?o.toDateString():null;if(this.minDate&&r&&this.minDate.toDateString()===r){if(this.minDate.getHours()>a)return!1;if(this.minDate.getHours()===a){if(this.minDate.getMinutes()>t)return!1;if(this.minDate.getMinutes()===t&&this.minDate.getSeconds()>n)return!1}}if(this.maxDate&&r&&this.maxDate.toDateString()===r){if(this.maxDate.getHours()<a)return!1;if(this.maxDate.getHours()===a){if(this.maxDate.getMinutes()<t)return!1;if(this.maxDate.getMinutes()===t&&this.maxDate.getSeconds()<n)return!1}}return!0},e.prototype.incrementHour=function(e){var t=this.currentHour,n=this.currentHour+this.stepHour,i=this.pm;"24"==this.hourFormat?n=n>=24?n-24:n:"12"==this.hourFormat&&(t<12&&n>11&&(i=!this.pm),n=n>=13?n-12:n),this.validateTime(n,this.currentMinute,this.currentSecond,i)&&(this.currentHour=n,this.pm=i),e.preventDefault()},e.prototype.onTimePickerElementMouseDown=function(e,t,n){this.disabled||(this.repeat(e,null,t,n),e.preventDefault())},e.prototype.onTimePickerElementMouseUp=function(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())},e.prototype.onTimePickerElementMouseOut=function(e){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())},e.prototype.repeat=function(e,t,n,i){var o=this,a=t||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout((function(){o.repeat(e,100,n,i)}),a),n){case 0:1===i?this.incrementHour(e):this.decrementHour(e);break;case 1:1===i?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===i?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()},e.prototype.clearTimePickerTimer=function(){this.timePickerTimer&&clearTimeout(this.timePickerTimer)},e.prototype.decrementHour=function(e){var t=this.currentHour-this.stepHour,n=this.pm;"24"==this.hourFormat?t=t<0?24+t:t:"12"==this.hourFormat&&(12===this.currentHour&&(n=!this.pm),t=t<=0?12+t:t),this.validateTime(t,this.currentMinute,this.currentSecond,n)&&(this.currentHour=t,this.pm=n),e.preventDefault()},e.prototype.incrementMinute=function(e){var t=this.currentMinute+this.stepMinute;t=t>59?t-60:t,this.validateTime(this.currentHour,t,this.currentSecond,this.pm)&&(this.currentMinute=t),e.preventDefault()},e.prototype.decrementMinute=function(e){var t=this.currentMinute-this.stepMinute;t=t<0?60+t:t,this.validateTime(this.currentHour,t,this.currentSecond,this.pm)&&(this.currentMinute=t),e.preventDefault()},e.prototype.incrementSecond=function(e){var t=this.currentSecond+this.stepSecond;t=t>59?t-60:t,this.validateTime(this.currentHour,this.currentMinute,t,this.pm)&&(this.currentSecond=t),e.preventDefault()},e.prototype.decrementSecond=function(e){var t=this.currentSecond-this.stepSecond;t=t<0?60+t:t,this.validateTime(this.currentHour,this.currentMinute,t,this.pm)&&(this.currentSecond=t),e.preventDefault()},e.prototype.updateTime=function(){var e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,"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.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=h(this.value.slice(0,-1),[e])),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()},e.prototype.toggleAMPM=function(e){var t=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,t)&&(this.pm=t,this.updateTime()),e.preventDefault()},e.prototype.onUserInput=function(e){if(this.isKeydown){this.isKeydown=!1;var t=e.target.value;try{var n=this.parseValueFromString(t);this.isValidSelection(n)&&(this.updateModel(n),this.updateUI())}catch(e){this.updateModel(null)}this.filled=null!=t&&t.length,this.onInput.emit(e)}},e.prototype.isValidSelection=function(e){var t=this,n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every((function(e){return t.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)}))&&this.isRangeSelection()&&(n=e.length>1&&e[1]>e[0]),n},e.prototype.parseValueFromString=function(e){var t,n,i;if(!e||0===e.trim().length)return null;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){var o=e.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(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}else if(this.isRangeSelection()){o=e.split(" "+this.rangeSeparator+" ");i=[];for(var l=0;l<o.length;l++)i[l]=this.parseDateTime(o[l].trim())}return i},e.prototype.parseDateTime=function(e){var t,n=e.split(" ");if(this.timeOnly)t=new Date,this.populateTime(t,n[0],n[1]);else{var i=this.getDateFormat();if(this.showTime){var o="12"==this.hourFormat?n.pop():null,a=n.pop();t=this.parseDate(n.join(" "),i),this.populateTime(t,a,o)}else t=this.parseDate(e,i)}return t},e.prototype.populateTime=function(e,t,n){if("12"==this.hourFormat&&!n)throw"Invalid Time";this.pm="PM"===n||"pm"===n;var i=this.parseTime(t);e.setHours(i.hour),e.setMinutes(i.minute),e.setSeconds(i.second)},e.prototype.updateUI=function(){var e=this.value||this.defaultDate||new Date;Array.isArray(e)&&(e=e[0]),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.createMonths(this.currentMonth,this.currentYear),(this.showTime||this.timeOnly)&&(this.setCurrentHourPM(e.getHours()),this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds())},e.prototype.showOverlay=function(){this.overlayVisible||(this.updateUI(),this.overlayVisible=!0)},e.prototype.hideOverlay=function(){this.overlayVisible=!1,this.clearTimePickerTimer(),this.touchUI&&this.disableModality()},e.prototype.toggle=function(){this.inline||(this.overlayVisible?this.hideOverlay():(this.showOverlay(),this.inputfieldViewChild.nativeElement.focus()))},e.prototype.onOverlayAnimationStart=function(e){switch(e.toState){case"visible":case"visibleTouchUI":this.inline||(this.overlay=e.element,this.appendOverlay(),this.autoZIndex&&(this.overlay.style.zIndex=String(this.baseZIndex+ ++a.DomHandler.zindex)),this.alignOverlay(),this.onShow.emit(e));break;case"void":this.onOverlayHide(),this.onClose.emit(e)}},e.prototype.onOverlayAnimationDone=function(e){switch(e.toState){case"visible":case"visibleTouchUI":this.inline||(this.bindDocumentClickListener(),this.bindDocumentResizeListener())}},e.prototype.appendOverlay=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):a.DomHandler.appendChild(this.overlay,this.appendTo))},e.prototype.restoreOverlayAppend=function(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)},e.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)},e.prototype.enableModality=function(e){var t=this;if(!this.mask){this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(e.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(e){t.disableModality()})),document.body.appendChild(this.mask),a.DomHandler.addClass(document.body,"ui-overflow-hidden")}},e.prototype.disableModality=function(){if(this.mask){document.body.removeChild(this.mask);for(var e=document.body.children,t=void 0,n=0;n<e.length;n++){var i=e[n];if(a.DomHandler.hasClass(i,"ui-datepicker-mask-scrollblocker")){t=!0;break}}t||a.DomHandler.removeClass(document.body,"ui-overflow-hidden"),this.unbindMaskClickListener(),this.mask=null}},e.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},e.prototype.writeValue=function(e){this.value=e,this.value&&"string"==typeof this.value&&(this.value=this.parseValueFromString(this.value)),this.updateInputfield(),this.updateUI()},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.getDateFormat=function(){return this.dateFormat||this.locale.dateFormat},e.prototype.formatDate=function(e,t){if(!e)return"";var n,i=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},o=function(e,t,n){var o=""+t;if(i(e))for(;o.length<n;)o="0"+o;return o},a=function(e,t,n,o){return i(e)?o[t]:n[t]},r="",s=!1;if(e)for(n=0;n<t.length;n++)if(s)"'"!==t.charAt(n)||i("'")?r+=t.charAt(n):s=!1;else switch(t.charAt(n)){case"d":r+=o("d",e.getDate(),2);break;case"D":r+=a("D",e.getDay(),this.locale.dayNamesShort,this.locale.dayNames);break;case"o":r+=o("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=o("m",e.getMonth()+1,2);break;case"M":r+=a("M",e.getMonth(),this.locale.monthNamesShort,this.locale.monthNames);break;case"y":r+=i("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":r+=e.getTime();break;case"!":r+=1e4*e.getTime()+this.ticksTo1970;break;case"'":i("'")?r+="'":s=!0;break;default:r+=t.charAt(n)}return r},e.prototype.formatTime=function(e){if(!e)return"";var t="",n=e.getHours(),i=e.getMinutes(),o=e.getSeconds();return"12"==this.hourFormat&&n>11&&12!=n&&(n-=12),"12"==this.hourFormat?t+=0===n?12:n<10?"0"+n:n:t+=n<10?"0"+n:n,t+=":",t+=i<10?"0"+i:i,this.showSeconds&&(t+=":",t+=o<10?"0"+o:o),"12"==this.hourFormat&&(t+=e.getHours()>11?" PM":" AM"),t},e.prototype.parseTime=function(e){var t=e.split(":"),n=this.showSeconds?3:2;if(t.length!==n)throw"Invalid time";var i=parseInt(t[0]),o=parseInt(t[1]),a=this.showSeconds?parseInt(t[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}},e.prototype.parseDate=function(e,t){if(null==t||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))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(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},m=function(t){var n=d(t),i="@"===t?14:"!"===t?20:"y"===t&&n?4:"o"===t?3:2,o=new RegExp("^\\d{"+("y"===t?i:1)+","+i+"}"),a=e.substring(r).match(o);if(!a)throw"Missing number at position "+r;return r+=a[0].length,parseInt(a[0],10)},v=function(t,n,i){for(var o=-1,a=d(t)?i:n,s=[],l=0;l<a.length;l++)s.push([l,a[l]]);s.sort((function(e,t){return-(e[1].length-t[1].length)}));for(l=0;l<s.length;l++){var u=s[l][1];if(e.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(e.charAt(r)!==t.charAt(n))throw"Unexpected literal at position "+r;r++};for("month"===this.view&&(h=1),n=0;n<t.length;n++)if(p)"'"!==t.charAt(n)||d("'")?y():p=!1;else switch(t.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<e.length&&(o=e.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},e.prototype.daylightSavingAdjust=function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},e.prototype.updateFilledState=function(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue},e.prototype.onTodayButtonClick=function(e){var t=new Date,n={day:t.getDate(),month:t.getMonth(),year:t.getFullYear(),otherMonth:t.getMonth()!==this.currentMonth||t.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,n),this.onTodayClick.emit(e)},e.prototype.onClearButtonClick=function(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)},e.prototype.bindDocumentClickListener=function(){var e=this;this.documentClickListener||this.zone.runOutsideAngular((function(){e.documentClickListener=e.renderer.listen("document","click",(function(t){e.isOutsideClicked(t)&&e.overlayVisible&&e.zone.run((function(){e.hideOverlay(),e.onClickOutside.emit(t),e.cd.markForCheck()}))}))}))},e.prototype.unbindDocumentClickListener=function(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)},e.prototype.bindDocumentResizeListener=function(){this.documentResizeListener||this.touchUI||(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))},e.prototype.unbindDocumentResizeListener=function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},e.prototype.isOutsideClicked=function(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},e.prototype.isNavIconClicked=function(e){return a.DomHandler.hasClass(e.target,"ui-datepicker-prev")||a.DomHandler.hasClass(e.target,"ui-datepicker-prev-icon")||a.DomHandler.hasClass(e.target,"ui-datepicker-next")||a.DomHandler.hasClass(e.target,"ui-datepicker-next-icon")},e.prototype.onWindowResize=function(){this.overlayVisible&&!a.DomHandler.isAndroid()&&this.hideOverlay()},e.prototype.onOverlayHide=function(){this.unbindDocumentClickListener(),this.unbindMaskClickListener(),this.unbindDocumentResizeListener(),this.overlay=null,this.disableModality()},e.prototype.ngOnDestroy=function(){this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ChangeDetectorRef},{type:t.NgZone}]},l([t.Input()],e.prototype,"defaultDate",void 0),l([t.Input()],e.prototype,"style",void 0),l([t.Input()],e.prototype,"styleClass",void 0),l([t.Input()],e.prototype,"inputStyle",void 0),l([t.Input()],e.prototype,"inputId",void 0),l([t.Input()],e.prototype,"name",void 0),l([t.Input()],e.prototype,"inputStyleClass",void 0),l([t.Input()],e.prototype,"placeholder",void 0),l([t.Input()],e.prototype,"ariaLabelledBy",void 0),l([t.Input()],e.prototype,"disabled",void 0),l([t.Input()],e.prototype,"dateFormat",void 0),l([t.Input()],e.prototype,"multipleSeparator",void 0),l([t.Input()],e.prototype,"rangeSeparator",void 0),l([t.Input()],e.prototype,"inline",void 0),l([t.Input()],e.prototype,"showOtherMonths",void 0),l([t.Input()],e.prototype,"selectOtherMonths",void 0),l([t.Input()],e.prototype,"showIcon",void 0),l([t.Input()],e.prototype,"icon",void 0),l([t.Input()],e.prototype,"appendTo",void 0),l([t.Input()],e.prototype,"readonlyInput",void 0),l([t.Input()],e.prototype,"shortYearCutoff",void 0),l([t.Input()],e.prototype,"monthNavigator",void 0),l([t.Input()],e.prototype,"yearNavigator",void 0),l([t.Input()],e.prototype,"hourFormat",void 0),l([t.Input()],e.prototype,"timeOnly",void 0),l([t.Input()],e.prototype,"stepHour",void 0),l([t.Input()],e.prototype,"stepMinute",void 0),l([t.Input()],e.prototype,"stepSecond",void 0),l([t.Input()],e.prototype,"showSeconds",void 0),l([t.Input()],e.prototype,"required",void 0),l([t.Input()],e.prototype,"showOnFocus",void 0),l([t.Input()],e.prototype,"showWeek",void 0),l([t.Input()],e.prototype,"dataType",void 0),l([t.Input()],e.prototype,"selectionMode",void 0),l([t.Input()],e.prototype,"maxDateCount",void 0),l([t.Input()],e.prototype,"showButtonBar",void 0),l([t.Input()],e.prototype,"todayButtonStyleClass",void 0),l([t.Input()],e.prototype,"clearButtonStyleClass",void 0),l([t.Input()],e.prototype,"autoZIndex",void 0),l([t.Input()],e.prototype,"baseZIndex",void 0),l([t.Input()],e.prototype,"panelStyleClass",void 0),l([t.Input()],e.prototype,"panelStyle",void 0),l([t.Input()],e.prototype,"keepInvalid",void 0),l([t.Input()],e.prototype,"hideOnDateTimeSelect",void 0),l([t.Input()],e.prototype,"numberOfMonths",void 0),l([t.Input()],e.prototype,"view",void 0),l([t.Input()],e.prototype,"touchUI",void 0),l([t.Input()],e.prototype,"timeSeparator",void 0),l([t.Input()],e.prototype,"showTransitionOptions",void 0),l([t.Input()],e.prototype,"hideTransitionOptions",void 0),l([t.Output()],e.prototype,"onFocus",void 0),l([t.Output()],e.prototype,"onBlur",void 0),l([t.Output()],e.prototype,"onClose",void 0),l([t.Output()],e.prototype,"onSelect",void 0),l([t.Output()],e.prototype,"onInput",void 0),l([t.Output()],e.prototype,"onTodayClick",void 0),l([t.Output()],e.prototype,"onClearClick",void 0),l([t.Output()],e.prototype,"onMonthChange",void 0),l([t.Output()],e.prototype,"onYearChange",void 0),l([t.Output()],e.prototype,"onClickOutside",void 0),l([t.Output()],e.prototype,"onShow",void 0),l([t.ContentChildren(r.PrimeTemplate)],e.prototype,"templates",void 0),l([t.Input()],e.prototype,"tabindex",void 0),l([t.ViewChild("inputfield",{static:!1})],e.prototype,"inputfieldViewChild",void 0),l([t.ViewChild("contentWrapper",{static:!1})],e.prototype,"content",null),l([t.Input()],e.prototype,"minDate",null),l([t.Input()],e.prototype,"maxDate",null),l([t.Input()],e.prototype,"disabledDates",null),l([t.Input()],e.prototype,"disabledDays",null),l([t.Input()],e.prototype,"yearRange",null),l([t.Input()],e.prototype,"showTime",null),l([t.Input()],e.prototype,"locale",null),e=l([t.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()" (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)">\n <span class="pi pi-chevron-up"></span>\n </a>\n <span [ngStyle]="{\'display\': currentHour < 10 ? \'inline\': \'none\'}">0</span><span>{{currentHour}}</span>\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (keydown.enter)="decrementHour($event)" (mousedown)="onTimePickerElementMouseDown($event, 0, -1)" (mouseup)="onTimePickerElementMouseUp($event)" (mouseout)="onTimePickerElementMouseOut($event)">\n <span class="pi pi-chevron-down"></span>\n </a>\n </div>\n <div class="ui-separator">\n <a>\n <span class="pi pi-chevron-up"></span>\n </a>\n <span>{{timeSeparator}}</span>\n <a>\n <span class="pi pi-chevron-down"></span>\n </a>\n </div>\n <div class="ui-minute-picker">\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (keydown.enter)="incrementMinute($event)" (mousedown)="onTimePickerElementMouseDown($event, 1, 1)" (mouseup)="onTimePickerElementMouseUp($event)" (mouseout)="onTimePickerElementMouseOut($event)">\n <span class="pi pi-chevron-up"></span>\n </a>\n <span [ngStyle]="{\'display\': currentMinute < 10 ? \'inline\': \'none\'}">0</span><span>{{currentMinute}}</span>\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (keydown.enter)="decrementMinute($event)" (mousedown)="onTimePickerElementMouseDown($event, 1, -1)" (mouseup)="onTimePickerElementMouseUp($event)" (mouseout)="onTimePickerElementMouseOut($event)">\n <span class="pi pi-chevron-down"></span>\n </a>\n </div>\n <div class="ui-separator" *ngIf="showSeconds">\n <a>\n <span class="pi pi-chevron-up"></span>\n </a>\n <span>{{timeSeparator}}</span>\n <a>\n <span class="pi pi-chevron-down"></span>\n </a>\n </div>\n <div class="ui-second-picker" *ngIf="showSeconds">\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (keydown.enter)="incrementSecond($event)" (mousedown)="onTimePickerElementMouseDown($event, 2, 1)" (mouseup)="onTimePickerElementMouseUp($event)" (mouseout)="onTimePickerElementMouseOut($event)">\n <span class="pi pi-chevron-up"></span>\n </a>\n <span [ngStyle]="{\'display\': currentSecond < 10 ? \'inline\': \'none\'}">0</span><span>{{currentSecond}}</span>\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (keydown.enter)="decrementSecond($event)" (mousedown)="onTimePickerElementMouseDown($event, 2, -1)" (mouseup)="onTimePickerElementMouseUp($event)" (mouseout)="onTimePickerElementMouseOut($event)">\n <span class="pi pi-chevron-down"></span>\n </a>\n </div>\n <div class="ui-ampm-picker" *ngIf="hourFormat==\'12\'">\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (click)="toggleAMPM($event)" (keydown.enter)="toggleAMPM($event)">\n <span class="pi pi-chevron-up"></span>\n </a>\n <span>{{pm ? \'PM\' : \'AM\'}}</span>\n <a tabindex="0" (keydown)="onContainerButtonKeydown($event)" (click)="toggleAMPM($event)" (keydown.enter)="toggleAMPM($event)">\n <span class="pi pi-chevron-down"></span>\n </a>\n </div>\n </div>\n <div class="ui-datepicker-buttonbar ui-widget-header" *ngIf="showButtonBar">\n <button type="button" tabindex="0" [label]="_locale.today" (keydown)="onContainerButtonKeydown($event)" (click)="onTodayButtonClick($event)" pButton [ngClass]="[todayButtonStyleClass]"></button>\n <button type="button" tabindex="0" [label]="_locale.clear" (keydown)="onContainerButtonKeydown($event)" (click)="onClearButtonClick($event)" pButton [ngClass]="[clearButtonStyleClass]"></button>\n </div>\n <ng-content select="p-footer"></ng-content>\n </div>\n </span>\n ',animations:[n.trigger("overlayAnimation",[n.state("visible",n.style({transform:"translateY(0)",opacity:1})),n.state("visibleTouchUI",n.style({transform:"translate(-50%,-50%)",opacity:1})),n.transition("void => visible",[n.style({transform:"translateY(5%)",opacity:0}),n.animate("{{showTransitionParams}}")]),n.transition("visible => void",[n.animate("{{hideTransitionParams}}",n.style({opacity:0,transform:"translateY(5%)"}))]),n.transition("void => visibleTouchUI",[n.style({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),n.animate("{{showTransitionParams}}")]),n.transition("visibleTouchUI => void",[n.animate("{{hideTransitionParams}}",n.style({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])],host:{"[class.ui-inputwrapper-filled]":"filled","[class.ui-inputwrapper-focus]":"focus"},providers:[p],changeDetection:t.ChangeDetectionStrategy.Default})],e)}(),m=function(){function e(){}return e=l([t.NgModule({imports:[i.CommonModule,o.ButtonModule,r.SharedModule],exports:[d,o.ButtonModule,r.SharedModule],declarations:[d]})],e)}();e.CALENDAR_VALUE_ACCESSOR=p,e.Calendar=d,e.CalendarModule=m,Object.defineProperty(e,"__esModule",{value:!0})}));
2//# sourceMappingURL=primeng-calendar.umd.min.js.map
\No newline at end of file