1 line
392 KiB
JSON
1 line
392 KiB
JSON
{"ast":null,"code":"import React, { Component, createRef } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { Button } from 'primereact/button';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { Portal } from 'primereact/portal';\nimport { mask, ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler, ObjectUtils, classNames } from 'primereact/utils';\nimport { tip } from 'primereact/tooltip';\nimport { Ripple } from 'primereact/ripple';\nimport PrimeReact, { localeOption, localeOptions } from 'primereact/api';\nimport { OverlayService } from 'primereact/overlayservice';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _arrayLikeToArray$1(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray$1(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _createSuper$1(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$1();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$1() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar CalendarPanelComponent = /*#__PURE__*/function (_Component) {\n _inherits(CalendarPanelComponent, _Component);\n\n var _super = _createSuper$1(CalendarPanelComponent);\n\n function CalendarPanelComponent() {\n _classCallCheck(this, CalendarPanelComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CalendarPanelComponent, [{\n key: \"renderElement\",\n value: function renderElement() {\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.props.forwardRef,\n classNames: \"p-connected-overlay\",\n \"in\": this.props[\"in\"],\n timeout: {\n enter: 120,\n exit: 100\n },\n options: this.props.transitionOptions,\n unmountOnExit: true,\n onEnter: this.props.onEnter,\n onEntered: this.props.onEntered,\n onExit: this.props.onExit,\n onExited: this.props.onExited\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: this.props.forwardRef,\n className: this.props.className,\n style: this.props.style,\n onClick: this.props.onClick,\n onMouseUp: this.props.onMouseUp\n }, this.props.children));\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderElement();\n return this.props.inline ? element : /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n });\n }\n }]);\n\n return CalendarPanelComponent;\n}(Component);\n\n_defineProperty(CalendarPanelComponent, \"defaultProps\", {\n appendTo: null,\n style: null,\n className: null\n});\n\nvar CalendarPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(CalendarPanelComponent, _extends({\n forwardRef: ref\n }, props));\n});\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar Calendar = /*#__PURE__*/function (_Component) {\n _inherits(Calendar, _Component);\n\n var _super = _createSuper(Calendar);\n\n function Calendar(props) {\n var _this;\n\n _classCallCheck(this, Calendar);\n\n _this = _super.call(this, props);\n _this.state = {\n focused: false,\n overlayVisible: false\n };\n\n if (!_this.props.onViewDateChange) {\n var viewDate = _this.getViewDate(_this.props.viewDate);\n\n _this.validateDate(viewDate);\n\n _this.state = _objectSpread(_objectSpread({}, _this.state), {}, {\n viewDate: viewDate\n });\n }\n\n _this.navigation = null;\n _this.onUserInput = _this.onUserInput.bind(_assertThisInitialized(_this));\n _this.onInputFocus = _this.onInputFocus.bind(_assertThisInitialized(_this));\n _this.onInputBlur = _this.onInputBlur.bind(_assertThisInitialized(_this));\n _this.onInputKeyDown = _this.onInputKeyDown.bind(_assertThisInitialized(_this));\n _this.onButtonClick = _this.onButtonClick.bind(_assertThisInitialized(_this));\n _this.onPrevButtonClick = _this.onPrevButtonClick.bind(_assertThisInitialized(_this));\n _this.onNextButtonClick = _this.onNextButtonClick.bind(_assertThisInitialized(_this));\n _this.onMonthDropdownChange = _this.onMonthDropdownChange.bind(_assertThisInitialized(_this));\n _this.onYearDropdownChange = _this.onYearDropdownChange.bind(_assertThisInitialized(_this));\n _this.onTodayButtonClick = _this.onTodayButtonClick.bind(_assertThisInitialized(_this));\n _this.onClearButtonClick = _this.onClearButtonClick.bind(_assertThisInitialized(_this));\n _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));\n _this.onPanelMouseUp = _this.onPanelMouseUp.bind(_assertThisInitialized(_this));\n _this.incrementHour = _this.incrementHour.bind(_assertThisInitialized(_this));\n _this.decrementHour = _this.decrementHour.bind(_assertThisInitialized(_this));\n _this.incrementMinute = _this.incrementMinute.bind(_assertThisInitialized(_this));\n _this.decrementMinute = _this.decrementMinute.bind(_assertThisInitialized(_this));\n _this.incrementSecond = _this.incrementSecond.bind(_assertThisInitialized(_this));\n _this.decrementSecond = _this.decrementSecond.bind(_assertThisInitialized(_this));\n _this.toggleAmPm = _this.toggleAmPm.bind(_assertThisInitialized(_this));\n _this.onTimePickerElementMouseDown = _this.onTimePickerElementMouseDown.bind(_assertThisInitialized(_this));\n _this.onTimePickerElementMouseUp = _this.onTimePickerElementMouseUp.bind(_assertThisInitialized(_this));\n _this.onTimePickerElementMouseLeave = _this.onTimePickerElementMouseLeave.bind(_assertThisInitialized(_this));\n _this.onOverlayEnter = _this.onOverlayEnter.bind(_assertThisInitialized(_this));\n _this.onOverlayEntered = _this.onOverlayEntered.bind(_assertThisInitialized(_this));\n _this.onOverlayExit = _this.onOverlayExit.bind(_assertThisInitialized(_this));\n _this.onOverlayExited = _this.onOverlayExited.bind(_assertThisInitialized(_this));\n _this.reFocusInputField = _this.reFocusInputField.bind(_assertThisInitialized(_this));\n _this.overlayRef = /*#__PURE__*/createRef();\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(Calendar, [{\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.updateInputRef();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n\n if (this.props.inline) {\n this.initFocusableCell();\n } else if (this.props.mask) {\n mask(this.inputRef.current, {\n mask: this.props.mask,\n readOnly: this.props.readOnlyInput || this.props.disabled,\n onChange: function onChange(e) {\n return _this2.updateValueOnInput(e.originalEvent, e.value);\n }\n });\n }\n\n if (this.props.value) {\n this.updateInputfield(this.props.value);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this3 = this;\n\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n\n if (!this.props.onViewDateChange && !this.viewStateChanged) {\n var propValue = this.props.value;\n\n if (Array.isArray(propValue)) {\n propValue = propValue[0];\n }\n\n var prevPropValue = prevProps.value;\n\n if (Array.isArray(prevPropValue)) {\n prevPropValue = prevPropValue[0];\n }\n\n if (!prevPropValue && propValue || propValue && propValue instanceof Date && propValue.getTime() !== prevPropValue.getTime()) {\n var viewDate = this.props.viewDate && this.isValidDate(this.props.viewDate) ? this.props.viewDate : propValue && this.isValidDate(propValue) ? propValue : new Date();\n this.validateDate(viewDate);\n this.setState({\n viewDate: viewDate\n }, function () {\n _this3.viewStateChanged = true;\n });\n }\n }\n\n if (this.overlayRef && this.overlayRef.current) {\n this.updateFocus();\n }\n\n if (prevProps.value !== this.props.value && (!this.viewStateChanged || !this.isVisible()) || this.isOptionChanged(prevProps)) {\n this.updateInputfield(this.props.value);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n }\n\n if (this.touchUIMask) {\n this.disableModality();\n this.touchUIMask = null;\n }\n\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n ZIndexUtils.clear(this.overlayRef.current);\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.inputRef.current,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"isVisible\",\n value: function isVisible() {\n return this.props.onVisibleChange ? this.props.visible : this.state.overlayVisible;\n }\n }, {\n key: \"isOptionChanged\",\n value: function isOptionChanged(prevProps) {\n var _this4 = this;\n\n var optionProps = ['dateFormat', 'hourFormat', 'timeOnly', 'showSeconds', 'showMillisec'];\n return optionProps.some(function (option) {\n return prevProps[option] !== _this4.props[option];\n });\n }\n }, {\n key: \"getDateFormat\",\n value: function getDateFormat() {\n return this.props.dateFormat || localeOption('dateFormat', this.props.locale);\n }\n }, {\n key: \"onInputFocus\",\n value: function onInputFocus(event) {\n var _this5 = this;\n\n if (this.ignoreFocusFunctionality) {\n this.setState({\n focused: true\n }, function () {\n _this5.ignoreFocusFunctionality = false;\n });\n } else {\n event.persist();\n\n if (this.props.showOnFocus && !this.isVisible()) {\n this.showOverlay();\n }\n\n this.setState({\n focused: true\n }, function () {\n if (_this5.props.onFocus) {\n _this5.props.onFocus(event);\n }\n });\n }\n }\n }, {\n key: \"onInputBlur\",\n value: function onInputBlur(event) {\n var _this6 = this;\n\n event.persist();\n this.setState({\n focused: false\n }, function () {\n if (_this6.props.onBlur) {\n _this6.props.onBlur(event);\n }\n\n if (!_this6.props.keepInvalid) {\n _this6.updateInputfield(_this6.props.value);\n }\n });\n }\n }, {\n key: \"onInputKeyDown\",\n value: function onInputKeyDown(event) {\n this.isKeydown = true;\n\n switch (event.which) {\n //escape\n case 27:\n {\n this.hideOverlay();\n break;\n }\n //tab\n\n case 9:\n {\n if (this.isVisible()) {\n this.trapFocus(event);\n }\n\n if (this.props.touchUI) {\n this.disableModality();\n }\n\n break;\n }\n }\n }\n }, {\n key: \"onUserInput\",\n value: function onUserInput(event) {\n // IE 11 Workaround for input placeholder\n if (!this.isKeydown) {\n return;\n }\n\n this.isKeydown = false;\n this.updateValueOnInput(event, event.target.value);\n\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n }\n }, {\n key: \"updateValueOnInput\",\n value: function updateValueOnInput(event, rawValue) {\n try {\n var value = this.parseValueFromString(rawValue);\n\n if (this.isValidSelection(value)) {\n this.updateModel(event, value);\n this.updateViewDate(event, value.length ? value[0] : value);\n }\n } catch (err) {\n //invalid date\n var _value = this.props.keepInvalid ? rawValue : null;\n\n this.updateModel(event, _value);\n }\n }\n }, {\n key: \"reFocusInputField\",\n value: function reFocusInputField() {\n if (!this.props.inline && this.inputRef.current) {\n this.ignoreFocusFunctionality = true;\n this.inputRef.current.focus();\n }\n }\n }, {\n key: \"isValidSelection\",\n value: function isValidSelection(value) {\n var _this7 = this;\n\n var isValid = true;\n\n if (this.isSingleSelection()) {\n if (!(this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false) && this.isSelectableTime(value))) {\n isValid = false;\n }\n } else if (value.every(function (v) {\n return _this7.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false) && _this7.isSelectableTime(v);\n })) {\n if (this.isRangeSelection()) {\n isValid = value.length > 1 && value[1] > value[0] ? true : false;\n }\n }\n\n return isValid;\n }\n }, {\n key: \"onButtonClick\",\n value: function onButtonClick() {\n if (this.isVisible()) {\n this.hideOverlay();\n } else {\n this.showOverlay();\n }\n }\n }, {\n key: \"onPrevButtonClick\",\n value: function onPrevButtonClick(event) {\n this.navigation = {\n backward: true,\n button: true\n };\n this.navBackward(event);\n }\n }, {\n key: \"onNextButtonClick\",\n value: function onNextButtonClick(event) {\n this.navigation = {\n backward: false,\n button: true\n };\n this.navForward(event);\n }\n }, {\n key: \"onContainerButtonKeydown\",\n value: function onContainerButtonKeydown(event) {\n switch (event.which) {\n //tab\n case 9:\n this.trapFocus(event);\n break;\n //escape\n\n case 27:\n this.hideOverlay(null, this.reFocusInputField);\n event.preventDefault();\n break;\n }\n }\n }, {\n key: \"trapFocus\",\n value: function trapFocus(event) {\n event.preventDefault();\n var focusableElements = DomHandler.getFocusableElements(this.overlayRef.current);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!document.activeElement) {\n focusableElements[0].focus();\n } else {\n var focusedIndex = focusableElements.indexOf(document.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();else focusableElements[focusedIndex - 1].focus();\n } else {\n if (focusedIndex === -1 || focusedIndex === focusableElements.length - 1) focusableElements[0].focus();else focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var cell;\n\n if (this.navigation) {\n if (this.navigation.button) {\n this.initFocusableCell();\n if (this.navigation.backward) DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-prev').focus();else DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-next').focus();\n } else {\n if (this.navigation.backward) {\n var cells = DomHandler.find(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)');\n cell = cells[cells.length - 1];\n } else {\n cell = DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)');\n }\n\n if (cell) {\n cell.tabIndex = '0';\n cell.focus();\n }\n }\n\n this.navigation = null;\n } else {\n this.initFocusableCell();\n }\n }\n }, {\n key: \"initFocusableCell\",\n value: function initFocusableCell() {\n var cell;\n\n if (this.view === 'month') {\n var cells = DomHandler.find(this.overlayRef.current, '.p-monthpicker .p-monthpicker-month');\n var selectedCell = DomHandler.findSingle(this.overlayRef.current, '.p-monthpicker .p-monthpicker-month.p-highlight');\n cells.forEach(function (cell) {\n return cell.tabIndex = -1;\n });\n cell = selectedCell || cells[0];\n } else {\n cell = DomHandler.findSingle(this.overlayRef.current, 'span.p-highlight');\n\n if (!cell) {\n var todayCell = DomHandler.findSingle(this.overlayRef.current, 'td.p-datepicker-today span:not(.p-disabled)');\n if (todayCell) cell = todayCell;else cell = DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)');\n }\n }\n\n if (cell) {\n cell.tabIndex = '0';\n }\n }\n }, {\n key: \"navBackward\",\n value: function navBackward(event) {\n if (this.props.disabled) {\n event.preventDefault();\n return;\n }\n\n var newViewDate = new Date(this.getViewDate().getTime());\n newViewDate.setDate(1);\n\n if (this.props.view === 'date') {\n if (newViewDate.getMonth() === 0) {\n newViewDate.setMonth(11);\n newViewDate.setFullYear(newViewDate.getFullYear() - 1);\n } else {\n newViewDate.setMonth(newViewDate.getMonth() - 1);\n }\n } else if (this.props.view === 'month') {\n var currentYear = newViewDate.getFullYear();\n var newYear = currentYear - 1;\n\n if (this.props.yearNavigator) {\n var minYear = parseInt(this.props.yearRange.split(':')[0], 10);\n\n if (newYear < minYear) {\n newYear = minYear;\n }\n }\n\n newViewDate.setFullYear(newYear);\n }\n\n this.updateViewDate(event, newViewDate);\n event.preventDefault();\n }\n }, {\n key: \"navForward\",\n value: function navForward(event) {\n if (this.props.disabled) {\n event.preventDefault();\n return;\n }\n\n var newViewDate = new Date(this.getViewDate().getTime());\n newViewDate.setDate(1);\n\n if (this.props.view === 'date') {\n if (newViewDate.getMonth() === 11) {\n newViewDate.setMonth(0);\n newViewDate.setFullYear(newViewDate.getFullYear() + 1);\n } else {\n newViewDate.setMonth(newViewDate.getMonth() + 1);\n }\n } else if (this.props.view === 'month') {\n var currentYear = newViewDate.getFullYear();\n var newYear = currentYear + 1;\n\n if (this.props.yearNavigator) {\n var maxYear = parseInt(this.props.yearRange.split(':')[1], 10);\n\n if (newYear > maxYear) {\n newYear = maxYear;\n }\n }\n\n newViewDate.setFullYear(newYear);\n }\n\n this.updateViewDate(event, newViewDate);\n event.preventDefault();\n }\n }, {\n key: \"onMonthDropdownChange\",\n value: function onMonthDropdownChange(event, value) {\n var currentViewDate = this.getViewDate();\n var newViewDate = new Date(currentViewDate.getTime());\n newViewDate.setMonth(parseInt(value, 10));\n this.updateViewDate(event, newViewDate);\n }\n }, {\n key: \"onYearDropdownChange\",\n value: function onYearDropdownChange(event, value) {\n var currentViewDate = this.getViewDate();\n var newViewDate = new Date(currentViewDate.getTime());\n newViewDate.setFullYear(parseInt(value, 10));\n this.updateViewDate(event, newViewDate);\n }\n }, {\n key: \"onTodayButtonClick\",\n value: function onTodayButtonClick(event) {\n var today = new Date();\n var dateMeta = {\n day: today.getDate(),\n month: today.getMonth(),\n year: today.getFullYear(),\n today: true,\n selectable: true\n };\n var timeMeta = {\n hours: today.getHours(),\n minutes: today.getMinutes(),\n seconds: today.getSeconds(),\n milliseconds: today.getMilliseconds()\n };\n this.updateViewDate(event, today);\n this.onDateSelect(event, dateMeta, timeMeta);\n\n if (this.props.onTodayButtonClick) {\n this.props.onTodayButtonClick(event);\n }\n }\n }, {\n key: \"onClearButtonClick\",\n value: function onClearButtonClick(event) {\n this.updateModel(event, null);\n this.updateInputfield(null);\n this.hideOverlay(null, this.reFocusInputField);\n\n if (this.props.onClearButtonClick) {\n this.props.onClearButtonClick(event);\n }\n }\n }, {\n key: \"onPanelClick\",\n value: function onPanelClick(event) {\n if (!this.props.inline) {\n OverlayService.emit('overlay-click', {\n originalEvent: event,\n target: this.container\n });\n }\n }\n }, {\n key: \"onPanelMouseUp\",\n value: function onPanelMouseUp(event) {\n this.onPanelClick(event);\n }\n }, {\n key: \"onTimePickerElementMouseDown\",\n value: function onTimePickerElementMouseDown(event, type, direction) {\n if (!this.props.disabled) {\n this.repeat(event, null, type, direction);\n event.preventDefault();\n }\n }\n }, {\n key: \"onTimePickerElementMouseUp\",\n value: function onTimePickerElementMouseUp() {\n if (!this.props.disabled) {\n this.clearTimePickerTimer();\n }\n }\n }, {\n key: \"onTimePickerElementMouseLeave\",\n value: function onTimePickerElementMouseLeave() {\n if (!this.props.disabled) {\n this.clearTimePickerTimer();\n }\n }\n }, {\n key: \"repeat\",\n value: function repeat(event, interval, type, direction) {\n var _this8 = this;\n\n event.persist();\n var i = interval || 500;\n this.clearTimePickerTimer();\n this.timePickerTimer = setTimeout(function () {\n _this8.repeat(event, 100, type, direction);\n }, i);\n\n switch (type) {\n case 0:\n if (direction === 1) this.incrementHour(event);else this.decrementHour(event);\n break;\n\n case 1:\n if (direction === 1) this.incrementMinute(event);else this.decrementMinute(event);\n break;\n\n case 2:\n if (direction === 1) this.incrementSecond(event);else this.decrementSecond(event);\n break;\n\n case 3:\n if (direction === 1) this.incrementMilliSecond(event);else this.decrementMilliSecond(event);\n break;\n }\n }\n }, {\n key: \"clearTimePickerTimer\",\n value: function clearTimePickerTimer() {\n if (this.timePickerTimer) {\n clearTimeout(this.timePickerTimer);\n }\n }\n }, {\n key: \"incrementHour\",\n value: function incrementHour(event) {\n var currentTime = this.getCurrentDateTime();\n var currentHour = currentTime.getHours();\n var newHour = currentHour + this.props.stepHour;\n newHour = newHour >= 24 ? newHour - 24 : newHour;\n\n if (this.validateHour(newHour, currentTime)) {\n if (this.props.maxDate && this.props.maxDate.toDateString() === currentTime.toDateString() && this.props.maxDate.getHours() === newHour) {\n if (this.props.maxDate.getMinutes() < currentTime.getMinutes()) {\n if (this.props.maxDate.getSeconds() < currentTime.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else if (this.props.maxDate.getMinutes() === currentTime.getMinutes()) {\n if (this.props.maxDate.getSeconds() < currentTime.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementHour\",\n value: function decrementHour(event) {\n var currentTime = this.getCurrentDateTime();\n var currentHour = currentTime.getHours();\n var newHour = currentHour - this.props.stepHour;\n newHour = newHour < 0 ? newHour + 24 : newHour;\n\n if (this.validateHour(newHour, currentTime)) {\n if (this.props.minDate && this.props.minDate.toDateString() === currentTime.toDateString() && this.props.minDate.getHours() === newHour) {\n if (this.props.minDate.getMinutes() > currentTime.getMinutes()) {\n if (this.props.minDate.getSeconds() > currentTime.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else if (this.props.minDate.getMinutes() === currentTime.getMinutes()) {\n if (this.props.minDate.getSeconds() > currentTime.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"doStepMinute\",\n value: function doStepMinute(currentMinute, step) {\n if (this.props.stepMinute <= 1) {\n return step ? currentMinute + step : currentMinute;\n }\n\n if (!step) {\n step = this.props.stepMinute;\n\n if (currentMinute % step === 0) {\n return currentMinute;\n }\n }\n\n var newMinute = currentMinute + step;\n newMinute = Math.floor(newMinute / step) * step;\n return newMinute;\n }\n }, {\n key: \"incrementMinute\",\n value: function incrementMinute(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMinute = currentTime.getMinutes();\n var newMinute = this.doStepMinute(currentMinute, this.props.stepMinute);\n newMinute = newMinute > 59 ? newMinute - 60 : newMinute;\n\n if (this.validateMinute(newMinute, currentTime)) {\n if (this.props.maxDate && this.props.maxDate.toDateString() === currentTime.toDateString() && this.props.maxDate.getMinutes() === newMinute) {\n if (this.props.maxDate.getSeconds() < currentTime.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.maxDate.getSeconds(), this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.maxDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementMinute\",\n value: function decrementMinute(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMinute = currentTime.getMinutes();\n var newMinute = this.doStepMinute(currentMinute, -this.props.stepMinute);\n newMinute = newMinute < 0 ? newMinute + 60 : newMinute;\n\n if (this.validateMinute(newMinute, currentTime)) {\n if (this.props.minDate && this.props.minDate.toDateString() === currentTime.toDateString() && this.props.minDate.getMinutes() === newMinute) {\n if (this.props.minDate.getSeconds() > currentTime.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.minDate.getSeconds(), this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.minDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"incrementSecond\",\n value: function incrementSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentSecond = currentTime.getSeconds();\n var newSecond = currentSecond + this.props.stepSecond;\n newSecond = newSecond > 59 ? newSecond - 60 : newSecond;\n\n if (this.validateSecond(newSecond, currentTime)) {\n if (this.props.maxDate && this.props.maxDate.toDateString() === currentTime.toDateString() && this.props.maxDate.getSeconds() === newSecond) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementSecond\",\n value: function decrementSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentSecond = currentTime.getSeconds();\n var newSecond = currentSecond - this.props.stepSecond;\n newSecond = newSecond < 0 ? newSecond + 60 : newSecond;\n\n if (this.validateSecond(newSecond, currentTime)) {\n if (this.props.minDate && this.props.minDate.toDateString() === currentTime.toDateString() && this.props.minDate.getSeconds() === newSecond) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"incrementMilliSecond\",\n value: function incrementMilliSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMillisecond = currentTime.getMilliseconds();\n var newMillisecond = currentMillisecond + this.props.stepMillisec;\n newMillisecond = newMillisecond > 999 ? newMillisecond - 1000 : newMillisecond;\n\n if (this.validateMillisecond(newMillisecond, currentTime)) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), currentTime.getSeconds(), newMillisecond);\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementMilliSecond\",\n value: function decrementMilliSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMillisecond = currentTime.getMilliseconds();\n var newMillisecond = currentMillisecond - this.props.stepMillisec;\n newMillisecond = newMillisecond < 0 ? newMillisecond + 999 : newMillisecond;\n\n if (this.validateMillisecond(newMillisecond, currentTime)) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), currentTime.getSeconds(), newMillisecond);\n }\n\n event.preventDefault();\n }\n }, {\n key: \"toggleAmPm\",\n value: function toggleAmPm(event) {\n var currentTime = this.getCurrentDateTime();\n var currentHour = currentTime.getHours();\n var newHour = currentHour >= 12 ? currentHour - 12 : currentHour + 12;\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n event.preventDefault();\n }\n }, {\n key: \"getViewDate\",\n value: function getViewDate(date) {\n var propValue = this.props.value;\n var viewDate = date || (this.props.onViewDateChange ? this.props.viewDate : this.state.viewDate);\n\n if (Array.isArray(propValue)) {\n propValue = propValue[0];\n }\n\n return viewDate && this.isValidDate(viewDate) ? viewDate : propValue && this.isValidDate(propValue) ? propValue : new Date();\n }\n }, {\n key: \"getCurrentDateTime\",\n value: function getCurrentDateTime() {\n if (this.isSingleSelection()) {\n return this.props.value && this.props.value instanceof Date ? this.props.value : this.getViewDate();\n } else if (this.isMultipleSelection()) {\n if (this.props.value && this.props.value.length) {\n return this.props.value[this.props.value.length - 1];\n }\n } else if (this.isRangeSelection()) {\n if (this.props.value && this.props.value.length) {\n var startDate = this.props.value[0];\n var endDate = this.props.value[1];\n return endDate || startDate;\n }\n }\n\n return new Date();\n }\n }, {\n key: \"isValidDate\",\n value: function isValidDate(date) {\n return date instanceof Date && !isNaN(date);\n }\n }, {\n key: \"validateHour\",\n value: function validateHour(hour, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (this.props.minDate.getHours() > hour) {\n valid = false;\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (this.props.maxDate.getHours() < hour) {\n valid = false;\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateMinute\",\n value: function validateMinute(minute, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.minDate.getHours()) {\n if (this.props.minDate.getMinutes() > minute) {\n valid = false;\n }\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.maxDate.getHours()) {\n if (this.props.maxDate.getMinutes() < minute) {\n valid = false;\n }\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateSecond\",\n value: function validateSecond(second, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.minDate.getHours() && value.getMinutes() === this.props.minDate.getMinutes()) {\n if (this.props.minDate.getSeconds() > second) {\n valid = false;\n }\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.maxDate.getHours() && value.getMinutes() === this.props.maxDate.getMinutes()) {\n if (this.props.maxDate.getSeconds() < second) {\n valid = false;\n }\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateMillisecond\",\n value: function validateMillisecond(millisecond, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.minDate.getHours() && value.getSeconds() === this.props.minDate.getSeconds() && value.getMinutes() === this.props.minDate.getMinutes()) {\n if (this.props.minDate.getMilliseconds() > millisecond) {\n valid = false;\n }\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.maxDate.getHours() && value.getSeconds() === this.props.maxDate.getSeconds() && value.getMinutes() === this.props.maxDate.getMinutes()) {\n if (this.props.maxDate.getMilliseconds() < millisecond) {\n valid = false;\n }\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateDate\",\n value: function validateDate(value) {\n if (this.props.yearNavigator) {\n var viewYear = value.getFullYear();\n var minRangeYear = this.props.yearRange ? parseInt(this.props.yearRange.split(':')[0], 10) : null;\n var maxRangeYear = this.props.yearRange ? parseInt(this.props.yearRange.split(':')[1], 10) : null;\n var minYear = this.props.minDate && minRangeYear != null ? Math.max(this.props.minDate.getFullYear(), minRangeYear) : this.props.minDate || minRangeYear;\n var maxYear = this.props.maxDate && maxRangeYear != null ? Math.min(this.props.maxDate.getFullYear(), maxRangeYear) : this.props.maxDate || maxRangeYear;\n\n if (minYear && minYear > viewYear) {\n viewYear = minYear;\n }\n\n if (maxYear && maxYear < viewYear) {\n viewYear = maxYear;\n }\n\n value.setFullYear(viewYear);\n }\n\n if (this.props.monthNavigator && this.props.view !== 'month') {\n var viewMonth = value.getMonth();\n var viewMonthWithMinMax = parseInt(this.isInMinYear(value) && Math.max(this.props.minDate.getMonth(), viewMonth).toString() || this.isInMaxYear(value) && Math.min(this.props.maxDate.getMonth(), viewMonth).toString() || viewMonth);\n value.setMonth(viewMonthWithMinMax);\n }\n }\n }, {\n key: \"updateTime\",\n value: function updateTime(event, hour, minute, second, millisecond) {\n var newDateTime = this.getCurrentDateTime();\n newDateTime.setHours(hour);\n newDateTime.setMinutes(minute);\n newDateTime.setSeconds(second);\n newDateTime.setMilliseconds(millisecond);\n\n if (this.isMultipleSelection()) {\n if (this.props.value && this.props.value.length) {\n var value = _toConsumableArray(this.props.value);\n\n value[value.length - 1] = newDateTime;\n newDateTime = value;\n } else {\n newDateTime = [newDateTime];\n }\n } else if (this.isRangeSelection()) {\n if (this.props.value && this.props.value.length) {\n var startDate = this.props.value[0];\n var endDate = this.props.value[1];\n newDateTime = endDate ? [startDate, newDateTime] : [newDateTime, null];\n } else {\n newDateTime = [newDateTime, null];\n }\n }\n\n this.updateModel(event, newDateTime);\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n value: newDateTime\n });\n }\n\n this.updateInputfield(newDateTime);\n }\n }, {\n key: \"updateViewDate\",\n value: function updateViewDate(event, value) {\n this.validateDate(value);\n\n if (this.props.onViewDateChange) {\n this.props.onViewDateChange({\n originalEvent: event,\n value: value\n });\n } else {\n this.viewStateChanged = true;\n this.setState({\n viewDate: value\n });\n }\n }\n }, {\n key: \"onDateCellKeydown\",\n value: function onDateCellKeydown(event, date, groupIndex) {\n var cellContent = event.currentTarget;\n var cell = cellContent.parentElement;\n\n switch (event.which) {\n //down arrow\n case 40:\n {\n cellContent.tabIndex = '-1';\n var cellIndex = DomHandler.index(cell);\n var nextRow = cell.parentElement.nextElementSibling;\n\n if (nextRow) {\n var focusCell = nextRow.children[cellIndex].children[0];\n\n if (DomHandler.hasClass(focusCell, 'p-disabled')) {\n this.navigation = {\n backward: false\n };\n this.navForward(event);\n } else {\n nextRow.children[cellIndex].children[0].tabIndex = '0';\n nextRow.children[cellIndex].children[0].focus();\n }\n } else {\n this.navigation = {\n backward: false\n };\n this.navForward(event);\n }\n\n event.preventDefault();\n break;\n }\n //up arrow\n\n case 38:\n {\n cellContent.tabIndex = '-1';\n\n var _cellIndex = DomHandler.index(cell);\n\n var prevRow = cell.parentElement.previousElementSibling;\n\n if (prevRow) {\n var _focusCell = prevRow.children[_cellIndex].children[0];\n\n if (DomHandler.hasClass(_focusCell, 'p-disabled')) {\n this.navigation = {\n backward: true\n };\n this.navBackward(event);\n } else {\n _focusCell.tabIndex = '0';\n\n _focusCell.focus();\n }\n } else {\n this.navigation = {\n backward: true\n };\n this.navBackward(event);\n }\n\n event.preventDefault();\n break;\n }\n //left arrow\n\n case 37:\n {\n cellContent.tabIndex = '-1';\n var prevCell = cell.previousElementSibling;\n\n if (prevCell) {\n var _focusCell2 = prevCell.children[0];\n\n if (DomHandler.hasClass(_focusCell2, 'p-disabled')) {\n this.navigateToMonth(true, groupIndex, event);\n } else {\n _focusCell2.tabIndex = '0';\n\n _focusCell2.focus();\n }\n } else {\n this.navigateToMonth(true, groupIndex, event);\n }\n\n event.preventDefault();\n break;\n }\n //right arrow\n\n case 39:\n {\n cellContent.tabIndex = '-1';\n var nextCell = cell.nextElementSibling;\n\n if (nextCell) {\n var _focusCell3 = nextCell.children[0];\n\n if (DomHandler.hasClass(_focusCell3, 'p-disabled')) {\n this.navigateToMonth(false, groupIndex, event);\n } else {\n _focusCell3.tabIndex = '0';\n\n _focusCell3.focus();\n }\n } else {\n this.navigateToMonth(false, groupIndex, event);\n }\n\n event.preventDefault();\n break;\n }\n //enter\n\n case 13:\n {\n this.onDateSelect(event, date);\n event.preventDefault();\n break;\n }\n //escape\n\n case 27:\n {\n this.hideOverlay(null, this.reFocusInputField);\n event.preventDefault();\n break;\n }\n //tab\n\n case 9:\n {\n this.trapFocus(event);\n break;\n }\n }\n }\n }, {\n key: \"navigateToMonth\",\n value: function navigateToMonth(prev, groupIndex, event) {\n if (prev) {\n if (this.props.numberOfMonths === 1 || groupIndex === 0) {\n this.navigation = {\n backward: true\n };\n this.navBackward(event);\n } else {\n var prevMonthContainer = this.overlayRef.current.children[groupIndex - 1];\n var cells = DomHandler.find(prevMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled)');\n var focusCell = cells[cells.length - 1];\n focusCell.tabIndex = '0';\n focusCell.focus();\n }\n } else {\n if (this.props.numberOfMonths === 1 || groupIndex === this.props.numberOfMonths - 1) {\n this.navigation = {\n backward: false\n };\n this.navForward(event);\n } else {\n var nextMonthContainer = this.overlayRef.current.children[groupIndex + 1];\n\n var _focusCell4 = DomHandler.findSingle(nextMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled)');\n\n _focusCell4.tabIndex = '0';\n\n _focusCell4.focus();\n }\n }\n }\n }, {\n key: \"onMonthCellKeydown\",\n value: function onMonthCellKeydown(event, index) {\n var cell = event.currentTarget;\n\n switch (event.which) {\n //arrows\n case 38:\n case 40:\n {\n cell.tabIndex = '-1';\n var cells = cell.parentElement.children;\n var cellIndex = DomHandler.index(cell);\n var nextCell = cells[event.which === 40 ? cellIndex + 3 : cellIndex - 3];\n\n if (nextCell) {\n nextCell.tabIndex = '0';\n nextCell.focus();\n }\n\n event.preventDefault();\n break;\n }\n //left arrow\n\n case 37:\n {\n cell.tabIndex = '-1';\n var prevCell = cell.previousElementSibling;\n\n if (prevCell) {\n prevCell.tabIndex = '0';\n prevCell.focus();\n }\n\n event.preventDefault();\n break;\n }\n //right arrow\n\n case 39:\n {\n cell.tabIndex = '-1';\n var _nextCell = cell.nextElementSibling;\n\n if (_nextCell) {\n _nextCell.tabIndex = '0';\n\n _nextCell.focus();\n }\n\n event.preventDefault();\n break;\n }\n //enter\n\n case 13:\n {\n this.onMonthSelect(event, index);\n event.preventDefault();\n break;\n }\n //escape\n\n case 27:\n {\n this.hideOverlay(null, this.reFocusInputField);\n event.preventDefault();\n break;\n }\n //tab\n\n case 9:\n {\n this.trapFocus(event);\n break;\n }\n }\n }\n }, {\n key: \"onDateSelect\",\n value: function onDateSelect(event, dateMeta, timeMeta) {\n var _this9 = this;\n\n if (this.props.disabled || !dateMeta.selectable) {\n event.preventDefault();\n return;\n }\n\n DomHandler.find(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(function (cell) {\n return cell.tabIndex = -1;\n });\n event.currentTarget.focus();\n\n if (this.isMultipleSelection()) {\n if (this.isSelected(dateMeta)) {\n var value = this.props.value.filter(function (date, i) {\n return !_this9.isDateEquals(date, dateMeta);\n });\n this.updateModel(event, value);\n this.updateInputfield(value);\n } else if (!this.props.maxDateCount || !this.props.value || this.props.maxDateCount > this.props.value.length) {\n this.selectDate(event, dateMeta, timeMeta);\n }\n } else {\n this.selectDate(event, dateMeta, timeMeta);\n }\n\n if (!this.props.inline && this.isSingleSelection() && (!this.props.showTime || this.props.hideOnDateTimeSelect)) {\n setTimeout(function () {\n _this9.hideOverlay('dateselect');\n }, 100);\n\n if (this.touchUIMask) {\n this.disableModality();\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"selectTime\",\n value: function selectTime(date, timeMeta) {\n if (this.props.showTime) {\n var hours, minutes, seconds, milliseconds;\n\n if (timeMeta) {\n hours = timeMeta.hours;\n minutes = timeMeta.minutes;\n seconds = timeMeta.seconds;\n milliseconds = timeMeta.milliseconds;\n } else {\n var time = this.getCurrentDateTime();\n var _ref = [time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()];\n hours = _ref[0];\n minutes = _ref[1];\n seconds = _ref[2];\n milliseconds = _ref[3];\n }\n\n date.setHours(hours);\n date.setMinutes(minutes);\n date.setSeconds(seconds);\n date.setMilliseconds(milliseconds);\n }\n }\n }, {\n key: \"selectDate\",\n value: function selectDate(event, dateMeta, timeMeta) {\n var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);\n this.selectTime(date, timeMeta);\n\n if (this.props.minDate && this.props.minDate > date) {\n date = this.props.minDate;\n }\n\n if (this.props.maxDate && this.props.maxDate < date) {\n date = this.props.maxDate;\n }\n\n var selectedValues = date;\n\n if (this.isSingleSelection()) {\n this.updateModel(event, date);\n } else if (this.isMultipleSelection()) {\n selectedValues = this.props.value ? [].concat(_toConsumableArray(this.props.value), [date]) : [date];\n this.updateModel(event, selectedValues);\n } else if (this.isRangeSelection()) {\n if (this.props.value && this.props.value.length) {\n var startDate = this.props.value[0];\n var endDate = this.props.value[1];\n\n if (!endDate) {\n if (date.getTime() >= startDate.getTime()) {\n endDate = date;\n } else {\n endDate = startDate;\n startDate = date;\n }\n } else {\n startDate = date;\n endDate = null;\n }\n\n selectedValues = [startDate, endDate];\n this.updateModel(event, selectedValues);\n } else {\n selectedValues = [date, null];\n this.updateModel(event, selectedValues);\n }\n }\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n value: date\n });\n }\n\n this.updateInputfield(selectedValues);\n }\n }, {\n key: \"onMonthSelect\",\n value: function onMonthSelect(event, month) {\n this.onDateSelect(event, {\n year: this.getViewDate().getFullYear(),\n month: month,\n day: 1,\n selectable: true\n });\n event.preventDefault();\n }\n }, {\n key: \"updateModel\",\n value: function updateModel(event, value) {\n if (this.props.onChange) {\n var newValue = value && value instanceof Date ? new Date(value.getTime()) : value;\n this.viewStateChanged = true;\n this.props.onChange({\n originalEvent: event,\n value: newValue,\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n name: this.props.name,\n id: this.props.id,\n value: newValue\n }\n });\n }\n }\n }, {\n key: \"showOverlay\",\n value: function showOverlay(type) {\n var _this10 = this;\n\n if (this.props.onVisibleChange) {\n this.props.onVisibleChange({\n visible: true,\n type: type\n });\n } else {\n this.setState({\n overlayVisible: true\n }, function () {\n _this10.overlayEventListener = function (e) {\n if (!_this10.isOutsideClicked(e.target)) {\n _this10.isOverlayClicked = true;\n }\n };\n\n OverlayService.on('overlay-click', _this10.overlayEventListener);\n });\n }\n }\n }, {\n key: \"hideOverlay\",\n value: function hideOverlay(type, callback) {\n var _this11 = this;\n\n var _hideCallback = function _hideCallback() {\n _this11.viewStateChanged = false;\n _this11.ignoreFocusFunctionality = false;\n _this11.isOverlayClicked = false;\n\n if (callback) {\n callback();\n }\n\n OverlayService.off('overlay-click', _this11.overlayEventListener);\n _this11.overlayEventListener = null;\n };\n\n if (this.props.onVisibleChange) this.props.onVisibleChange({\n visible: false,\n type: type,\n callback: _hideCallback\n });else this.setState({\n overlayVisible: false\n }, _hideCallback);\n }\n }, {\n key: \"onOverlayEnter\",\n value: function onOverlayEnter() {\n if (this.props.autoZIndex) {\n var key = this.props.touchUI ? 'modal' : 'overlay';\n ZIndexUtils.set(key, this.overlayRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex[key]);\n }\n\n this.alignOverlay();\n }\n }, {\n key: \"onOverlayEntered\",\n value: function onOverlayEntered() {\n this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n this.bindScrollListener();\n this.props.onShow && this.props.onShow();\n }\n }, {\n key: \"onOverlayExit\",\n value: function onOverlayExit() {\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n this.unbindScrollListener();\n }\n }, {\n key: \"onOverlayExited\",\n value: function onOverlayExited() {\n ZIndexUtils.clear(this.overlayRef.current);\n this.props.onHide && this.props.onHide();\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this12 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (!_this12.isOverlayClicked && _this12.isVisible() && _this12.isOutsideClicked(event.target)) {\n _this12.hideOverlay('outside');\n }\n\n _this12.isOverlayClicked = false;\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"bindDocumentResizeListener\",\n value: function bindDocumentResizeListener() {\n if (!this.documentResizeListener && !this.props.touchUI) {\n this.documentResizeListener = this.onWindowResize.bind(this);\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n }, {\n key: \"unbindDocumentResizeListener\",\n value: function unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n }, {\n key: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this13 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.container, function () {\n if (_this13.isVisible()) {\n _this13.hideOverlay();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n }, {\n key: \"unbindScrollListener\",\n value: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(target) {\n return this.container && !(this.container.isSameNode(target) || this.isNavIconClicked(target) || this.container.contains(target) || this.overlayRef && this.overlayRef.current.contains(target));\n }\n }, {\n key: \"isNavIconClicked\",\n value: function isNavIconClicked(target) {\n return DomHandler.hasClass(target, 'p-datepicker-prev') || DomHandler.hasClass(target, 'p-datepicker-prev-icon') || DomHandler.hasClass(target, 'p-datepicker-next') || DomHandler.hasClass(target, 'p-datepicker-next-icon');\n }\n }, {\n key: \"onWindowResize\",\n value: function onWindowResize() {\n if (this.isVisible() && !DomHandler.isTouchDevice()) {\n this.hideOverlay();\n }\n }\n }, {\n key: \"alignOverlay\",\n value: function alignOverlay() {\n if (this.props.touchUI) {\n this.enableModality();\n } else {\n DomHandler.alignOverlay(this.overlayRef.current, this.inputRef.current.parentElement, this.props.appendTo || PrimeReact.appendTo);\n }\n }\n }, {\n key: \"enableModality\",\n value: function enableModality() {\n var _this14 = this;\n\n if (!this.touchUIMask) {\n this.touchUIMask = document.createElement('div');\n this.touchUIMask.style.zIndex = String(ZIndexUtils.get(this.overlayRef.current) - 1);\n DomHandler.addMultipleClasses(this.touchUIMask, 'p-component-overlay p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay-enter');\n\n this.touchUIMaskClickListener = function () {\n _this14.disableModality();\n };\n\n this.touchUIMask.addEventListener('click', this.touchUIMaskClickListener);\n document.body.appendChild(this.touchUIMask);\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n }, {\n key: \"disableModality\",\n value: function disableModality() {\n var _this15 = this;\n\n if (this.touchUIMask) {\n DomHandler.addClass(this.touchUIMask, 'p-component-overlay-leave');\n this.touchUIMask.addEventListener('animationend', function () {\n _this15.destroyMask();\n });\n }\n }\n }, {\n key: \"destroyMask\",\n value: function destroyMask() {\n this.touchUIMask.removeEventListener('click', this.touchUIMaskClickListener);\n this.touchUIMaskClickListener = null;\n document.body.removeChild(this.touchUIMask);\n this.touchUIMask = null;\n var bodyChildren = document.body.children;\n var hasBlockerMasks;\n\n for (var i = 0; i < bodyChildren.length; i++) {\n var bodyChild = bodyChildren[i];\n\n if (DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {\n hasBlockerMasks = true;\n break;\n }\n }\n\n if (!hasBlockerMasks) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n }\n }, {\n key: \"getFirstDayOfMonthIndex\",\n value: function getFirstDayOfMonthIndex(month, year) {\n var day = new Date();\n day.setDate(1);\n day.setMonth(month);\n day.setFullYear(year);\n var dayIndex = day.getDay() + this.getSundayIndex();\n return dayIndex >= 7 ? dayIndex - 7 : dayIndex;\n }\n }, {\n key: \"getDaysCountInMonth\",\n value: function getDaysCountInMonth(month, year) {\n return 32 - this.daylightSavingAdjust(new Date(year, month, 32)).getDate();\n }\n }, {\n key: \"getDaysCountInPrevMonth\",\n value: function getDaysCountInPrevMonth(month, year) {\n var prev = this.getPreviousMonthAndYear(month, year);\n return this.getDaysCountInMonth(prev.month, prev.year);\n }\n }, {\n key: \"daylightSavingAdjust\",\n value: function daylightSavingAdjust(date) {\n if (!date) {\n return null;\n }\n\n date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n return date;\n }\n }, {\n key: \"getPreviousMonthAndYear\",\n value: function getPreviousMonthAndYear(month, year) {\n var m, y;\n\n if (month === 0) {\n m = 11;\n y = year - 1;\n } else {\n m = month - 1;\n y = year;\n }\n\n return {\n 'month': m,\n 'year': y\n };\n }\n }, {\n key: \"getNextMonthAndYear\",\n value: function getNextMonthAndYear(month, year) {\n var m, y;\n\n if (month === 11) {\n m = 0;\n y = year + 1;\n } else {\n m = month + 1;\n y = year;\n }\n\n return {\n 'month': m,\n 'year': y\n };\n }\n }, {\n key: \"getSundayIndex\",\n value: function getSundayIndex() {\n var firstDayOfWeek = localeOption('firstDayOfWeek', this.props.locale);\n return firstDayOfWeek > 0 ? 7 - firstDayOfWeek : 0;\n }\n }, {\n key: \"createWeekDays\",\n value: function createWeekDays() {\n var weekDays = [];\n\n var _localeOptions = localeOptions(this.props.locale),\n dayIndex = _localeOptions.firstDayOfWeek,\n dayNamesMin = _localeOptions.dayNamesMin;\n\n for (var i = 0; i < 7; i++) {\n weekDays.push(dayNamesMin[dayIndex]);\n dayIndex = dayIndex === 6 ? 0 : ++dayIndex;\n }\n\n return weekDays;\n }\n }, {\n key: \"createMonths\",\n value: function createMonths(month, year) {\n var months = [];\n\n for (var i = 0; i < this.props.numberOfMonths; i++) {\n var m = month + i;\n var y = year;\n\n if (m > 11) {\n m = m % 11 - 1;\n y = year + 1;\n }\n\n months.push(this.createMonth(m, y));\n }\n\n return months;\n }\n }, {\n key: \"createMonth\",\n value: function createMonth(month, year) {\n var dates = [];\n var firstDay = this.getFirstDayOfMonthIndex(month, year);\n var daysLength = this.getDaysCountInMonth(month, year);\n var prevMonthDaysLength = this.getDaysCountInPrevMonth(month, year);\n var dayNo = 1;\n var today = new Date();\n var weekNumbers = [];\n var monthRows = Math.ceil((daysLength + firstDay) / 7);\n\n for (var i = 0; i < monthRows; i++) {\n var week = [];\n\n if (i === 0) {\n for (var j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {\n var prev = this.getPreviousMonthAndYear(month, year);\n week.push({\n day: j,\n month: prev.month,\n year: prev.year,\n otherMonth: true,\n today: this.isToday(today, j, prev.month, prev.year),\n selectable: this.isSelectable(j, prev.month, prev.year, true)\n });\n }\n\n var remainingDaysLength = 7 - week.length;\n\n for (var _j = 0; _j < remainingDaysLength; _j++) {\n week.push({\n day: dayNo,\n month: month,\n year: year,\n today: this.isToday(today, dayNo, month, year),\n selectable: this.isSelectable(dayNo, month, year, false)\n });\n dayNo++;\n }\n } else {\n for (var _j2 = 0; _j2 < 7; _j2++) {\n if (dayNo > daysLength) {\n var next = this.getNextMonthAndYear(month, year);\n week.push({\n day: dayNo - daysLength,\n month: next.month,\n year: next.year,\n otherMonth: true,\n today: this.isToday(today, dayNo - daysLength, next.month, next.year),\n selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)\n });\n } else {\n week.push({\n day: dayNo,\n month: month,\n year: year,\n today: this.isToday(today, dayNo, month, year),\n selectable: this.isSelectable(dayNo, month, year, false)\n });\n }\n\n dayNo++;\n }\n }\n\n if (this.props.showWeek) {\n weekNumbers.push(this.getWeekNumber(new Date(week[0].year, week[0].month, week[0].day)));\n }\n\n dates.push(week);\n }\n\n return {\n month: month,\n year: year,\n dates: dates,\n weekNumbers: weekNumbers\n };\n }\n }, {\n key: \"getWeekNumber\",\n value: function getWeekNumber(date) {\n var checkDate = new Date(date.getTime());\n checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n var time = checkDate.getTime();\n checkDate.setMonth(0);\n checkDate.setDate(1);\n return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;\n }\n }, {\n key: \"isSelectable\",\n value: function isSelectable(day, month, year, otherMonth) {\n var validMin = true;\n var validMax = true;\n var validDate = true;\n var validDay = true;\n var validMonth = true;\n\n if (this.props.minDate) {\n if (this.props.minDate.getFullYear() > year) {\n validMin = false;\n } else if (this.props.minDate.getFullYear() === year) {\n if (this.props.minDate.getMonth() > month) {\n validMin = false;\n } else if (this.props.minDate.getMonth() === month) {\n if (this.props.minDate.getDate() > day) {\n validMin = false;\n }\n }\n }\n }\n\n if (this.props.maxDate) {\n if (this.props.maxDate.getFullYear() < year) {\n validMax = false;\n } else if (this.props.maxDate.getFullYear() === year) {\n if (this.props.maxDate.getMonth() < month) {\n validMax = false;\n } else if (this.props.maxDate.getMonth() === month) {\n if (this.props.maxDate.getDate() < day) {\n validMax = false;\n }\n }\n }\n }\n\n if (this.props.disabledDates) {\n validDate = !this.isDateDisabled(day, month, year);\n }\n\n if (this.props.disabledDays) {\n validDay = !this.isDayDisabled(day, month, year);\n }\n\n if (this.props.selectOtherMonths === false && otherMonth) {\n validMonth = false;\n }\n\n return validMin && validMax && validDate && validDay && validMonth;\n }\n }, {\n key: \"isSelectableTime\",\n value: function isSelectableTime(value) {\n var validMin = true;\n var validMax = true;\n\n if (this.props.minDate && this.props.minDate.toDateString() === value.toDateString()) {\n if (this.props.minDate.getHours() > value.getHours()) {\n validMin = false;\n } else if (this.props.minDate.getHours() === value.getHours()) {\n if (this.props.minDate.getMinutes() > value.getMinutes()) {\n validMin = false;\n } else if (this.props.minDate.getMinutes() === value.getMinutes()) {\n if (this.props.minDate.getSeconds() > value.getSeconds()) {\n validMin = false;\n } else if (this.props.minDate.getSeconds() === value.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > value.getMilliseconds()) {\n validMin = false;\n }\n }\n }\n }\n }\n\n if (this.props.maxDate && this.props.maxDate.toDateString() === value.toDateString()) {\n if (this.props.maxDate.getHours() < value.getHours()) {\n validMax = false;\n } else if (this.props.maxDate.getHours() === value.getHours()) {\n if (this.props.maxDate.getMinutes() < value.getMinutes()) {\n validMax = false;\n } else if (this.props.maxDate.getMinutes() === value.getMinutes()) {\n if (this.props.maxDate.getSeconds() < value.getSeconds()) {\n validMax = false;\n } else if (this.props.maxDate.getSeconds() === value.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < value.getMilliseconds()) {\n validMax = false;\n }\n }\n }\n }\n }\n\n return validMin && validMax;\n }\n }, {\n key: \"isSelected\",\n value: function isSelected(dateMeta) {\n if (this.props.value) {\n if (this.isSingleSelection()) {\n return this.isDateEquals(this.props.value, dateMeta);\n } else if (this.isMultipleSelection()) {\n var selected = false;\n\n var _iterator = _createForOfIteratorHelper(this.props.value),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var date = _step.value;\n selected = this.isDateEquals(date, dateMeta);\n\n if (selected) {\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return selected;\n } else if (this.isRangeSelection()) {\n if (this.props.value[1]) return this.isDateEquals(this.props.value[0], dateMeta) || this.isDateEquals(this.props.value[1], dateMeta) || this.isDateBetween(this.props.value[0], this.props.value[1], dateMeta);else {\n return this.isDateEquals(this.props.value[0], dateMeta);\n }\n }\n } else {\n return false;\n }\n }\n }, {\n key: \"isMonthSelected\",\n value: function isMonthSelected(month) {\n var viewDate = this.getViewDate();\n if (this.props.value && this.props.value instanceof Date) return this.props.value.getDate() === 1 && this.props.value.getMonth() === month && this.props.value.getFullYear() === viewDate.getFullYear();else return false;\n }\n }, {\n key: \"isDateEquals\",\n value: function isDateEquals(value, dateMeta) {\n if (value && value instanceof Date) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;else return false;\n }\n }, {\n key: \"isDateBetween\",\n value: function isDateBetween(start, end, dateMeta) {\n var between = false;\n\n if (start && end) {\n var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);\n return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();\n }\n\n return between;\n }\n }, {\n key: \"isSingleSelection\",\n value: function isSingleSelection() {\n return this.props.selectionMode === 'single';\n }\n }, {\n key: \"isRangeSelection\",\n value: function isRangeSelection() {\n return this.props.selectionMode === 'range';\n }\n }, {\n key: \"isMultipleSelection\",\n value: function isMultipleSelection() {\n return this.props.selectionMode === 'multiple';\n }\n }, {\n key: \"isToday\",\n value: function isToday(today, day, month, year) {\n return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;\n }\n }, {\n key: \"isDateDisabled\",\n value: function isDateDisabled(day, month, year) {\n if (this.props.disabledDates) {\n for (var i = 0; i < this.props.disabledDates.length; i++) {\n var disabledDate = this.props.disabledDates[i];\n\n if (disabledDate.getFullYear() === year && disabledDate.getMonth() === month && disabledDate.getDate() === day) {\n return true;\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"isDayDisabled\",\n value: function isDayDisabled(day, month, year) {\n if (this.props.disabledDays) {\n var weekday = new Date(year, month, day);\n var weekdayNumber = weekday.getDay();\n return this.props.disabledDays.indexOf(weekdayNumber) !== -1;\n }\n\n return false;\n }\n }, {\n key: \"updateInputfield\",\n value: function updateInputfield(value) {\n if (!(this.inputRef && this.inputRef.current)) {\n return;\n }\n\n var formattedValue = '';\n\n if (value) {\n try {\n if (this.isSingleSelection()) {\n formattedValue = this.isValidDate(value) ? this.formatDateTime(value) : '';\n } else if (this.isMultipleSelection()) {\n for (var i = 0; i < value.length; i++) {\n var selectedValue = value[i];\n var dateAsString = this.isValidDate(selectedValue) ? this.formatDateTime(selectedValue) : '';\n formattedValue += dateAsString;\n\n if (i !== value.length - 1) {\n formattedValue += ', ';\n }\n }\n } else if (this.isRangeSelection()) {\n if (value && value.length) {\n var startDate = value[0];\n var endDate = value[1];\n formattedValue = this.isValidDate(startDate) ? this.formatDateTime(startDate) : '';\n\n if (endDate) {\n formattedValue += this.isValidDate(endDate) ? ' - ' + this.formatDateTime(endDate) : '';\n }\n }\n }\n } catch (err) {\n formattedValue = value;\n }\n }\n\n this.inputRef.current.value = formattedValue;\n }\n }, {\n key: \"formatDateTime\",\n value: function formatDateTime(date) {\n var formattedValue = null;\n\n if (date) {\n if (this.props.timeOnly) {\n formattedValue = this.formatTime(date);\n } else {\n formattedValue = this.formatDate(date, this.getDateFormat());\n\n if (this.props.showTime) {\n formattedValue += ' ' + this.formatTime(date);\n }\n }\n }\n\n return formattedValue;\n }\n }, {\n key: \"formatDate\",\n value: function formatDate(date, format) {\n if (!date) {\n return '';\n }\n\n var iFormat;\n\n var lookAhead = function lookAhead(match) {\n var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;\n\n if (matches) {\n iFormat++;\n }\n\n return matches;\n },\n formatNumber = function formatNumber(match, value, len) {\n var num = '' + value;\n\n if (lookAhead(match)) {\n while (num.length < len) {\n num = '0' + num;\n }\n }\n\n return num;\n },\n formatName = function formatName(match, value, shortNames, longNames) {\n return lookAhead(match) ? longNames[value] : shortNames[value];\n };\n\n var output = '';\n var literal = false;\n\n var _localeOptions2 = localeOptions(this.props.locale),\n dayNamesShort = _localeOptions2.dayNamesShort,\n dayNames = _localeOptions2.dayNames,\n monthNamesShort = _localeOptions2.monthNamesShort,\n monthNames = _localeOptions2.monthNames;\n\n if (date) {\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === '\\'' && !lookAhead('\\'')) {\n literal = false;\n } else {\n output += format.charAt(iFormat);\n }\n } else {\n switch (format.charAt(iFormat)) {\n case 'd':\n output += formatNumber('d', date.getDate(), 2);\n break;\n\n case 'D':\n output += formatName('D', date.getDay(), dayNamesShort, dayNames);\n break;\n\n case 'o':\n output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n break;\n\n case 'm':\n output += formatNumber('m', date.getMonth() + 1, 2);\n break;\n\n case 'M':\n output += formatName('M', date.getMonth(), monthNamesShort, monthNames);\n break;\n\n case 'y':\n output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + date.getFullYear() % 100;\n break;\n\n case '@':\n output += date.getTime();\n break;\n\n case '!':\n output += date.getTime() * 10000 + this.ticksTo1970;\n break;\n\n case '\\'':\n if (lookAhead('\\'')) {\n output += '\\'';\n } else {\n literal = true;\n }\n\n break;\n\n default:\n output += format.charAt(iFormat);\n }\n }\n }\n }\n\n return output;\n }\n }, {\n key: \"formatTime\",\n value: function formatTime(date) {\n if (!date) {\n return '';\n }\n\n var output = '';\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var seconds = date.getSeconds();\n var milliseconds = date.getMilliseconds();\n\n if (this.props.hourFormat === '12' && hours > 11 && hours !== 12) {\n hours -= 12;\n }\n\n if (this.props.hourFormat === '12') {\n output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;\n } else {\n output += hours < 10 ? '0' + hours : hours;\n }\n\n output += ':';\n output += minutes < 10 ? '0' + minutes : minutes;\n\n if (this.props.showSeconds) {\n output += ':';\n output += seconds < 10 ? '0' + seconds : seconds;\n }\n\n if (this.props.showMillisec) {\n output += '.';\n output += milliseconds < 100 ? (milliseconds < 10 ? '00' : '0') + milliseconds : milliseconds;\n }\n\n if (this.props.hourFormat === '12') {\n output += date.getHours() > 11 ? ' PM' : ' AM';\n }\n\n return output;\n }\n }, {\n key: \"parseValueFromString\",\n value: function parseValueFromString(text) {\n if (!text || text.trim().length === 0) {\n return null;\n }\n\n var value;\n\n if (this.isSingleSelection()) {\n value = this.parseDateTime(text);\n } else if (this.isMultipleSelection()) {\n var tokens = text.split(',');\n value = [];\n\n var _iterator2 = _createForOfIteratorHelper(tokens),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var token = _step2.value;\n value.push(this.parseDateTime(token.trim()));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n } else if (this.isRangeSelection()) {\n var _tokens = text.split(' - ');\n\n value = [];\n\n for (var i = 0; i < _tokens.length; i++) {\n value[i] = this.parseDateTime(_tokens[i].trim());\n }\n }\n\n return value;\n }\n }, {\n key: \"parseDateTime\",\n value: function parseDateTime(text) {\n var date;\n var parts = text.split(' ');\n\n if (this.props.timeOnly) {\n date = new Date();\n this.populateTime(date, parts[0], parts[1]);\n } else {\n if (this.props.showTime) {\n date = this.parseDate(parts[0], this.getDateFormat());\n this.populateTime(date, parts[1], parts[2]);\n } else {\n date = this.parseDate(text, this.getDateFormat());\n }\n }\n\n return date;\n }\n }, {\n key: \"populateTime\",\n value: function populateTime(value, timeString, ampm) {\n if (this.props.hourFormat === '12' && ampm !== 'PM' && ampm !== 'AM') {\n throw new Error('Invalid Time');\n }\n\n var time = this.parseTime(timeString, ampm);\n value.setHours(time.hour);\n value.setMinutes(time.minute);\n value.setSeconds(time.second);\n value.setMilliseconds(time.millisecond);\n }\n }, {\n key: \"parseTime\",\n value: function parseTime(value, ampm) {\n value = this.props.showMillisec ? value.replace('.', ':') : value;\n var tokens = value.split(':');\n var validTokenLength = this.props.showSeconds ? 3 : 2;\n validTokenLength = this.props.showMillisec ? validTokenLength + 1 : validTokenLength;\n\n if (tokens.length !== validTokenLength || tokens[0].length !== 2 || tokens[1].length !== 2 || this.props.showSeconds && tokens[2].length !== 2 || this.props.showMillisec && tokens[3].length !== 3) {\n throw new Error('Invalid time');\n }\n\n var h = parseInt(tokens[0], 10);\n var m = parseInt(tokens[1], 10);\n var s = this.props.showSeconds ? parseInt(tokens[2], 10) : null;\n var ms = this.props.showMillisec ? parseInt(tokens[3], 10) : null;\n\n if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || this.props.hourFormat === '12' && h > 12 || this.props.showSeconds && (isNaN(s) || s > 59) || this.props.showMillisec && (isNaN(s) || s > 1000)) {\n throw new Error('Invalid time');\n } else {\n if (this.props.hourFormat === '12' && h !== 12 && ampm === 'PM') {\n h += 12;\n }\n\n return {\n hour: h,\n minute: m,\n second: s,\n millisecond: ms\n };\n }\n } // Ported from jquery-ui datepicker parseDate\n\n }, {\n key: \"parseDate\",\n value: function parseDate(value, format) {\n if (format == null || value == null) {\n throw new Error('Invalid arguments');\n }\n\n value = _typeof(value) === \"object\" ? value.toString() : value + \"\";\n\n if (value === \"\") {\n return null;\n }\n\n var iFormat,\n dim,\n extra,\n iValue = 0,\n shortYearCutoff = typeof this.props.shortYearCutoff !== \"string\" ? this.props.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.props.shortYearCutoff, 10),\n year = -1,\n month = -1,\n day = -1,\n doy = -1,\n literal = false,\n date,\n lookAhead = function lookAhead(match) {\n var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;\n\n if (matches) {\n iFormat++;\n }\n\n return matches;\n },\n getNumber = function getNumber(match) {\n var isDoubled = lookAhead(match),\n size = match === \"@\" ? 14 : match === \"!\" ? 20 : match === \"y\" && isDoubled ? 4 : match === \"o\" ? 3 : 2,\n minSize = match === \"y\" ? size : 1,\n digits = new RegExp(\"^\\\\d{\" + minSize + \",\" + size + \"}\"),\n num = value.substring(iValue).match(digits);\n\n if (!num) {\n throw new Error('Missing number at position ' + iValue);\n }\n\n iValue += num[0].length;\n return parseInt(num[0], 10);\n },\n getName = function getName(match, shortNames, longNames) {\n var index = -1;\n var arr = lookAhead(match) ? longNames : shortNames;\n var names = [];\n\n for (var i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n\n names.sort(function (a, b) {\n return -(a[1].length - b[1].length);\n });\n\n for (var _i = 0; _i < names.length; _i++) {\n var name = names[_i][1];\n\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[_i][0];\n iValue += name.length;\n break;\n }\n }\n\n if (index !== -1) {\n return index + 1;\n } else {\n throw new Error('Unknown name at position ' + iValue);\n }\n },\n checkLiteral = function checkLiteral() {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw new Error('Unexpected literal at position ' + iValue);\n }\n\n iValue++;\n };\n\n if (this.props.view === 'month') {\n day = 1;\n }\n\n var _localeOptions3 = localeOptions(this.props.locale),\n dayNamesShort = _localeOptions3.dayNamesShort,\n dayNames = _localeOptions3.dayNames,\n monthNamesShort = _localeOptions3.monthNamesShort,\n monthNames = _localeOptions3.monthNames;\n\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n } else {\n checkLiteral();\n }\n } else {\n switch (format.charAt(iFormat)) {\n case \"d\":\n day = getNumber(\"d\");\n break;\n\n case \"D\":\n getName(\"D\", dayNamesShort, dayNames);\n break;\n\n case \"o\":\n doy = getNumber(\"o\");\n break;\n\n case \"m\":\n month = getNumber(\"m\");\n break;\n\n case \"M\":\n month = getName(\"M\", monthNamesShort, monthNames);\n break;\n\n case \"y\":\n year = getNumber(\"y\");\n break;\n\n case \"@\":\n date = new Date(getNumber(\"@\"));\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n\n case \"!\":\n date = new Date((getNumber(\"!\") - this.ticksTo1970) / 10000);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n\n case \"'\":\n if (lookAhead(\"'\")) {\n checkLiteral();\n } else {\n literal = true;\n }\n\n break;\n\n default:\n checkLiteral();\n }\n }\n }\n\n if (iValue < value.length) {\n extra = value.substr(iValue);\n\n if (!/^\\s+/.test(extra)) {\n throw new Error('Extra/unparsed characters found in date: ' + extra);\n }\n }\n\n if (year === -1) {\n year = new Date().getFullYear();\n } else if (year < 100) {\n year += new Date().getFullYear() - new Date().getFullYear() % 100 + (year <= shortYearCutoff ? 0 : -100);\n }\n\n if (doy > -1) {\n month = 1;\n day = doy;\n\n do {\n dim = this.getDaysCountInMonth(year, month - 1);\n\n if (day <= dim) {\n break;\n }\n\n month++;\n day -= dim;\n } while (true);\n }\n\n date = this.daylightSavingAdjust(new Date(year, month - 1, day));\n\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw new Error('Invalid date'); // E.g. 31/02/00\n }\n\n return date;\n }\n }, {\n key: \"renderBackwardNavigator\",\n value: function renderBackwardNavigator(isVisible) {\n var _this16 = this;\n\n var navigatorProps = isVisible ? {\n 'onClick': this.onPrevButtonClick,\n 'onKeyDown': function onKeyDown(e) {\n return _this16.onContainerButtonKeydown(e);\n }\n } : {\n 'style': {\n visibility: 'hidden'\n }\n };\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"p-datepicker-prev p-link\"\n }, navigatorProps), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-prev-icon pi pi-chevron-left\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"renderForwardNavigator\",\n value: function renderForwardNavigator(isVisible) {\n var _this17 = this;\n\n var navigatorProps = isVisible ? {\n 'onClick': this.onNextButtonClick,\n 'onKeyDown': function onKeyDown(e) {\n return _this17.onContainerButtonKeydown(e);\n }\n } : {\n 'style': {\n visibility: 'hidden'\n }\n };\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"p-datepicker-next p-link\"\n }, navigatorProps), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-next-icon pi pi-chevron-right\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"isInMinYear\",\n value: function isInMinYear(viewDate) {\n return this.props.minDate && this.props.minDate.getFullYear() === viewDate.getFullYear();\n }\n }, {\n key: \"isInMaxYear\",\n value: function isInMaxYear(viewDate) {\n return this.props.maxDate && this.props.maxDate.getFullYear() === viewDate.getFullYear();\n }\n }, {\n key: \"renderTitleMonthElement\",\n value: function renderTitleMonthElement(month) {\n var _this18 = this;\n\n var monthNames = localeOption('monthNames', this.props.locale);\n\n if (this.props.monthNavigator && this.props.view !== 'month') {\n var viewDate = this.getViewDate();\n var viewMonth = viewDate.getMonth();\n var displayedMonthOptions = monthNames.map(function (month, index) {\n return (!_this18.isInMinYear(viewDate) || index >= _this18.props.minDate.getMonth()) && (!_this18.isInMaxYear(viewDate) || index <= _this18.props.maxDate.getMonth()) ? {\n label: month,\n value: index,\n index: index\n } : null;\n }).filter(function (option) {\n return !!option;\n });\n var displayedMonthNames = displayedMonthOptions.map(function (option) {\n return option.label;\n });\n var content = /*#__PURE__*/React.createElement(\"select\", {\n className: \"p-datepicker-month\",\n onChange: function onChange(e) {\n return _this18.onMonthDropdownChange(e, e.target.value);\n },\n value: viewMonth\n }, displayedMonthOptions.map(function (option) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: option.label,\n value: option.value\n }, option.label);\n }));\n\n if (this.props.monthNavigatorTemplate) {\n var defaultContentOptions = {\n onChange: this.onMonthDropdownChange,\n className: 'p-datepicker-month',\n value: viewMonth,\n names: displayedMonthNames,\n options: displayedMonthOptions,\n element: content,\n props: this.props\n };\n return ObjectUtils.getJSXElement(this.props.monthNavigatorTemplate, defaultContentOptions);\n }\n\n return content;\n } else {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-month\"\n }, monthNames[month]);\n }\n }\n }, {\n key: \"renderTitleYearElement\",\n value: function renderTitleYearElement(year) {\n var _this19 = this;\n\n if (this.props.yearNavigator) {\n var yearOptions = [];\n var years = this.props.yearRange.split(':');\n var yearStart = parseInt(years[0], 10);\n var yearEnd = parseInt(years[1], 10);\n\n for (var i = yearStart; i <= yearEnd; i++) {\n yearOptions.push(i);\n }\n\n var viewDate = this.getViewDate();\n var viewYear = viewDate.getFullYear();\n var displayedYearNames = yearOptions.filter(function (year) {\n return !(_this19.props.minDate && _this19.props.minDate.getFullYear() > year) && !(_this19.props.maxDate && _this19.props.maxDate.getFullYear() < year);\n });\n var content = /*#__PURE__*/React.createElement(\"select\", {\n className: \"p-datepicker-year\",\n onChange: function onChange(e) {\n return _this19.onYearDropdownChange(e, e.target.value);\n },\n value: viewYear\n }, displayedYearNames.map(function (year) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: year,\n value: year\n }, year);\n }));\n\n if (this.props.yearNavigatorTemplate) {\n var options = displayedYearNames.map(function (name, i) {\n return {\n label: name,\n value: name,\n index: i\n };\n });\n var defaultContentOptions = {\n onChange: this.onYearDropdownChange,\n className: 'p-datepicker-year',\n value: viewYear,\n names: displayedYearNames,\n options: options,\n element: content,\n props: this.props\n };\n return ObjectUtils.getJSXElement(this.props.yearNavigatorTemplate, defaultContentOptions);\n }\n\n return content;\n } else {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-year\"\n }, year);\n }\n }\n }, {\n key: \"renderTitle\",\n value: function renderTitle(monthMetaData) {\n var month = this.renderTitleMonthElement(monthMetaData.month);\n var year = this.renderTitleYearElement(monthMetaData.year);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-title\"\n }, month, year);\n }\n }, {\n key: \"renderDayNames\",\n value: function renderDayNames(weekDays) {\n var dayNames = weekDays.map(function (weekDay, index) {\n return /*#__PURE__*/React.createElement(\"th\", {\n key: \"\".concat(weekDay, \"-\").concat(index),\n scope: \"col\"\n }, /*#__PURE__*/React.createElement(\"span\", null, weekDay));\n });\n\n if (this.props.showWeek) {\n var weekHeader = /*#__PURE__*/React.createElement(\"th\", {\n scope: \"col\",\n key: 'wn',\n className: \"p-datepicker-weekheader p-disabled\"\n }, /*#__PURE__*/React.createElement(\"span\", null, localeOption('weekHeader', this.props.locale)));\n return [weekHeader].concat(_toConsumableArray(dayNames));\n } else {\n return dayNames;\n }\n }\n }, {\n key: \"renderDateCellContent\",\n value: function renderDateCellContent(date, className, groupIndex) {\n var _this20 = this;\n\n var content = this.props.dateTemplate ? this.props.dateTemplate(date) : date.day;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: className,\n onClick: function onClick(e) {\n return _this20.onDateSelect(e, date);\n },\n onKeyDown: function onKeyDown(e) {\n return _this20.onDateCellKeydown(e, date, groupIndex);\n }\n }, content, /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"renderWeek\",\n value: function renderWeek(weekDates, weekNumber, groupIndex) {\n var _this21 = this;\n\n var week = weekDates.map(function (date) {\n var selected = _this21.isSelected(date);\n\n var cellClassName = classNames({\n 'p-datepicker-other-month': date.otherMonth,\n 'p-datepicker-today': date.today\n });\n var dateClassName = classNames({\n 'p-highlight': selected,\n 'p-disabled': !date.selectable\n });\n var content = date.otherMonth && !_this21.props.showOtherMonths ? null : _this21.renderDateCellContent(date, dateClassName, groupIndex);\n return /*#__PURE__*/React.createElement(\"td\", {\n key: date.day,\n className: cellClassName\n }, content);\n });\n\n if (this.props.showWeek) {\n var weekNumberCell = /*#__PURE__*/React.createElement(\"td\", {\n key: 'wn' + weekNumber,\n className: \"p-datepicker-weeknumber\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-disabled\"\n }, weekNumber));\n return [weekNumberCell].concat(_toConsumableArray(week));\n } else {\n return week;\n }\n }\n }, {\n key: \"renderDates\",\n value: function renderDates(monthMetaData, groupIndex) {\n var _this22 = this;\n\n return monthMetaData.dates.map(function (weekDates, index) {\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: index\n }, _this22.renderWeek(weekDates, monthMetaData.weekNumbers[index], groupIndex));\n });\n }\n }, {\n key: \"renderDateViewGrid\",\n value: function renderDateViewGrid(monthMetaData, weekDays, groupIndex) {\n var dayNames = this.renderDayNames(weekDays);\n var dates = this.renderDates(monthMetaData, groupIndex);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-calendar-container\"\n }, /*#__PURE__*/React.createElement(\"table\", {\n className: \"p-datepicker-calendar\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, dayNames)), /*#__PURE__*/React.createElement(\"tbody\", null, dates)));\n }\n }, {\n key: \"renderMonth\",\n value: function renderMonth(monthMetaData, index) {\n var weekDays = this.createWeekDays();\n var backwardNavigator = this.renderBackwardNavigator(index === 0);\n var forwardNavigator = this.renderForwardNavigator(this.props.numberOfMonths === 1 || index === this.props.numberOfMonths - 1);\n var title = this.renderTitle(monthMetaData);\n var dateViewGrid = this.renderDateViewGrid(monthMetaData, weekDays, index);\n var header = this.props.headerTemplate ? this.props.headerTemplate() : null;\n return /*#__PURE__*/React.createElement(\"div\", {\n key: monthMetaData.month,\n className: \"p-datepicker-group\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-header\"\n }, header, backwardNavigator, title, forwardNavigator), dateViewGrid);\n }\n }, {\n key: \"renderMonths\",\n value: function renderMonths(monthsMetaData) {\n var _this23 = this;\n\n var groups = monthsMetaData.map(function (monthMetaData, index) {\n return _this23.renderMonth(monthMetaData, index);\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-group-container\"\n }, groups);\n }\n }, {\n key: \"renderDateView\",\n value: function renderDateView() {\n var viewDate = this.getViewDate();\n var monthsMetaData = this.createMonths(viewDate.getMonth(), viewDate.getFullYear());\n var months = this.renderMonths(monthsMetaData);\n return /*#__PURE__*/React.createElement(React.Fragment, null, months);\n }\n }, {\n key: \"renderMonthViewMonth\",\n value: function renderMonthViewMonth(index) {\n var _this24 = this;\n\n var className = classNames('p-monthpicker-month', {\n 'p-highlight': this.isMonthSelected(index)\n });\n var monthNamesShort = localeOption('monthNamesShort', this.props.locale);\n var monthName = monthNamesShort[index];\n return /*#__PURE__*/React.createElement(\"span\", {\n key: monthName,\n className: className,\n onClick: function onClick(event) {\n return _this24.onMonthSelect(event, index);\n },\n onKeyDown: function onKeyDown(event) {\n return _this24.onMonthCellKeydown(event, index);\n }\n }, monthName, /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"renderMonthViewMonths\",\n value: function renderMonthViewMonths() {\n var months = [];\n\n for (var i = 0; i <= 11; i++) {\n months.push(this.renderMonthViewMonth(i));\n }\n\n return months;\n }\n }, {\n key: \"renderMonthView\",\n value: function renderMonthView() {\n var backwardNavigator = this.renderBackwardNavigator(true);\n var forwardNavigator = this.renderForwardNavigator(true);\n var yearElement = this.renderTitleYearElement(this.getViewDate().getFullYear());\n var months = this.renderMonthViewMonths();\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-group-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-group\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-header\"\n }, backwardNavigator, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-title\"\n }, yearElement), forwardNavigator))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-monthpicker\"\n }, months));\n }\n }, {\n key: \"renderDatePicker\",\n value: function renderDatePicker() {\n if (!this.props.timeOnly) {\n if (this.props.view === 'date') {\n return this.renderDateView();\n } else if (this.props.view === 'month') {\n return this.renderMonthView();\n } else {\n return null;\n }\n }\n }\n }, {\n key: \"renderHourPicker\",\n value: function renderHourPicker() {\n var _this25 = this;\n\n var currentTime = this.getCurrentDateTime();\n var hour = currentTime.getHours();\n\n if (this.props.hourFormat === '12') {\n if (hour === 0) hour = 12;else if (hour > 11 && hour !== 12) hour = hour - 12;\n }\n\n var hourDisplay = hour < 10 ? '0' + hour : hour;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-hour-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this25.onTimePickerElementMouseDown(e, 0, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this25.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, hourDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this25.onTimePickerElementMouseDown(e, 0, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this25.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n }, {\n key: \"renderMinutePicker\",\n value: function renderMinutePicker() {\n var _this26 = this;\n\n var currentTime = this.getCurrentDateTime();\n var minute = currentTime.getMinutes();\n var minuteDisplay = minute < 10 ? '0' + minute : minute;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-minute-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this26.onTimePickerElementMouseDown(e, 1, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this26.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, minuteDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this26.onTimePickerElementMouseDown(e, 1, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this26.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n }, {\n key: \"renderSecondPicker\",\n value: function renderSecondPicker() {\n var _this27 = this;\n\n if (this.props.showSeconds) {\n var currentTime = this.getCurrentDateTime();\n var second = currentTime.getSeconds();\n var secondDisplay = second < 10 ? '0' + second : second;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-second-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this27.onTimePickerElementMouseDown(e, 2, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this27.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, secondDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this27.onTimePickerElementMouseDown(e, 2, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this27.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n\n return null;\n }\n }, {\n key: \"renderMiliSecondPicker\",\n value: function renderMiliSecondPicker() {\n var _this28 = this;\n\n if (this.props.showMillisec) {\n var currentTime = this.getCurrentDateTime();\n var millisecond = currentTime.getMilliseconds();\n var millisecondDisplay = millisecond < 100 ? (millisecond < 10 ? '00' : '0') + millisecond : millisecond;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-millisecond-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this28.onTimePickerElementMouseDown(e, 3, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this28.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, millisecondDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this28.onTimePickerElementMouseDown(e, 3, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this28.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n\n return null;\n }\n }, {\n key: \"renderAmPmPicker\",\n value: function renderAmPmPicker() {\n if (this.props.hourFormat === '12') {\n var currentTime = this.getCurrentDateTime();\n var hour = currentTime.getHours();\n var display = hour > 11 ? 'PM' : 'AM';\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-ampm-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onClick: this.toggleAmPm\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, display), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onClick: this.toggleAmPm\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n\n return null;\n }\n }, {\n key: \"renderSeparator\",\n value: function renderSeparator(separator) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-separator\"\n }, /*#__PURE__*/React.createElement(\"span\", null, separator));\n }\n }, {\n key: \"renderTimePicker\",\n value: function renderTimePicker() {\n if (this.props.showTime || this.props.timeOnly) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-timepicker\"\n }, this.renderHourPicker(), this.renderSeparator(':'), this.renderMinutePicker(), this.props.showSeconds && this.renderSeparator(':'), this.renderSecondPicker(), this.props.showMillisec && this.renderSeparator('.'), this.renderMiliSecondPicker(), this.props.hourFormat === '12' && this.renderSeparator(':'), this.renderAmPmPicker());\n }\n\n return null;\n }\n }, {\n key: \"renderInputElement\",\n value: function renderInputElement() {\n if (!this.props.inline) {\n return /*#__PURE__*/React.createElement(InputText, {\n ref: this.inputRef,\n id: this.props.inputId,\n name: this.props.name,\n type: \"text\",\n className: this.props.inputClassName,\n style: this.props.inputStyle,\n readOnly: this.props.readOnlyInput,\n disabled: this.props.disabled,\n required: this.props.required,\n autoComplete: \"off\",\n placeholder: this.props.placeholder,\n tabIndex: this.props.tabIndex,\n onInput: this.onUserInput,\n onFocus: this.onInputFocus,\n onBlur: this.onInputBlur,\n onKeyDown: this.onInputKeyDown,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n inputMode: this.props.inputMode\n });\n }\n\n return null;\n }\n }, {\n key: \"renderButton\",\n value: function renderButton() {\n if (this.props.showIcon) {\n return /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n icon: this.props.icon,\n onClick: this.onButtonClick,\n tabIndex: \"-1\",\n disabled: this.props.disabled,\n className: \"p-datepicker-trigger\"\n });\n }\n\n return null;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var input = this.renderInputElement();\n var button = this.renderButton();\n\n if (this.props.iconPos === 'left') {\n return /*#__PURE__*/React.createElement(React.Fragment, null, button, input);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, input, button);\n }\n }, {\n key: \"renderButtonBar\",\n value: function renderButtonBar() {\n var _this29 = this;\n\n if (this.props.showButtonBar) {\n var todayClassName = classNames('p-button-text', this.props.todayButtonClassName);\n var clearClassName = classNames('p-button-text', this.props.clearButtonClassName);\n\n var _localeOptions4 = localeOptions(this.props.locale),\n today = _localeOptions4.today,\n clear = _localeOptions4.clear;\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-buttonbar\"\n }, /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n label: today,\n onClick: this.onTodayButtonClick,\n onKeyDown: function onKeyDown(e) {\n return _this29.onContainerButtonKeydown(e);\n },\n className: todayClassName\n }), /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n label: clear,\n onClick: this.onClearButtonClick,\n onKeyDown: function onKeyDown(e) {\n return _this29.onContainerButtonKeydown(e);\n },\n className: clearClassName\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n if (this.props.footerTemplate) {\n var content = this.props.footerTemplate();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-footer\"\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames,\n _this30 = this;\n\n var className = classNames('p-calendar p-component p-inputwrapper', this.props.className, (_classNames = {}, _defineProperty(_classNames, \"p-calendar-w-btn p-calendar-w-btn-\".concat(this.props.iconPos), this.props.showIcon), _defineProperty(_classNames, 'p-calendar-disabled', this.props.disabled), _defineProperty(_classNames, 'p-calendar-timeonly', this.props.timeOnly), _defineProperty(_classNames, 'p-inputwrapper-filled', this.props.value || DomHandler.hasClass(this.inputRef.current, 'p-filled') && this.inputRef.current.value !== ''), _defineProperty(_classNames, 'p-inputwrapper-focus', this.state.focused), _classNames));\n var panelClassName = classNames('p-datepicker p-component', this.props.panelClassName, {\n 'p-datepicker-inline': this.props.inline,\n 'p-disabled': this.props.disabled,\n 'p-datepicker-timeonly': this.props.timeOnly,\n 'p-datepicker-multiple-month': this.props.numberOfMonths > 1,\n 'p-datepicker-monthpicker': this.props.view === 'month',\n 'p-datepicker-touch-ui': this.props.touchUI\n });\n var content = this.renderContent();\n var datePicker = this.renderDatePicker();\n var timePicker = this.renderTimePicker();\n var buttonBar = this.renderButtonBar();\n var footer = this.renderFooter();\n var isVisible = this.props.inline || this.isVisible();\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: function ref(el) {\n return _this30.container = el;\n },\n id: this.props.id,\n className: className,\n style: this.props.style\n }, content, /*#__PURE__*/React.createElement(CalendarPanel, {\n ref: this.overlayRef,\n className: panelClassName,\n style: this.props.panelStyle,\n appendTo: this.props.appendTo,\n inline: this.props.inline,\n onClick: this.onPanelClick,\n onMouseUp: this.onPanelMouseUp,\n \"in\": isVisible,\n onEnter: this.onOverlayEnter,\n onEntered: this.onOverlayEntered,\n onExit: this.onOverlayExit,\n onExited: this.onOverlayExited,\n transitionOptions: this.props.transitionOptions\n }, datePicker, timePicker, buttonBar, footer));\n }\n }]);\n\n return Calendar;\n}(Component);\n\n_defineProperty(Calendar, \"defaultProps\", {\n id: null,\n inputRef: null,\n name: null,\n value: null,\n visible: false,\n viewDate: null,\n style: null,\n className: null,\n inline: false,\n selectionMode: 'single',\n inputId: null,\n inputStyle: null,\n inputClassName: null,\n inputMode: 'none',\n required: false,\n readOnlyInput: false,\n keepInvalid: false,\n mask: null,\n disabled: false,\n tabIndex: null,\n placeholder: null,\n showIcon: false,\n icon: 'pi pi-calendar',\n iconPos: 'right',\n showOnFocus: true,\n numberOfMonths: 1,\n view: 'date',\n touchUI: false,\n showTime: false,\n timeOnly: false,\n showSeconds: false,\n showMillisec: false,\n hourFormat: '24',\n stepHour: 1,\n stepMinute: 1,\n stepSecond: 1,\n stepMillisec: 1,\n shortYearCutoff: '+10',\n hideOnDateTimeSelect: false,\n showWeek: false,\n locale: null,\n dateFormat: null,\n panelStyle: null,\n panelClassName: null,\n monthNavigator: false,\n yearNavigator: false,\n yearRange: null,\n disabledDates: null,\n disabledDays: null,\n minDate: null,\n maxDate: null,\n maxDateCount: null,\n showOtherMonths: true,\n selectOtherMonths: false,\n showButtonBar: false,\n todayButtonClassName: 'p-button-secondary',\n clearButtonClassName: 'p-button-secondary',\n autoZIndex: true,\n baseZIndex: 0,\n appendTo: null,\n tooltip: null,\n tooltipOptions: null,\n ariaLabelledBy: null,\n dateTemplate: null,\n headerTemplate: null,\n footerTemplate: null,\n monthNavigatorTemplate: null,\n yearNavigatorTemplate: null,\n transitionOptions: null,\n onVisibleChange: null,\n onFocus: null,\n onBlur: null,\n onInput: null,\n onSelect: null,\n onChange: null,\n onViewDateChange: null,\n onTodayButtonClick: null,\n onClearButtonClick: null,\n onShow: null,\n onHide: null\n});\n\nexport { Calendar };","map":{"version":3,"names":["React","Component","createRef","InputText","Button","CSSTransition","Portal","mask","ZIndexUtils","DomHandler","ConnectedOverlayScrollHandler","ObjectUtils","classNames","tip","Ripple","PrimeReact","localeOption","localeOptions","OverlayService","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_typeof","obj","Symbol","iterator","constructor","_arrayLikeToArray$1","arr","len","arr2","Array","_arrayWithoutHoles","isArray","_iterableToArray","iter","from","_unsupportedIterableToArray$1","o","minLen","n","toString","slice","name","test","_nonIterableSpread","TypeError","_toConsumableArray","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","value","_possibleConstructorReturn","_getPrototypeOf","getPrototypeOf","_defineProperty","_createSuper$1","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct$1","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","e","CalendarPanelComponent","_Component","_super","renderElement","createElement","nodeRef","forwardRef","timeout","enter","exit","options","transitionOptions","unmountOnExit","onEnter","onEntered","onExit","onExited","ref","className","style","onClick","onMouseUp","children","render","element","inline","appendTo","CalendarPanel","_createForOfIteratorHelper","allowArrayLike","it","_unsupportedIterableToArray","F","s","done","_e","f","normalCompletion","didErr","err","step","next","_e2","_arrayLikeToArray","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","_objectSpread","forEach","getOwnPropertyDescriptors","defineProperties","_createSuper","_isNativeReflectConstruct","Calendar","_this","state","focused","overlayVisible","onViewDateChange","viewDate","getViewDate","validateDate","navigation","onUserInput","bind","onInputFocus","onInputBlur","onInputKeyDown","onButtonClick","onPrevButtonClick","onNextButtonClick","onMonthDropdownChange","onYearDropdownChange","onTodayButtonClick","onClearButtonClick","onPanelClick","onPanelMouseUp","incrementHour","decrementHour","incrementMinute","decrementMinute","incrementSecond","decrementSecond","toggleAmPm","onTimePickerElementMouseDown","onTimePickerElementMouseUp","onTimePickerElementMouseLeave","onOverlayEnter","onOverlayEntered","onOverlayExit","onOverlayExited","reFocusInputField","overlayRef","inputRef","updateInputRef","current","componentDidMount","_this2","tooltip","renderTooltip","initFocusableCell","readOnly","readOnlyInput","disabled","onChange","updateValueOnInput","originalEvent","updateInputfield","componentDidUpdate","prevProps","_this3","tooltipOptions","update","content","viewStateChanged","propValue","prevPropValue","Date","getTime","isValidDate","setState","updateFocus","isVisible","isOptionChanged","componentWillUnmount","hideTimeout","clearTimeout","touchUIMask","disableModality","destroy","unbindDocumentClickListener","unbindDocumentResizeListener","scrollHandler","clear","onVisibleChange","visible","_this4","optionProps","some","option","getDateFormat","dateFormat","locale","event","_this5","ignoreFocusFunctionality","persist","showOnFocus","showOverlay","onFocus","_this6","onBlur","keepInvalid","isKeydown","which","hideOverlay","trapFocus","touchUI","onInput","rawValue","parseValueFromString","isValidSelection","updateModel","updateViewDate","_value","focus","_this7","isValid","isSingleSelection","isSelectable","getDate","getMonth","getFullYear","isSelectableTime","every","v","isRangeSelection","backward","button","navBackward","navForward","onContainerButtonKeydown","preventDefault","focusableElements","getFocusableElements","document","activeElement","focusedIndex","indexOf","shiftKey","cell","findSingle","cells","find","tabIndex","view","selectedCell","todayCell","newViewDate","setDate","setMonth","setFullYear","currentYear","newYear","yearNavigator","minYear","parseInt","yearRange","split","maxYear","currentViewDate","today","dateMeta","day","month","year","selectable","timeMeta","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds","onDateSelect","emit","container","type","direction","repeat","clearTimePickerTimer","interval","_this8","timePickerTimer","setTimeout","incrementMilliSecond","decrementMilliSecond","currentTime","getCurrentDateTime","currentHour","newHour","stepHour","validateHour","maxDate","toDateString","updateTime","minDate","doStepMinute","currentMinute","stepMinute","newMinute","Math","floor","validateMinute","currentSecond","newSecond","stepSecond","validateSecond","currentMillisecond","newMillisecond","stepMillisec","validateMillisecond","date","isMultipleSelection","startDate","endDate","isNaN","hour","valid","valueDateString","minute","second","millisecond","viewYear","minRangeYear","maxRangeYear","max","min","monthNavigator","viewMonth","viewMonthWithMinMax","isInMinYear","isInMaxYear","newDateTime","setHours","setMinutes","setSeconds","setMilliseconds","onSelect","onDateCellKeydown","groupIndex","cellContent","currentTarget","parentElement","cellIndex","index","nextRow","nextElementSibling","focusCell","hasClass","_cellIndex","prevRow","previousElementSibling","_focusCell","prevCell","_focusCell2","navigateToMonth","nextCell","_focusCell3","prev","numberOfMonths","prevMonthContainer","nextMonthContainer","_focusCell4","onMonthCellKeydown","_nextCell","onMonthSelect","_this9","isSelected","isDateEquals","maxDateCount","selectDate","showTime","hideOnDateTimeSelect","selectTime","time","_ref","selectedValues","concat","newValue","stopPropagation","id","_this10","overlayEventListener","isOutsideClicked","isOverlayClicked","on","callback","_this11","_hideCallback","off","autoZIndex","set","baseZIndex","zIndex","alignOverlay","bindDocumentClickListener","bindDocumentResizeListener","bindScrollListener","onShow","unbindScrollListener","onHide","_this12","documentClickListener","addEventListener","removeEventListener","documentResizeListener","onWindowResize","window","_this13","isSameNode","isNavIconClicked","contains","isTouchDevice","enableModality","_this14","String","get","addMultipleClasses","touchUIMaskClickListener","body","appendChild","addClass","_this15","destroyMask","removeChild","bodyChildren","hasBlockerMasks","bodyChild","removeClass","getFirstDayOfMonthIndex","dayIndex","getDay","getSundayIndex","getDaysCountInMonth","daylightSavingAdjust","getDaysCountInPrevMonth","getPreviousMonthAndYear","m","y","getNextMonthAndYear","firstDayOfWeek","createWeekDays","weekDays","_localeOptions","dayNamesMin","createMonths","months","createMonth","dates","firstDay","daysLength","prevMonthDaysLength","dayNo","weekNumbers","monthRows","ceil","week","j","otherMonth","isToday","remainingDaysLength","_j","_j2","showWeek","getWeekNumber","checkDate","round","validMin","validMax","validDate","validDay","validMonth","disabledDates","isDateDisabled","disabledDays","isDayDisabled","selectOtherMonths","selected","_iterator","_step","isDateBetween","isMonthSelected","start","end","between","selectionMode","disabledDate","weekday","weekdayNumber","formattedValue","formatDateTime","selectedValue","dateAsString","timeOnly","formatTime","formatDate","format","iFormat","lookAhead","match","matches","charAt","formatNumber","num","formatName","shortNames","longNames","output","literal","_localeOptions2","dayNamesShort","dayNames","monthNamesShort","monthNames","ticksTo1970","hourFormat","showSeconds","showMillisec","text","trim","parseDateTime","tokens","_iterator2","_step2","token","_tokens","parts","populateTime","parseDate","timeString","ampm","Error","parseTime","replace","validTokenLength","h","ms","dim","extra","iValue","shortYearCutoff","doy","getNumber","isDoubled","size","minSize","digits","RegExp","substring","getName","names","sort","a","b","_i","substr","toLowerCase","checkLiteral","_localeOptions3","renderBackwardNavigator","_this16","navigatorProps","onKeyDown","visibility","renderForwardNavigator","_this17","renderTitleMonthElement","_this18","displayedMonthOptions","map","label","displayedMonthNames","monthNavigatorTemplate","defaultContentOptions","getJSXElement","renderTitleYearElement","_this19","yearOptions","years","yearStart","yearEnd","displayedYearNames","yearNavigatorTemplate","renderTitle","monthMetaData","renderDayNames","weekDay","scope","weekHeader","renderDateCellContent","_this20","dateTemplate","renderWeek","weekDates","weekNumber","_this21","cellClassName","dateClassName","showOtherMonths","weekNumberCell","renderDates","_this22","renderDateViewGrid","renderMonth","backwardNavigator","forwardNavigator","title","dateViewGrid","header","headerTemplate","renderMonths","monthsMetaData","_this23","groups","renderDateView","Fragment","renderMonthViewMonth","_this24","monthName","renderMonthViewMonths","renderMonthView","yearElement","renderDatePicker","renderHourPicker","_this25","hourDisplay","onMouseDown","onMouseLeave","renderMinutePicker","_this26","minuteDisplay","renderSecondPicker","_this27","secondDisplay","renderMiliSecondPicker","_this28","millisecondDisplay","renderAmPmPicker","display","renderSeparator","separator","renderTimePicker","renderInputElement","inputId","inputClassName","inputStyle","required","autoComplete","placeholder","ariaLabelledBy","inputMode","renderButton","showIcon","icon","renderContent","input","iconPos","renderButtonBar","_this29","showButtonBar","todayClassName","todayButtonClassName","clearClassName","clearButtonClassName","_localeOptions4","renderFooter","footerTemplate","_classNames","_this30","panelClassName","datePicker","timePicker","buttonBar","footer","el","panelStyle"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/calendar/calendar.esm.js"],"sourcesContent":["import React, { Component, createRef } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { Button } from 'primereact/button';\nimport { CSSTransition } from 'primereact/csstransition';\nimport { Portal } from 'primereact/portal';\nimport { mask, ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler, ObjectUtils, classNames } from 'primereact/utils';\nimport { tip } from 'primereact/tooltip';\nimport { Ripple } from 'primereact/ripple';\nimport PrimeReact, { localeOption, localeOptions } from 'primereact/api';\nimport { OverlayService } from 'primereact/overlayservice';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _arrayLikeToArray$1(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray$1(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$1() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar CalendarPanelComponent = /*#__PURE__*/function (_Component) {\n _inherits(CalendarPanelComponent, _Component);\n\n var _super = _createSuper$1(CalendarPanelComponent);\n\n function CalendarPanelComponent() {\n _classCallCheck(this, CalendarPanelComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CalendarPanelComponent, [{\n key: \"renderElement\",\n value: function renderElement() {\n return /*#__PURE__*/React.createElement(CSSTransition, {\n nodeRef: this.props.forwardRef,\n classNames: \"p-connected-overlay\",\n \"in\": this.props[\"in\"],\n timeout: {\n enter: 120,\n exit: 100\n },\n options: this.props.transitionOptions,\n unmountOnExit: true,\n onEnter: this.props.onEnter,\n onEntered: this.props.onEntered,\n onExit: this.props.onExit,\n onExited: this.props.onExited\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: this.props.forwardRef,\n className: this.props.className,\n style: this.props.style,\n onClick: this.props.onClick,\n onMouseUp: this.props.onMouseUp\n }, this.props.children));\n }\n }, {\n key: \"render\",\n value: function render() {\n var element = this.renderElement();\n return this.props.inline ? element : /*#__PURE__*/React.createElement(Portal, {\n element: element,\n appendTo: this.props.appendTo\n });\n }\n }]);\n\n return CalendarPanelComponent;\n}(Component);\n\n_defineProperty(CalendarPanelComponent, \"defaultProps\", {\n appendTo: null,\n style: null,\n className: null\n});\n\nvar CalendarPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(CalendarPanelComponent, _extends({\n forwardRef: ref\n }, props));\n});\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar Calendar = /*#__PURE__*/function (_Component) {\n _inherits(Calendar, _Component);\n\n var _super = _createSuper(Calendar);\n\n function Calendar(props) {\n var _this;\n\n _classCallCheck(this, Calendar);\n\n _this = _super.call(this, props);\n _this.state = {\n focused: false,\n overlayVisible: false\n };\n\n if (!_this.props.onViewDateChange) {\n var viewDate = _this.getViewDate(_this.props.viewDate);\n\n _this.validateDate(viewDate);\n\n _this.state = _objectSpread(_objectSpread({}, _this.state), {}, {\n viewDate: viewDate\n });\n }\n\n _this.navigation = null;\n _this.onUserInput = _this.onUserInput.bind(_assertThisInitialized(_this));\n _this.onInputFocus = _this.onInputFocus.bind(_assertThisInitialized(_this));\n _this.onInputBlur = _this.onInputBlur.bind(_assertThisInitialized(_this));\n _this.onInputKeyDown = _this.onInputKeyDown.bind(_assertThisInitialized(_this));\n _this.onButtonClick = _this.onButtonClick.bind(_assertThisInitialized(_this));\n _this.onPrevButtonClick = _this.onPrevButtonClick.bind(_assertThisInitialized(_this));\n _this.onNextButtonClick = _this.onNextButtonClick.bind(_assertThisInitialized(_this));\n _this.onMonthDropdownChange = _this.onMonthDropdownChange.bind(_assertThisInitialized(_this));\n _this.onYearDropdownChange = _this.onYearDropdownChange.bind(_assertThisInitialized(_this));\n _this.onTodayButtonClick = _this.onTodayButtonClick.bind(_assertThisInitialized(_this));\n _this.onClearButtonClick = _this.onClearButtonClick.bind(_assertThisInitialized(_this));\n _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));\n _this.onPanelMouseUp = _this.onPanelMouseUp.bind(_assertThisInitialized(_this));\n _this.incrementHour = _this.incrementHour.bind(_assertThisInitialized(_this));\n _this.decrementHour = _this.decrementHour.bind(_assertThisInitialized(_this));\n _this.incrementMinute = _this.incrementMinute.bind(_assertThisInitialized(_this));\n _this.decrementMinute = _this.decrementMinute.bind(_assertThisInitialized(_this));\n _this.incrementSecond = _this.incrementSecond.bind(_assertThisInitialized(_this));\n _this.decrementSecond = _this.decrementSecond.bind(_assertThisInitialized(_this));\n _this.toggleAmPm = _this.toggleAmPm.bind(_assertThisInitialized(_this));\n _this.onTimePickerElementMouseDown = _this.onTimePickerElementMouseDown.bind(_assertThisInitialized(_this));\n _this.onTimePickerElementMouseUp = _this.onTimePickerElementMouseUp.bind(_assertThisInitialized(_this));\n _this.onTimePickerElementMouseLeave = _this.onTimePickerElementMouseLeave.bind(_assertThisInitialized(_this));\n _this.onOverlayEnter = _this.onOverlayEnter.bind(_assertThisInitialized(_this));\n _this.onOverlayEntered = _this.onOverlayEntered.bind(_assertThisInitialized(_this));\n _this.onOverlayExit = _this.onOverlayExit.bind(_assertThisInitialized(_this));\n _this.onOverlayExited = _this.onOverlayExited.bind(_assertThisInitialized(_this));\n _this.reFocusInputField = _this.reFocusInputField.bind(_assertThisInitialized(_this));\n _this.overlayRef = /*#__PURE__*/createRef();\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(Calendar, [{\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.updateInputRef();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n\n if (this.props.inline) {\n this.initFocusableCell();\n } else if (this.props.mask) {\n mask(this.inputRef.current, {\n mask: this.props.mask,\n readOnly: this.props.readOnlyInput || this.props.disabled,\n onChange: function onChange(e) {\n return _this2.updateValueOnInput(e.originalEvent, e.value);\n }\n });\n }\n\n if (this.props.value) {\n this.updateInputfield(this.props.value);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this3 = this;\n\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n\n if (!this.props.onViewDateChange && !this.viewStateChanged) {\n var propValue = this.props.value;\n\n if (Array.isArray(propValue)) {\n propValue = propValue[0];\n }\n\n var prevPropValue = prevProps.value;\n\n if (Array.isArray(prevPropValue)) {\n prevPropValue = prevPropValue[0];\n }\n\n if (!prevPropValue && propValue || propValue && propValue instanceof Date && propValue.getTime() !== prevPropValue.getTime()) {\n var viewDate = this.props.viewDate && this.isValidDate(this.props.viewDate) ? this.props.viewDate : propValue && this.isValidDate(propValue) ? propValue : new Date();\n this.validateDate(viewDate);\n this.setState({\n viewDate: viewDate\n }, function () {\n _this3.viewStateChanged = true;\n });\n }\n }\n\n if (this.overlayRef && this.overlayRef.current) {\n this.updateFocus();\n }\n\n if (prevProps.value !== this.props.value && (!this.viewStateChanged || !this.isVisible()) || this.isOptionChanged(prevProps)) {\n this.updateInputfield(this.props.value);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n }\n\n if (this.touchUIMask) {\n this.disableModality();\n this.touchUIMask = null;\n }\n\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n ZIndexUtils.clear(this.overlayRef.current);\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.inputRef.current,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"isVisible\",\n value: function isVisible() {\n return this.props.onVisibleChange ? this.props.visible : this.state.overlayVisible;\n }\n }, {\n key: \"isOptionChanged\",\n value: function isOptionChanged(prevProps) {\n var _this4 = this;\n\n var optionProps = ['dateFormat', 'hourFormat', 'timeOnly', 'showSeconds', 'showMillisec'];\n return optionProps.some(function (option) {\n return prevProps[option] !== _this4.props[option];\n });\n }\n }, {\n key: \"getDateFormat\",\n value: function getDateFormat() {\n return this.props.dateFormat || localeOption('dateFormat', this.props.locale);\n }\n }, {\n key: \"onInputFocus\",\n value: function onInputFocus(event) {\n var _this5 = this;\n\n if (this.ignoreFocusFunctionality) {\n this.setState({\n focused: true\n }, function () {\n _this5.ignoreFocusFunctionality = false;\n });\n } else {\n event.persist();\n\n if (this.props.showOnFocus && !this.isVisible()) {\n this.showOverlay();\n }\n\n this.setState({\n focused: true\n }, function () {\n if (_this5.props.onFocus) {\n _this5.props.onFocus(event);\n }\n });\n }\n }\n }, {\n key: \"onInputBlur\",\n value: function onInputBlur(event) {\n var _this6 = this;\n\n event.persist();\n this.setState({\n focused: false\n }, function () {\n if (_this6.props.onBlur) {\n _this6.props.onBlur(event);\n }\n\n if (!_this6.props.keepInvalid) {\n _this6.updateInputfield(_this6.props.value);\n }\n });\n }\n }, {\n key: \"onInputKeyDown\",\n value: function onInputKeyDown(event) {\n this.isKeydown = true;\n\n switch (event.which) {\n //escape\n case 27:\n {\n this.hideOverlay();\n break;\n }\n //tab\n\n case 9:\n {\n if (this.isVisible()) {\n this.trapFocus(event);\n }\n\n if (this.props.touchUI) {\n this.disableModality();\n }\n\n break;\n }\n }\n }\n }, {\n key: \"onUserInput\",\n value: function onUserInput(event) {\n // IE 11 Workaround for input placeholder\n if (!this.isKeydown) {\n return;\n }\n\n this.isKeydown = false;\n this.updateValueOnInput(event, event.target.value);\n\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n }\n }, {\n key: \"updateValueOnInput\",\n value: function updateValueOnInput(event, rawValue) {\n try {\n var value = this.parseValueFromString(rawValue);\n\n if (this.isValidSelection(value)) {\n this.updateModel(event, value);\n this.updateViewDate(event, value.length ? value[0] : value);\n }\n } catch (err) {\n //invalid date\n var _value = this.props.keepInvalid ? rawValue : null;\n\n this.updateModel(event, _value);\n }\n }\n }, {\n key: \"reFocusInputField\",\n value: function reFocusInputField() {\n if (!this.props.inline && this.inputRef.current) {\n this.ignoreFocusFunctionality = true;\n this.inputRef.current.focus();\n }\n }\n }, {\n key: \"isValidSelection\",\n value: function isValidSelection(value) {\n var _this7 = this;\n\n var isValid = true;\n\n if (this.isSingleSelection()) {\n if (!(this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false) && this.isSelectableTime(value))) {\n isValid = false;\n }\n } else if (value.every(function (v) {\n return _this7.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false) && _this7.isSelectableTime(v);\n })) {\n if (this.isRangeSelection()) {\n isValid = value.length > 1 && value[1] > value[0] ? true : false;\n }\n }\n\n return isValid;\n }\n }, {\n key: \"onButtonClick\",\n value: function onButtonClick() {\n if (this.isVisible()) {\n this.hideOverlay();\n } else {\n this.showOverlay();\n }\n }\n }, {\n key: \"onPrevButtonClick\",\n value: function onPrevButtonClick(event) {\n this.navigation = {\n backward: true,\n button: true\n };\n this.navBackward(event);\n }\n }, {\n key: \"onNextButtonClick\",\n value: function onNextButtonClick(event) {\n this.navigation = {\n backward: false,\n button: true\n };\n this.navForward(event);\n }\n }, {\n key: \"onContainerButtonKeydown\",\n value: function onContainerButtonKeydown(event) {\n switch (event.which) {\n //tab\n case 9:\n this.trapFocus(event);\n break;\n //escape\n\n case 27:\n this.hideOverlay(null, this.reFocusInputField);\n event.preventDefault();\n break;\n }\n }\n }, {\n key: \"trapFocus\",\n value: function trapFocus(event) {\n event.preventDefault();\n var focusableElements = DomHandler.getFocusableElements(this.overlayRef.current);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!document.activeElement) {\n focusableElements[0].focus();\n } else {\n var focusedIndex = focusableElements.indexOf(document.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();else focusableElements[focusedIndex - 1].focus();\n } else {\n if (focusedIndex === -1 || focusedIndex === focusableElements.length - 1) focusableElements[0].focus();else focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var cell;\n\n if (this.navigation) {\n if (this.navigation.button) {\n this.initFocusableCell();\n if (this.navigation.backward) DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-prev').focus();else DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-next').focus();\n } else {\n if (this.navigation.backward) {\n var cells = DomHandler.find(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)');\n cell = cells[cells.length - 1];\n } else {\n cell = DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)');\n }\n\n if (cell) {\n cell.tabIndex = '0';\n cell.focus();\n }\n }\n\n this.navigation = null;\n } else {\n this.initFocusableCell();\n }\n }\n }, {\n key: \"initFocusableCell\",\n value: function initFocusableCell() {\n var cell;\n\n if (this.view === 'month') {\n var cells = DomHandler.find(this.overlayRef.current, '.p-monthpicker .p-monthpicker-month');\n var selectedCell = DomHandler.findSingle(this.overlayRef.current, '.p-monthpicker .p-monthpicker-month.p-highlight');\n cells.forEach(function (cell) {\n return cell.tabIndex = -1;\n });\n cell = selectedCell || cells[0];\n } else {\n cell = DomHandler.findSingle(this.overlayRef.current, 'span.p-highlight');\n\n if (!cell) {\n var todayCell = DomHandler.findSingle(this.overlayRef.current, 'td.p-datepicker-today span:not(.p-disabled)');\n if (todayCell) cell = todayCell;else cell = DomHandler.findSingle(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)');\n }\n }\n\n if (cell) {\n cell.tabIndex = '0';\n }\n }\n }, {\n key: \"navBackward\",\n value: function navBackward(event) {\n if (this.props.disabled) {\n event.preventDefault();\n return;\n }\n\n var newViewDate = new Date(this.getViewDate().getTime());\n newViewDate.setDate(1);\n\n if (this.props.view === 'date') {\n if (newViewDate.getMonth() === 0) {\n newViewDate.setMonth(11);\n newViewDate.setFullYear(newViewDate.getFullYear() - 1);\n } else {\n newViewDate.setMonth(newViewDate.getMonth() - 1);\n }\n } else if (this.props.view === 'month') {\n var currentYear = newViewDate.getFullYear();\n var newYear = currentYear - 1;\n\n if (this.props.yearNavigator) {\n var minYear = parseInt(this.props.yearRange.split(':')[0], 10);\n\n if (newYear < minYear) {\n newYear = minYear;\n }\n }\n\n newViewDate.setFullYear(newYear);\n }\n\n this.updateViewDate(event, newViewDate);\n event.preventDefault();\n }\n }, {\n key: \"navForward\",\n value: function navForward(event) {\n if (this.props.disabled) {\n event.preventDefault();\n return;\n }\n\n var newViewDate = new Date(this.getViewDate().getTime());\n newViewDate.setDate(1);\n\n if (this.props.view === 'date') {\n if (newViewDate.getMonth() === 11) {\n newViewDate.setMonth(0);\n newViewDate.setFullYear(newViewDate.getFullYear() + 1);\n } else {\n newViewDate.setMonth(newViewDate.getMonth() + 1);\n }\n } else if (this.props.view === 'month') {\n var currentYear = newViewDate.getFullYear();\n var newYear = currentYear + 1;\n\n if (this.props.yearNavigator) {\n var maxYear = parseInt(this.props.yearRange.split(':')[1], 10);\n\n if (newYear > maxYear) {\n newYear = maxYear;\n }\n }\n\n newViewDate.setFullYear(newYear);\n }\n\n this.updateViewDate(event, newViewDate);\n event.preventDefault();\n }\n }, {\n key: \"onMonthDropdownChange\",\n value: function onMonthDropdownChange(event, value) {\n var currentViewDate = this.getViewDate();\n var newViewDate = new Date(currentViewDate.getTime());\n newViewDate.setMonth(parseInt(value, 10));\n this.updateViewDate(event, newViewDate);\n }\n }, {\n key: \"onYearDropdownChange\",\n value: function onYearDropdownChange(event, value) {\n var currentViewDate = this.getViewDate();\n var newViewDate = new Date(currentViewDate.getTime());\n newViewDate.setFullYear(parseInt(value, 10));\n this.updateViewDate(event, newViewDate);\n }\n }, {\n key: \"onTodayButtonClick\",\n value: function onTodayButtonClick(event) {\n var today = new Date();\n var dateMeta = {\n day: today.getDate(),\n month: today.getMonth(),\n year: today.getFullYear(),\n today: true,\n selectable: true\n };\n var timeMeta = {\n hours: today.getHours(),\n minutes: today.getMinutes(),\n seconds: today.getSeconds(),\n milliseconds: today.getMilliseconds()\n };\n this.updateViewDate(event, today);\n this.onDateSelect(event, dateMeta, timeMeta);\n\n if (this.props.onTodayButtonClick) {\n this.props.onTodayButtonClick(event);\n }\n }\n }, {\n key: \"onClearButtonClick\",\n value: function onClearButtonClick(event) {\n this.updateModel(event, null);\n this.updateInputfield(null);\n this.hideOverlay(null, this.reFocusInputField);\n\n if (this.props.onClearButtonClick) {\n this.props.onClearButtonClick(event);\n }\n }\n }, {\n key: \"onPanelClick\",\n value: function onPanelClick(event) {\n if (!this.props.inline) {\n OverlayService.emit('overlay-click', {\n originalEvent: event,\n target: this.container\n });\n }\n }\n }, {\n key: \"onPanelMouseUp\",\n value: function onPanelMouseUp(event) {\n this.onPanelClick(event);\n }\n }, {\n key: \"onTimePickerElementMouseDown\",\n value: function onTimePickerElementMouseDown(event, type, direction) {\n if (!this.props.disabled) {\n this.repeat(event, null, type, direction);\n event.preventDefault();\n }\n }\n }, {\n key: \"onTimePickerElementMouseUp\",\n value: function onTimePickerElementMouseUp() {\n if (!this.props.disabled) {\n this.clearTimePickerTimer();\n }\n }\n }, {\n key: \"onTimePickerElementMouseLeave\",\n value: function onTimePickerElementMouseLeave() {\n if (!this.props.disabled) {\n this.clearTimePickerTimer();\n }\n }\n }, {\n key: \"repeat\",\n value: function repeat(event, interval, type, direction) {\n var _this8 = this;\n\n event.persist();\n var i = interval || 500;\n this.clearTimePickerTimer();\n this.timePickerTimer = setTimeout(function () {\n _this8.repeat(event, 100, type, direction);\n }, i);\n\n switch (type) {\n case 0:\n if (direction === 1) this.incrementHour(event);else this.decrementHour(event);\n break;\n\n case 1:\n if (direction === 1) this.incrementMinute(event);else this.decrementMinute(event);\n break;\n\n case 2:\n if (direction === 1) this.incrementSecond(event);else this.decrementSecond(event);\n break;\n\n case 3:\n if (direction === 1) this.incrementMilliSecond(event);else this.decrementMilliSecond(event);\n break;\n }\n }\n }, {\n key: \"clearTimePickerTimer\",\n value: function clearTimePickerTimer() {\n if (this.timePickerTimer) {\n clearTimeout(this.timePickerTimer);\n }\n }\n }, {\n key: \"incrementHour\",\n value: function incrementHour(event) {\n var currentTime = this.getCurrentDateTime();\n var currentHour = currentTime.getHours();\n var newHour = currentHour + this.props.stepHour;\n newHour = newHour >= 24 ? newHour - 24 : newHour;\n\n if (this.validateHour(newHour, currentTime)) {\n if (this.props.maxDate && this.props.maxDate.toDateString() === currentTime.toDateString() && this.props.maxDate.getHours() === newHour) {\n if (this.props.maxDate.getMinutes() < currentTime.getMinutes()) {\n if (this.props.maxDate.getSeconds() < currentTime.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else if (this.props.maxDate.getMinutes() === currentTime.getMinutes()) {\n if (this.props.maxDate.getSeconds() < currentTime.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), this.props.maxDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.maxDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementHour\",\n value: function decrementHour(event) {\n var currentTime = this.getCurrentDateTime();\n var currentHour = currentTime.getHours();\n var newHour = currentHour - this.props.stepHour;\n newHour = newHour < 0 ? newHour + 24 : newHour;\n\n if (this.validateHour(newHour, currentTime)) {\n if (this.props.minDate && this.props.minDate.toDateString() === currentTime.toDateString() && this.props.minDate.getHours() === newHour) {\n if (this.props.minDate.getMinutes() > currentTime.getMinutes()) {\n if (this.props.minDate.getSeconds() > currentTime.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else if (this.props.minDate.getMinutes() === currentTime.getMinutes()) {\n if (this.props.minDate.getSeconds() > currentTime.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), this.props.minDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, this.props.minDate.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"doStepMinute\",\n value: function doStepMinute(currentMinute, step) {\n if (this.props.stepMinute <= 1) {\n return step ? currentMinute + step : currentMinute;\n }\n\n if (!step) {\n step = this.props.stepMinute;\n\n if (currentMinute % step === 0) {\n return currentMinute;\n }\n }\n\n var newMinute = currentMinute + step;\n newMinute = Math.floor(newMinute / step) * step;\n return newMinute;\n }\n }, {\n key: \"incrementMinute\",\n value: function incrementMinute(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMinute = currentTime.getMinutes();\n var newMinute = this.doStepMinute(currentMinute, this.props.stepMinute);\n newMinute = newMinute > 59 ? newMinute - 60 : newMinute;\n\n if (this.validateMinute(newMinute, currentTime)) {\n if (this.props.maxDate && this.props.maxDate.toDateString() === currentTime.toDateString() && this.props.maxDate.getMinutes() === newMinute) {\n if (this.props.maxDate.getSeconds() < currentTime.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.maxDate.getSeconds(), this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.maxDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementMinute\",\n value: function decrementMinute(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMinute = currentTime.getMinutes();\n var newMinute = this.doStepMinute(currentMinute, -this.props.stepMinute);\n newMinute = newMinute < 0 ? newMinute + 60 : newMinute;\n\n if (this.validateMinute(newMinute, currentTime)) {\n if (this.props.minDate && this.props.minDate.toDateString() === currentTime.toDateString() && this.props.minDate.getMinutes() === newMinute) {\n if (this.props.minDate.getSeconds() > currentTime.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.minDate.getSeconds(), this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, this.props.minDate.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), newMinute, currentTime.getSeconds(), currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"incrementSecond\",\n value: function incrementSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentSecond = currentTime.getSeconds();\n var newSecond = currentSecond + this.props.stepSecond;\n newSecond = newSecond > 59 ? newSecond - 60 : newSecond;\n\n if (this.validateSecond(newSecond, currentTime)) {\n if (this.props.maxDate && this.props.maxDate.toDateString() === currentTime.toDateString() && this.props.maxDate.getSeconds() === newSecond) {\n if (this.props.maxDate.getMilliseconds() < currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, this.props.maxDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementSecond\",\n value: function decrementSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentSecond = currentTime.getSeconds();\n var newSecond = currentSecond - this.props.stepSecond;\n newSecond = newSecond < 0 ? newSecond + 60 : newSecond;\n\n if (this.validateSecond(newSecond, currentTime)) {\n if (this.props.minDate && this.props.minDate.toDateString() === currentTime.toDateString() && this.props.minDate.getSeconds() === newSecond) {\n if (this.props.minDate.getMilliseconds() > currentTime.getMilliseconds()) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, this.props.minDate.getMilliseconds());\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n } else {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), newSecond, currentTime.getMilliseconds());\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"incrementMilliSecond\",\n value: function incrementMilliSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMillisecond = currentTime.getMilliseconds();\n var newMillisecond = currentMillisecond + this.props.stepMillisec;\n newMillisecond = newMillisecond > 999 ? newMillisecond - 1000 : newMillisecond;\n\n if (this.validateMillisecond(newMillisecond, currentTime)) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), currentTime.getSeconds(), newMillisecond);\n }\n\n event.preventDefault();\n }\n }, {\n key: \"decrementMilliSecond\",\n value: function decrementMilliSecond(event) {\n var currentTime = this.getCurrentDateTime();\n var currentMillisecond = currentTime.getMilliseconds();\n var newMillisecond = currentMillisecond - this.props.stepMillisec;\n newMillisecond = newMillisecond < 0 ? newMillisecond + 999 : newMillisecond;\n\n if (this.validateMillisecond(newMillisecond, currentTime)) {\n this.updateTime(event, currentTime.getHours(), currentTime.getMinutes(), currentTime.getSeconds(), newMillisecond);\n }\n\n event.preventDefault();\n }\n }, {\n key: \"toggleAmPm\",\n value: function toggleAmPm(event) {\n var currentTime = this.getCurrentDateTime();\n var currentHour = currentTime.getHours();\n var newHour = currentHour >= 12 ? currentHour - 12 : currentHour + 12;\n this.updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());\n event.preventDefault();\n }\n }, {\n key: \"getViewDate\",\n value: function getViewDate(date) {\n var propValue = this.props.value;\n var viewDate = date || (this.props.onViewDateChange ? this.props.viewDate : this.state.viewDate);\n\n if (Array.isArray(propValue)) {\n propValue = propValue[0];\n }\n\n return viewDate && this.isValidDate(viewDate) ? viewDate : propValue && this.isValidDate(propValue) ? propValue : new Date();\n }\n }, {\n key: \"getCurrentDateTime\",\n value: function getCurrentDateTime() {\n if (this.isSingleSelection()) {\n return this.props.value && this.props.value instanceof Date ? this.props.value : this.getViewDate();\n } else if (this.isMultipleSelection()) {\n if (this.props.value && this.props.value.length) {\n return this.props.value[this.props.value.length - 1];\n }\n } else if (this.isRangeSelection()) {\n if (this.props.value && this.props.value.length) {\n var startDate = this.props.value[0];\n var endDate = this.props.value[1];\n return endDate || startDate;\n }\n }\n\n return new Date();\n }\n }, {\n key: \"isValidDate\",\n value: function isValidDate(date) {\n return date instanceof Date && !isNaN(date);\n }\n }, {\n key: \"validateHour\",\n value: function validateHour(hour, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (this.props.minDate.getHours() > hour) {\n valid = false;\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (this.props.maxDate.getHours() < hour) {\n valid = false;\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateMinute\",\n value: function validateMinute(minute, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.minDate.getHours()) {\n if (this.props.minDate.getMinutes() > minute) {\n valid = false;\n }\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.maxDate.getHours()) {\n if (this.props.maxDate.getMinutes() < minute) {\n valid = false;\n }\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateSecond\",\n value: function validateSecond(second, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.minDate.getHours() && value.getMinutes() === this.props.minDate.getMinutes()) {\n if (this.props.minDate.getSeconds() > second) {\n valid = false;\n }\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.maxDate.getHours() && value.getMinutes() === this.props.maxDate.getMinutes()) {\n if (this.props.maxDate.getSeconds() < second) {\n valid = false;\n }\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateMillisecond\",\n value: function validateMillisecond(millisecond, value) {\n var valid = true;\n var valueDateString = value ? value.toDateString() : null;\n\n if (this.props.minDate && valueDateString && this.props.minDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.minDate.getHours() && value.getSeconds() === this.props.minDate.getSeconds() && value.getMinutes() === this.props.minDate.getMinutes()) {\n if (this.props.minDate.getMilliseconds() > millisecond) {\n valid = false;\n }\n }\n }\n\n if (this.props.maxDate && valueDateString && this.props.maxDate.toDateString() === valueDateString) {\n if (value.getHours() === this.props.maxDate.getHours() && value.getSeconds() === this.props.maxDate.getSeconds() && value.getMinutes() === this.props.maxDate.getMinutes()) {\n if (this.props.maxDate.getMilliseconds() < millisecond) {\n valid = false;\n }\n }\n }\n\n return valid;\n }\n }, {\n key: \"validateDate\",\n value: function validateDate(value) {\n if (this.props.yearNavigator) {\n var viewYear = value.getFullYear();\n var minRangeYear = this.props.yearRange ? parseInt(this.props.yearRange.split(':')[0], 10) : null;\n var maxRangeYear = this.props.yearRange ? parseInt(this.props.yearRange.split(':')[1], 10) : null;\n var minYear = this.props.minDate && minRangeYear != null ? Math.max(this.props.minDate.getFullYear(), minRangeYear) : this.props.minDate || minRangeYear;\n var maxYear = this.props.maxDate && maxRangeYear != null ? Math.min(this.props.maxDate.getFullYear(), maxRangeYear) : this.props.maxDate || maxRangeYear;\n\n if (minYear && minYear > viewYear) {\n viewYear = minYear;\n }\n\n if (maxYear && maxYear < viewYear) {\n viewYear = maxYear;\n }\n\n value.setFullYear(viewYear);\n }\n\n if (this.props.monthNavigator && this.props.view !== 'month') {\n var viewMonth = value.getMonth();\n var viewMonthWithMinMax = parseInt(this.isInMinYear(value) && Math.max(this.props.minDate.getMonth(), viewMonth).toString() || this.isInMaxYear(value) && Math.min(this.props.maxDate.getMonth(), viewMonth).toString() || viewMonth);\n value.setMonth(viewMonthWithMinMax);\n }\n }\n }, {\n key: \"updateTime\",\n value: function updateTime(event, hour, minute, second, millisecond) {\n var newDateTime = this.getCurrentDateTime();\n newDateTime.setHours(hour);\n newDateTime.setMinutes(minute);\n newDateTime.setSeconds(second);\n newDateTime.setMilliseconds(millisecond);\n\n if (this.isMultipleSelection()) {\n if (this.props.value && this.props.value.length) {\n var value = _toConsumableArray(this.props.value);\n\n value[value.length - 1] = newDateTime;\n newDateTime = value;\n } else {\n newDateTime = [newDateTime];\n }\n } else if (this.isRangeSelection()) {\n if (this.props.value && this.props.value.length) {\n var startDate = this.props.value[0];\n var endDate = this.props.value[1];\n newDateTime = endDate ? [startDate, newDateTime] : [newDateTime, null];\n } else {\n newDateTime = [newDateTime, null];\n }\n }\n\n this.updateModel(event, newDateTime);\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n value: newDateTime\n });\n }\n\n this.updateInputfield(newDateTime);\n }\n }, {\n key: \"updateViewDate\",\n value: function updateViewDate(event, value) {\n this.validateDate(value);\n\n if (this.props.onViewDateChange) {\n this.props.onViewDateChange({\n originalEvent: event,\n value: value\n });\n } else {\n this.viewStateChanged = true;\n this.setState({\n viewDate: value\n });\n }\n }\n }, {\n key: \"onDateCellKeydown\",\n value: function onDateCellKeydown(event, date, groupIndex) {\n var cellContent = event.currentTarget;\n var cell = cellContent.parentElement;\n\n switch (event.which) {\n //down arrow\n case 40:\n {\n cellContent.tabIndex = '-1';\n var cellIndex = DomHandler.index(cell);\n var nextRow = cell.parentElement.nextElementSibling;\n\n if (nextRow) {\n var focusCell = nextRow.children[cellIndex].children[0];\n\n if (DomHandler.hasClass(focusCell, 'p-disabled')) {\n this.navigation = {\n backward: false\n };\n this.navForward(event);\n } else {\n nextRow.children[cellIndex].children[0].tabIndex = '0';\n nextRow.children[cellIndex].children[0].focus();\n }\n } else {\n this.navigation = {\n backward: false\n };\n this.navForward(event);\n }\n\n event.preventDefault();\n break;\n }\n //up arrow\n\n case 38:\n {\n cellContent.tabIndex = '-1';\n\n var _cellIndex = DomHandler.index(cell);\n\n var prevRow = cell.parentElement.previousElementSibling;\n\n if (prevRow) {\n var _focusCell = prevRow.children[_cellIndex].children[0];\n\n if (DomHandler.hasClass(_focusCell, 'p-disabled')) {\n this.navigation = {\n backward: true\n };\n this.navBackward(event);\n } else {\n _focusCell.tabIndex = '0';\n\n _focusCell.focus();\n }\n } else {\n this.navigation = {\n backward: true\n };\n this.navBackward(event);\n }\n\n event.preventDefault();\n break;\n }\n //left arrow\n\n case 37:\n {\n cellContent.tabIndex = '-1';\n var prevCell = cell.previousElementSibling;\n\n if (prevCell) {\n var _focusCell2 = prevCell.children[0];\n\n if (DomHandler.hasClass(_focusCell2, 'p-disabled')) {\n this.navigateToMonth(true, groupIndex, event);\n } else {\n _focusCell2.tabIndex = '0';\n\n _focusCell2.focus();\n }\n } else {\n this.navigateToMonth(true, groupIndex, event);\n }\n\n event.preventDefault();\n break;\n }\n //right arrow\n\n case 39:\n {\n cellContent.tabIndex = '-1';\n var nextCell = cell.nextElementSibling;\n\n if (nextCell) {\n var _focusCell3 = nextCell.children[0];\n\n if (DomHandler.hasClass(_focusCell3, 'p-disabled')) {\n this.navigateToMonth(false, groupIndex, event);\n } else {\n _focusCell3.tabIndex = '0';\n\n _focusCell3.focus();\n }\n } else {\n this.navigateToMonth(false, groupIndex, event);\n }\n\n event.preventDefault();\n break;\n }\n //enter\n\n case 13:\n {\n this.onDateSelect(event, date);\n event.preventDefault();\n break;\n }\n //escape\n\n case 27:\n {\n this.hideOverlay(null, this.reFocusInputField);\n event.preventDefault();\n break;\n }\n //tab\n\n case 9:\n {\n this.trapFocus(event);\n break;\n }\n }\n }\n }, {\n key: \"navigateToMonth\",\n value: function navigateToMonth(prev, groupIndex, event) {\n if (prev) {\n if (this.props.numberOfMonths === 1 || groupIndex === 0) {\n this.navigation = {\n backward: true\n };\n this.navBackward(event);\n } else {\n var prevMonthContainer = this.overlayRef.current.children[groupIndex - 1];\n var cells = DomHandler.find(prevMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled)');\n var focusCell = cells[cells.length - 1];\n focusCell.tabIndex = '0';\n focusCell.focus();\n }\n } else {\n if (this.props.numberOfMonths === 1 || groupIndex === this.props.numberOfMonths - 1) {\n this.navigation = {\n backward: false\n };\n this.navForward(event);\n } else {\n var nextMonthContainer = this.overlayRef.current.children[groupIndex + 1];\n\n var _focusCell4 = DomHandler.findSingle(nextMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled)');\n\n _focusCell4.tabIndex = '0';\n\n _focusCell4.focus();\n }\n }\n }\n }, {\n key: \"onMonthCellKeydown\",\n value: function onMonthCellKeydown(event, index) {\n var cell = event.currentTarget;\n\n switch (event.which) {\n //arrows\n case 38:\n case 40:\n {\n cell.tabIndex = '-1';\n var cells = cell.parentElement.children;\n var cellIndex = DomHandler.index(cell);\n var nextCell = cells[event.which === 40 ? cellIndex + 3 : cellIndex - 3];\n\n if (nextCell) {\n nextCell.tabIndex = '0';\n nextCell.focus();\n }\n\n event.preventDefault();\n break;\n }\n //left arrow\n\n case 37:\n {\n cell.tabIndex = '-1';\n var prevCell = cell.previousElementSibling;\n\n if (prevCell) {\n prevCell.tabIndex = '0';\n prevCell.focus();\n }\n\n event.preventDefault();\n break;\n }\n //right arrow\n\n case 39:\n {\n cell.tabIndex = '-1';\n var _nextCell = cell.nextElementSibling;\n\n if (_nextCell) {\n _nextCell.tabIndex = '0';\n\n _nextCell.focus();\n }\n\n event.preventDefault();\n break;\n }\n //enter\n\n case 13:\n {\n this.onMonthSelect(event, index);\n event.preventDefault();\n break;\n }\n //escape\n\n case 27:\n {\n this.hideOverlay(null, this.reFocusInputField);\n event.preventDefault();\n break;\n }\n //tab\n\n case 9:\n {\n this.trapFocus(event);\n break;\n }\n }\n }\n }, {\n key: \"onDateSelect\",\n value: function onDateSelect(event, dateMeta, timeMeta) {\n var _this9 = this;\n\n if (this.props.disabled || !dateMeta.selectable) {\n event.preventDefault();\n return;\n }\n\n DomHandler.find(this.overlayRef.current, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(function (cell) {\n return cell.tabIndex = -1;\n });\n event.currentTarget.focus();\n\n if (this.isMultipleSelection()) {\n if (this.isSelected(dateMeta)) {\n var value = this.props.value.filter(function (date, i) {\n return !_this9.isDateEquals(date, dateMeta);\n });\n this.updateModel(event, value);\n this.updateInputfield(value);\n } else if (!this.props.maxDateCount || !this.props.value || this.props.maxDateCount > this.props.value.length) {\n this.selectDate(event, dateMeta, timeMeta);\n }\n } else {\n this.selectDate(event, dateMeta, timeMeta);\n }\n\n if (!this.props.inline && this.isSingleSelection() && (!this.props.showTime || this.props.hideOnDateTimeSelect)) {\n setTimeout(function () {\n _this9.hideOverlay('dateselect');\n }, 100);\n\n if (this.touchUIMask) {\n this.disableModality();\n }\n }\n\n event.preventDefault();\n }\n }, {\n key: \"selectTime\",\n value: function selectTime(date, timeMeta) {\n if (this.props.showTime) {\n var hours, minutes, seconds, milliseconds;\n\n if (timeMeta) {\n hours = timeMeta.hours;\n minutes = timeMeta.minutes;\n seconds = timeMeta.seconds;\n milliseconds = timeMeta.milliseconds;\n } else {\n var time = this.getCurrentDateTime();\n var _ref = [time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()];\n hours = _ref[0];\n minutes = _ref[1];\n seconds = _ref[2];\n milliseconds = _ref[3];\n }\n\n date.setHours(hours);\n date.setMinutes(minutes);\n date.setSeconds(seconds);\n date.setMilliseconds(milliseconds);\n }\n }\n }, {\n key: \"selectDate\",\n value: function selectDate(event, dateMeta, timeMeta) {\n var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);\n this.selectTime(date, timeMeta);\n\n if (this.props.minDate && this.props.minDate > date) {\n date = this.props.minDate;\n }\n\n if (this.props.maxDate && this.props.maxDate < date) {\n date = this.props.maxDate;\n }\n\n var selectedValues = date;\n\n if (this.isSingleSelection()) {\n this.updateModel(event, date);\n } else if (this.isMultipleSelection()) {\n selectedValues = this.props.value ? [].concat(_toConsumableArray(this.props.value), [date]) : [date];\n this.updateModel(event, selectedValues);\n } else if (this.isRangeSelection()) {\n if (this.props.value && this.props.value.length) {\n var startDate = this.props.value[0];\n var endDate = this.props.value[1];\n\n if (!endDate) {\n if (date.getTime() >= startDate.getTime()) {\n endDate = date;\n } else {\n endDate = startDate;\n startDate = date;\n }\n } else {\n startDate = date;\n endDate = null;\n }\n\n selectedValues = [startDate, endDate];\n this.updateModel(event, selectedValues);\n } else {\n selectedValues = [date, null];\n this.updateModel(event, selectedValues);\n }\n }\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n value: date\n });\n }\n\n this.updateInputfield(selectedValues);\n }\n }, {\n key: \"onMonthSelect\",\n value: function onMonthSelect(event, month) {\n this.onDateSelect(event, {\n year: this.getViewDate().getFullYear(),\n month: month,\n day: 1,\n selectable: true\n });\n event.preventDefault();\n }\n }, {\n key: \"updateModel\",\n value: function updateModel(event, value) {\n if (this.props.onChange) {\n var newValue = value && value instanceof Date ? new Date(value.getTime()) : value;\n this.viewStateChanged = true;\n this.props.onChange({\n originalEvent: event,\n value: newValue,\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n name: this.props.name,\n id: this.props.id,\n value: newValue\n }\n });\n }\n }\n }, {\n key: \"showOverlay\",\n value: function showOverlay(type) {\n var _this10 = this;\n\n if (this.props.onVisibleChange) {\n this.props.onVisibleChange({\n visible: true,\n type: type\n });\n } else {\n this.setState({\n overlayVisible: true\n }, function () {\n _this10.overlayEventListener = function (e) {\n if (!_this10.isOutsideClicked(e.target)) {\n _this10.isOverlayClicked = true;\n }\n };\n\n OverlayService.on('overlay-click', _this10.overlayEventListener);\n });\n }\n }\n }, {\n key: \"hideOverlay\",\n value: function hideOverlay(type, callback) {\n var _this11 = this;\n\n var _hideCallback = function _hideCallback() {\n _this11.viewStateChanged = false;\n _this11.ignoreFocusFunctionality = false;\n _this11.isOverlayClicked = false;\n\n if (callback) {\n callback();\n }\n\n OverlayService.off('overlay-click', _this11.overlayEventListener);\n _this11.overlayEventListener = null;\n };\n\n if (this.props.onVisibleChange) this.props.onVisibleChange({\n visible: false,\n type: type,\n callback: _hideCallback\n });else this.setState({\n overlayVisible: false\n }, _hideCallback);\n }\n }, {\n key: \"onOverlayEnter\",\n value: function onOverlayEnter() {\n if (this.props.autoZIndex) {\n var key = this.props.touchUI ? 'modal' : 'overlay';\n ZIndexUtils.set(key, this.overlayRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex[key]);\n }\n\n this.alignOverlay();\n }\n }, {\n key: \"onOverlayEntered\",\n value: function onOverlayEntered() {\n this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n this.bindScrollListener();\n this.props.onShow && this.props.onShow();\n }\n }, {\n key: \"onOverlayExit\",\n value: function onOverlayExit() {\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n this.unbindScrollListener();\n }\n }, {\n key: \"onOverlayExited\",\n value: function onOverlayExited() {\n ZIndexUtils.clear(this.overlayRef.current);\n this.props.onHide && this.props.onHide();\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this12 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (!_this12.isOverlayClicked && _this12.isVisible() && _this12.isOutsideClicked(event.target)) {\n _this12.hideOverlay('outside');\n }\n\n _this12.isOverlayClicked = false;\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"bindDocumentResizeListener\",\n value: function bindDocumentResizeListener() {\n if (!this.documentResizeListener && !this.props.touchUI) {\n this.documentResizeListener = this.onWindowResize.bind(this);\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n }, {\n key: \"unbindDocumentResizeListener\",\n value: function unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n }, {\n key: \"bindScrollListener\",\n value: function bindScrollListener() {\n var _this13 = this;\n\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.container, function () {\n if (_this13.isVisible()) {\n _this13.hideOverlay();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n }, {\n key: \"unbindScrollListener\",\n value: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(target) {\n return this.container && !(this.container.isSameNode(target) || this.isNavIconClicked(target) || this.container.contains(target) || this.overlayRef && this.overlayRef.current.contains(target));\n }\n }, {\n key: \"isNavIconClicked\",\n value: function isNavIconClicked(target) {\n return DomHandler.hasClass(target, 'p-datepicker-prev') || DomHandler.hasClass(target, 'p-datepicker-prev-icon') || DomHandler.hasClass(target, 'p-datepicker-next') || DomHandler.hasClass(target, 'p-datepicker-next-icon');\n }\n }, {\n key: \"onWindowResize\",\n value: function onWindowResize() {\n if (this.isVisible() && !DomHandler.isTouchDevice()) {\n this.hideOverlay();\n }\n }\n }, {\n key: \"alignOverlay\",\n value: function alignOverlay() {\n if (this.props.touchUI) {\n this.enableModality();\n } else {\n DomHandler.alignOverlay(this.overlayRef.current, this.inputRef.current.parentElement, this.props.appendTo || PrimeReact.appendTo);\n }\n }\n }, {\n key: \"enableModality\",\n value: function enableModality() {\n var _this14 = this;\n\n if (!this.touchUIMask) {\n this.touchUIMask = document.createElement('div');\n this.touchUIMask.style.zIndex = String(ZIndexUtils.get(this.overlayRef.current) - 1);\n DomHandler.addMultipleClasses(this.touchUIMask, 'p-component-overlay p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay-enter');\n\n this.touchUIMaskClickListener = function () {\n _this14.disableModality();\n };\n\n this.touchUIMask.addEventListener('click', this.touchUIMaskClickListener);\n document.body.appendChild(this.touchUIMask);\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n }, {\n key: \"disableModality\",\n value: function disableModality() {\n var _this15 = this;\n\n if (this.touchUIMask) {\n DomHandler.addClass(this.touchUIMask, 'p-component-overlay-leave');\n this.touchUIMask.addEventListener('animationend', function () {\n _this15.destroyMask();\n });\n }\n }\n }, {\n key: \"destroyMask\",\n value: function destroyMask() {\n this.touchUIMask.removeEventListener('click', this.touchUIMaskClickListener);\n this.touchUIMaskClickListener = null;\n document.body.removeChild(this.touchUIMask);\n this.touchUIMask = null;\n var bodyChildren = document.body.children;\n var hasBlockerMasks;\n\n for (var i = 0; i < bodyChildren.length; i++) {\n var bodyChild = bodyChildren[i];\n\n if (DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {\n hasBlockerMasks = true;\n break;\n }\n }\n\n if (!hasBlockerMasks) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n }\n }, {\n key: \"getFirstDayOfMonthIndex\",\n value: function getFirstDayOfMonthIndex(month, year) {\n var day = new Date();\n day.setDate(1);\n day.setMonth(month);\n day.setFullYear(year);\n var dayIndex = day.getDay() + this.getSundayIndex();\n return dayIndex >= 7 ? dayIndex - 7 : dayIndex;\n }\n }, {\n key: \"getDaysCountInMonth\",\n value: function getDaysCountInMonth(month, year) {\n return 32 - this.daylightSavingAdjust(new Date(year, month, 32)).getDate();\n }\n }, {\n key: \"getDaysCountInPrevMonth\",\n value: function getDaysCountInPrevMonth(month, year) {\n var prev = this.getPreviousMonthAndYear(month, year);\n return this.getDaysCountInMonth(prev.month, prev.year);\n }\n }, {\n key: \"daylightSavingAdjust\",\n value: function daylightSavingAdjust(date) {\n if (!date) {\n return null;\n }\n\n date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n return date;\n }\n }, {\n key: \"getPreviousMonthAndYear\",\n value: function getPreviousMonthAndYear(month, year) {\n var m, y;\n\n if (month === 0) {\n m = 11;\n y = year - 1;\n } else {\n m = month - 1;\n y = year;\n }\n\n return {\n 'month': m,\n 'year': y\n };\n }\n }, {\n key: \"getNextMonthAndYear\",\n value: function getNextMonthAndYear(month, year) {\n var m, y;\n\n if (month === 11) {\n m = 0;\n y = year + 1;\n } else {\n m = month + 1;\n y = year;\n }\n\n return {\n 'month': m,\n 'year': y\n };\n }\n }, {\n key: \"getSundayIndex\",\n value: function getSundayIndex() {\n var firstDayOfWeek = localeOption('firstDayOfWeek', this.props.locale);\n return firstDayOfWeek > 0 ? 7 - firstDayOfWeek : 0;\n }\n }, {\n key: \"createWeekDays\",\n value: function createWeekDays() {\n var weekDays = [];\n\n var _localeOptions = localeOptions(this.props.locale),\n dayIndex = _localeOptions.firstDayOfWeek,\n dayNamesMin = _localeOptions.dayNamesMin;\n\n for (var i = 0; i < 7; i++) {\n weekDays.push(dayNamesMin[dayIndex]);\n dayIndex = dayIndex === 6 ? 0 : ++dayIndex;\n }\n\n return weekDays;\n }\n }, {\n key: \"createMonths\",\n value: function createMonths(month, year) {\n var months = [];\n\n for (var i = 0; i < this.props.numberOfMonths; i++) {\n var m = month + i;\n var y = year;\n\n if (m > 11) {\n m = m % 11 - 1;\n y = year + 1;\n }\n\n months.push(this.createMonth(m, y));\n }\n\n return months;\n }\n }, {\n key: \"createMonth\",\n value: function createMonth(month, year) {\n var dates = [];\n var firstDay = this.getFirstDayOfMonthIndex(month, year);\n var daysLength = this.getDaysCountInMonth(month, year);\n var prevMonthDaysLength = this.getDaysCountInPrevMonth(month, year);\n var dayNo = 1;\n var today = new Date();\n var weekNumbers = [];\n var monthRows = Math.ceil((daysLength + firstDay) / 7);\n\n for (var i = 0; i < monthRows; i++) {\n var week = [];\n\n if (i === 0) {\n for (var j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {\n var prev = this.getPreviousMonthAndYear(month, year);\n week.push({\n day: j,\n month: prev.month,\n year: prev.year,\n otherMonth: true,\n today: this.isToday(today, j, prev.month, prev.year),\n selectable: this.isSelectable(j, prev.month, prev.year, true)\n });\n }\n\n var remainingDaysLength = 7 - week.length;\n\n for (var _j = 0; _j < remainingDaysLength; _j++) {\n week.push({\n day: dayNo,\n month: month,\n year: year,\n today: this.isToday(today, dayNo, month, year),\n selectable: this.isSelectable(dayNo, month, year, false)\n });\n dayNo++;\n }\n } else {\n for (var _j2 = 0; _j2 < 7; _j2++) {\n if (dayNo > daysLength) {\n var next = this.getNextMonthAndYear(month, year);\n week.push({\n day: dayNo - daysLength,\n month: next.month,\n year: next.year,\n otherMonth: true,\n today: this.isToday(today, dayNo - daysLength, next.month, next.year),\n selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)\n });\n } else {\n week.push({\n day: dayNo,\n month: month,\n year: year,\n today: this.isToday(today, dayNo, month, year),\n selectable: this.isSelectable(dayNo, month, year, false)\n });\n }\n\n dayNo++;\n }\n }\n\n if (this.props.showWeek) {\n weekNumbers.push(this.getWeekNumber(new Date(week[0].year, week[0].month, week[0].day)));\n }\n\n dates.push(week);\n }\n\n return {\n month: month,\n year: year,\n dates: dates,\n weekNumbers: weekNumbers\n };\n }\n }, {\n key: \"getWeekNumber\",\n value: function getWeekNumber(date) {\n var checkDate = new Date(date.getTime());\n checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n var time = checkDate.getTime();\n checkDate.setMonth(0);\n checkDate.setDate(1);\n return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;\n }\n }, {\n key: \"isSelectable\",\n value: function isSelectable(day, month, year, otherMonth) {\n var validMin = true;\n var validMax = true;\n var validDate = true;\n var validDay = true;\n var validMonth = true;\n\n if (this.props.minDate) {\n if (this.props.minDate.getFullYear() > year) {\n validMin = false;\n } else if (this.props.minDate.getFullYear() === year) {\n if (this.props.minDate.getMonth() > month) {\n validMin = false;\n } else if (this.props.minDate.getMonth() === month) {\n if (this.props.minDate.getDate() > day) {\n validMin = false;\n }\n }\n }\n }\n\n if (this.props.maxDate) {\n if (this.props.maxDate.getFullYear() < year) {\n validMax = false;\n } else if (this.props.maxDate.getFullYear() === year) {\n if (this.props.maxDate.getMonth() < month) {\n validMax = false;\n } else if (this.props.maxDate.getMonth() === month) {\n if (this.props.maxDate.getDate() < day) {\n validMax = false;\n }\n }\n }\n }\n\n if (this.props.disabledDates) {\n validDate = !this.isDateDisabled(day, month, year);\n }\n\n if (this.props.disabledDays) {\n validDay = !this.isDayDisabled(day, month, year);\n }\n\n if (this.props.selectOtherMonths === false && otherMonth) {\n validMonth = false;\n }\n\n return validMin && validMax && validDate && validDay && validMonth;\n }\n }, {\n key: \"isSelectableTime\",\n value: function isSelectableTime(value) {\n var validMin = true;\n var validMax = true;\n\n if (this.props.minDate && this.props.minDate.toDateString() === value.toDateString()) {\n if (this.props.minDate.getHours() > value.getHours()) {\n validMin = false;\n } else if (this.props.minDate.getHours() === value.getHours()) {\n if (this.props.minDate.getMinutes() > value.getMinutes()) {\n validMin = false;\n } else if (this.props.minDate.getMinutes() === value.getMinutes()) {\n if (this.props.minDate.getSeconds() > value.getSeconds()) {\n validMin = false;\n } else if (this.props.minDate.getSeconds() === value.getSeconds()) {\n if (this.props.minDate.getMilliseconds() > value.getMilliseconds()) {\n validMin = false;\n }\n }\n }\n }\n }\n\n if (this.props.maxDate && this.props.maxDate.toDateString() === value.toDateString()) {\n if (this.props.maxDate.getHours() < value.getHours()) {\n validMax = false;\n } else if (this.props.maxDate.getHours() === value.getHours()) {\n if (this.props.maxDate.getMinutes() < value.getMinutes()) {\n validMax = false;\n } else if (this.props.maxDate.getMinutes() === value.getMinutes()) {\n if (this.props.maxDate.getSeconds() < value.getSeconds()) {\n validMax = false;\n } else if (this.props.maxDate.getSeconds() === value.getSeconds()) {\n if (this.props.maxDate.getMilliseconds() < value.getMilliseconds()) {\n validMax = false;\n }\n }\n }\n }\n }\n\n return validMin && validMax;\n }\n }, {\n key: \"isSelected\",\n value: function isSelected(dateMeta) {\n if (this.props.value) {\n if (this.isSingleSelection()) {\n return this.isDateEquals(this.props.value, dateMeta);\n } else if (this.isMultipleSelection()) {\n var selected = false;\n\n var _iterator = _createForOfIteratorHelper(this.props.value),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var date = _step.value;\n selected = this.isDateEquals(date, dateMeta);\n\n if (selected) {\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return selected;\n } else if (this.isRangeSelection()) {\n if (this.props.value[1]) return this.isDateEquals(this.props.value[0], dateMeta) || this.isDateEquals(this.props.value[1], dateMeta) || this.isDateBetween(this.props.value[0], this.props.value[1], dateMeta);else {\n return this.isDateEquals(this.props.value[0], dateMeta);\n }\n }\n } else {\n return false;\n }\n }\n }, {\n key: \"isMonthSelected\",\n value: function isMonthSelected(month) {\n var viewDate = this.getViewDate();\n if (this.props.value && this.props.value instanceof Date) return this.props.value.getDate() === 1 && this.props.value.getMonth() === month && this.props.value.getFullYear() === viewDate.getFullYear();else return false;\n }\n }, {\n key: \"isDateEquals\",\n value: function isDateEquals(value, dateMeta) {\n if (value && value instanceof Date) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;else return false;\n }\n }, {\n key: \"isDateBetween\",\n value: function isDateBetween(start, end, dateMeta) {\n var between = false;\n\n if (start && end) {\n var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);\n return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();\n }\n\n return between;\n }\n }, {\n key: \"isSingleSelection\",\n value: function isSingleSelection() {\n return this.props.selectionMode === 'single';\n }\n }, {\n key: \"isRangeSelection\",\n value: function isRangeSelection() {\n return this.props.selectionMode === 'range';\n }\n }, {\n key: \"isMultipleSelection\",\n value: function isMultipleSelection() {\n return this.props.selectionMode === 'multiple';\n }\n }, {\n key: \"isToday\",\n value: function isToday(today, day, month, year) {\n return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;\n }\n }, {\n key: \"isDateDisabled\",\n value: function isDateDisabled(day, month, year) {\n if (this.props.disabledDates) {\n for (var i = 0; i < this.props.disabledDates.length; i++) {\n var disabledDate = this.props.disabledDates[i];\n\n if (disabledDate.getFullYear() === year && disabledDate.getMonth() === month && disabledDate.getDate() === day) {\n return true;\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"isDayDisabled\",\n value: function isDayDisabled(day, month, year) {\n if (this.props.disabledDays) {\n var weekday = new Date(year, month, day);\n var weekdayNumber = weekday.getDay();\n return this.props.disabledDays.indexOf(weekdayNumber) !== -1;\n }\n\n return false;\n }\n }, {\n key: \"updateInputfield\",\n value: function updateInputfield(value) {\n if (!(this.inputRef && this.inputRef.current)) {\n return;\n }\n\n var formattedValue = '';\n\n if (value) {\n try {\n if (this.isSingleSelection()) {\n formattedValue = this.isValidDate(value) ? this.formatDateTime(value) : '';\n } else if (this.isMultipleSelection()) {\n for (var i = 0; i < value.length; i++) {\n var selectedValue = value[i];\n var dateAsString = this.isValidDate(selectedValue) ? this.formatDateTime(selectedValue) : '';\n formattedValue += dateAsString;\n\n if (i !== value.length - 1) {\n formattedValue += ', ';\n }\n }\n } else if (this.isRangeSelection()) {\n if (value && value.length) {\n var startDate = value[0];\n var endDate = value[1];\n formattedValue = this.isValidDate(startDate) ? this.formatDateTime(startDate) : '';\n\n if (endDate) {\n formattedValue += this.isValidDate(endDate) ? ' - ' + this.formatDateTime(endDate) : '';\n }\n }\n }\n } catch (err) {\n formattedValue = value;\n }\n }\n\n this.inputRef.current.value = formattedValue;\n }\n }, {\n key: \"formatDateTime\",\n value: function formatDateTime(date) {\n var formattedValue = null;\n\n if (date) {\n if (this.props.timeOnly) {\n formattedValue = this.formatTime(date);\n } else {\n formattedValue = this.formatDate(date, this.getDateFormat());\n\n if (this.props.showTime) {\n formattedValue += ' ' + this.formatTime(date);\n }\n }\n }\n\n return formattedValue;\n }\n }, {\n key: \"formatDate\",\n value: function formatDate(date, format) {\n if (!date) {\n return '';\n }\n\n var iFormat;\n\n var lookAhead = function lookAhead(match) {\n var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;\n\n if (matches) {\n iFormat++;\n }\n\n return matches;\n },\n formatNumber = function formatNumber(match, value, len) {\n var num = '' + value;\n\n if (lookAhead(match)) {\n while (num.length < len) {\n num = '0' + num;\n }\n }\n\n return num;\n },\n formatName = function formatName(match, value, shortNames, longNames) {\n return lookAhead(match) ? longNames[value] : shortNames[value];\n };\n\n var output = '';\n var literal = false;\n\n var _localeOptions2 = localeOptions(this.props.locale),\n dayNamesShort = _localeOptions2.dayNamesShort,\n dayNames = _localeOptions2.dayNames,\n monthNamesShort = _localeOptions2.monthNamesShort,\n monthNames = _localeOptions2.monthNames;\n\n if (date) {\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === '\\'' && !lookAhead('\\'')) {\n literal = false;\n } else {\n output += format.charAt(iFormat);\n }\n } else {\n switch (format.charAt(iFormat)) {\n case 'd':\n output += formatNumber('d', date.getDate(), 2);\n break;\n\n case 'D':\n output += formatName('D', date.getDay(), dayNamesShort, dayNames);\n break;\n\n case 'o':\n output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n break;\n\n case 'm':\n output += formatNumber('m', date.getMonth() + 1, 2);\n break;\n\n case 'M':\n output += formatName('M', date.getMonth(), monthNamesShort, monthNames);\n break;\n\n case 'y':\n output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + date.getFullYear() % 100;\n break;\n\n case '@':\n output += date.getTime();\n break;\n\n case '!':\n output += date.getTime() * 10000 + this.ticksTo1970;\n break;\n\n case '\\'':\n if (lookAhead('\\'')) {\n output += '\\'';\n } else {\n literal = true;\n }\n\n break;\n\n default:\n output += format.charAt(iFormat);\n }\n }\n }\n }\n\n return output;\n }\n }, {\n key: \"formatTime\",\n value: function formatTime(date) {\n if (!date) {\n return '';\n }\n\n var output = '';\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var seconds = date.getSeconds();\n var milliseconds = date.getMilliseconds();\n\n if (this.props.hourFormat === '12' && hours > 11 && hours !== 12) {\n hours -= 12;\n }\n\n if (this.props.hourFormat === '12') {\n output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;\n } else {\n output += hours < 10 ? '0' + hours : hours;\n }\n\n output += ':';\n output += minutes < 10 ? '0' + minutes : minutes;\n\n if (this.props.showSeconds) {\n output += ':';\n output += seconds < 10 ? '0' + seconds : seconds;\n }\n\n if (this.props.showMillisec) {\n output += '.';\n output += milliseconds < 100 ? (milliseconds < 10 ? '00' : '0') + milliseconds : milliseconds;\n }\n\n if (this.props.hourFormat === '12') {\n output += date.getHours() > 11 ? ' PM' : ' AM';\n }\n\n return output;\n }\n }, {\n key: \"parseValueFromString\",\n value: function parseValueFromString(text) {\n if (!text || text.trim().length === 0) {\n return null;\n }\n\n var value;\n\n if (this.isSingleSelection()) {\n value = this.parseDateTime(text);\n } else if (this.isMultipleSelection()) {\n var tokens = text.split(',');\n value = [];\n\n var _iterator2 = _createForOfIteratorHelper(tokens),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var token = _step2.value;\n value.push(this.parseDateTime(token.trim()));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n } else if (this.isRangeSelection()) {\n var _tokens = text.split(' - ');\n\n value = [];\n\n for (var i = 0; i < _tokens.length; i++) {\n value[i] = this.parseDateTime(_tokens[i].trim());\n }\n }\n\n return value;\n }\n }, {\n key: \"parseDateTime\",\n value: function parseDateTime(text) {\n var date;\n var parts = text.split(' ');\n\n if (this.props.timeOnly) {\n date = new Date();\n this.populateTime(date, parts[0], parts[1]);\n } else {\n if (this.props.showTime) {\n date = this.parseDate(parts[0], this.getDateFormat());\n this.populateTime(date, parts[1], parts[2]);\n } else {\n date = this.parseDate(text, this.getDateFormat());\n }\n }\n\n return date;\n }\n }, {\n key: \"populateTime\",\n value: function populateTime(value, timeString, ampm) {\n if (this.props.hourFormat === '12' && ampm !== 'PM' && ampm !== 'AM') {\n throw new Error('Invalid Time');\n }\n\n var time = this.parseTime(timeString, ampm);\n value.setHours(time.hour);\n value.setMinutes(time.minute);\n value.setSeconds(time.second);\n value.setMilliseconds(time.millisecond);\n }\n }, {\n key: \"parseTime\",\n value: function parseTime(value, ampm) {\n value = this.props.showMillisec ? value.replace('.', ':') : value;\n var tokens = value.split(':');\n var validTokenLength = this.props.showSeconds ? 3 : 2;\n validTokenLength = this.props.showMillisec ? validTokenLength + 1 : validTokenLength;\n\n if (tokens.length !== validTokenLength || tokens[0].length !== 2 || tokens[1].length !== 2 || this.props.showSeconds && tokens[2].length !== 2 || this.props.showMillisec && tokens[3].length !== 3) {\n throw new Error('Invalid time');\n }\n\n var h = parseInt(tokens[0], 10);\n var m = parseInt(tokens[1], 10);\n var s = this.props.showSeconds ? parseInt(tokens[2], 10) : null;\n var ms = this.props.showMillisec ? parseInt(tokens[3], 10) : null;\n\n if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || this.props.hourFormat === '12' && h > 12 || this.props.showSeconds && (isNaN(s) || s > 59) || this.props.showMillisec && (isNaN(s) || s > 1000)) {\n throw new Error('Invalid time');\n } else {\n if (this.props.hourFormat === '12' && h !== 12 && ampm === 'PM') {\n h += 12;\n }\n\n return {\n hour: h,\n minute: m,\n second: s,\n millisecond: ms\n };\n }\n } // Ported from jquery-ui datepicker parseDate\n\n }, {\n key: \"parseDate\",\n value: function parseDate(value, format) {\n if (format == null || value == null) {\n throw new Error('Invalid arguments');\n }\n\n value = _typeof(value) === \"object\" ? value.toString() : value + \"\";\n\n if (value === \"\") {\n return null;\n }\n\n var iFormat,\n dim,\n extra,\n iValue = 0,\n shortYearCutoff = typeof this.props.shortYearCutoff !== \"string\" ? this.props.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.props.shortYearCutoff, 10),\n year = -1,\n month = -1,\n day = -1,\n doy = -1,\n literal = false,\n date,\n lookAhead = function lookAhead(match) {\n var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;\n\n if (matches) {\n iFormat++;\n }\n\n return matches;\n },\n getNumber = function getNumber(match) {\n var isDoubled = lookAhead(match),\n size = match === \"@\" ? 14 : match === \"!\" ? 20 : match === \"y\" && isDoubled ? 4 : match === \"o\" ? 3 : 2,\n minSize = match === \"y\" ? size : 1,\n digits = new RegExp(\"^\\\\d{\" + minSize + \",\" + size + \"}\"),\n num = value.substring(iValue).match(digits);\n\n if (!num) {\n throw new Error('Missing number at position ' + iValue);\n }\n\n iValue += num[0].length;\n return parseInt(num[0], 10);\n },\n getName = function getName(match, shortNames, longNames) {\n var index = -1;\n var arr = lookAhead(match) ? longNames : shortNames;\n var names = [];\n\n for (var i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n\n names.sort(function (a, b) {\n return -(a[1].length - b[1].length);\n });\n\n for (var _i = 0; _i < names.length; _i++) {\n var name = names[_i][1];\n\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[_i][0];\n iValue += name.length;\n break;\n }\n }\n\n if (index !== -1) {\n return index + 1;\n } else {\n throw new Error('Unknown name at position ' + iValue);\n }\n },\n checkLiteral = function checkLiteral() {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw new Error('Unexpected literal at position ' + iValue);\n }\n\n iValue++;\n };\n\n if (this.props.view === 'month') {\n day = 1;\n }\n\n var _localeOptions3 = localeOptions(this.props.locale),\n dayNamesShort = _localeOptions3.dayNamesShort,\n dayNames = _localeOptions3.dayNames,\n monthNamesShort = _localeOptions3.monthNamesShort,\n monthNames = _localeOptions3.monthNames;\n\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n } else {\n checkLiteral();\n }\n } else {\n switch (format.charAt(iFormat)) {\n case \"d\":\n day = getNumber(\"d\");\n break;\n\n case \"D\":\n getName(\"D\", dayNamesShort, dayNames);\n break;\n\n case \"o\":\n doy = getNumber(\"o\");\n break;\n\n case \"m\":\n month = getNumber(\"m\");\n break;\n\n case \"M\":\n month = getName(\"M\", monthNamesShort, monthNames);\n break;\n\n case \"y\":\n year = getNumber(\"y\");\n break;\n\n case \"@\":\n date = new Date(getNumber(\"@\"));\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n\n case \"!\":\n date = new Date((getNumber(\"!\") - this.ticksTo1970) / 10000);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n\n case \"'\":\n if (lookAhead(\"'\")) {\n checkLiteral();\n } else {\n literal = true;\n }\n\n break;\n\n default:\n checkLiteral();\n }\n }\n }\n\n if (iValue < value.length) {\n extra = value.substr(iValue);\n\n if (!/^\\s+/.test(extra)) {\n throw new Error('Extra/unparsed characters found in date: ' + extra);\n }\n }\n\n if (year === -1) {\n year = new Date().getFullYear();\n } else if (year < 100) {\n year += new Date().getFullYear() - new Date().getFullYear() % 100 + (year <= shortYearCutoff ? 0 : -100);\n }\n\n if (doy > -1) {\n month = 1;\n day = doy;\n\n do {\n dim = this.getDaysCountInMonth(year, month - 1);\n\n if (day <= dim) {\n break;\n }\n\n month++;\n day -= dim;\n } while (true);\n }\n\n date = this.daylightSavingAdjust(new Date(year, month - 1, day));\n\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw new Error('Invalid date'); // E.g. 31/02/00\n }\n\n return date;\n }\n }, {\n key: \"renderBackwardNavigator\",\n value: function renderBackwardNavigator(isVisible) {\n var _this16 = this;\n\n var navigatorProps = isVisible ? {\n 'onClick': this.onPrevButtonClick,\n 'onKeyDown': function onKeyDown(e) {\n return _this16.onContainerButtonKeydown(e);\n }\n } : {\n 'style': {\n visibility: 'hidden'\n }\n };\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"p-datepicker-prev p-link\"\n }, navigatorProps), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-prev-icon pi pi-chevron-left\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"renderForwardNavigator\",\n value: function renderForwardNavigator(isVisible) {\n var _this17 = this;\n\n var navigatorProps = isVisible ? {\n 'onClick': this.onNextButtonClick,\n 'onKeyDown': function onKeyDown(e) {\n return _this17.onContainerButtonKeydown(e);\n }\n } : {\n 'style': {\n visibility: 'hidden'\n }\n };\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"p-datepicker-next p-link\"\n }, navigatorProps), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-next-icon pi pi-chevron-right\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"isInMinYear\",\n value: function isInMinYear(viewDate) {\n return this.props.minDate && this.props.minDate.getFullYear() === viewDate.getFullYear();\n }\n }, {\n key: \"isInMaxYear\",\n value: function isInMaxYear(viewDate) {\n return this.props.maxDate && this.props.maxDate.getFullYear() === viewDate.getFullYear();\n }\n }, {\n key: \"renderTitleMonthElement\",\n value: function renderTitleMonthElement(month) {\n var _this18 = this;\n\n var monthNames = localeOption('monthNames', this.props.locale);\n\n if (this.props.monthNavigator && this.props.view !== 'month') {\n var viewDate = this.getViewDate();\n var viewMonth = viewDate.getMonth();\n var displayedMonthOptions = monthNames.map(function (month, index) {\n return (!_this18.isInMinYear(viewDate) || index >= _this18.props.minDate.getMonth()) && (!_this18.isInMaxYear(viewDate) || index <= _this18.props.maxDate.getMonth()) ? {\n label: month,\n value: index,\n index: index\n } : null;\n }).filter(function (option) {\n return !!option;\n });\n var displayedMonthNames = displayedMonthOptions.map(function (option) {\n return option.label;\n });\n var content = /*#__PURE__*/React.createElement(\"select\", {\n className: \"p-datepicker-month\",\n onChange: function onChange(e) {\n return _this18.onMonthDropdownChange(e, e.target.value);\n },\n value: viewMonth\n }, displayedMonthOptions.map(function (option) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: option.label,\n value: option.value\n }, option.label);\n }));\n\n if (this.props.monthNavigatorTemplate) {\n var defaultContentOptions = {\n onChange: this.onMonthDropdownChange,\n className: 'p-datepicker-month',\n value: viewMonth,\n names: displayedMonthNames,\n options: displayedMonthOptions,\n element: content,\n props: this.props\n };\n return ObjectUtils.getJSXElement(this.props.monthNavigatorTemplate, defaultContentOptions);\n }\n\n return content;\n } else {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-month\"\n }, monthNames[month]);\n }\n }\n }, {\n key: \"renderTitleYearElement\",\n value: function renderTitleYearElement(year) {\n var _this19 = this;\n\n if (this.props.yearNavigator) {\n var yearOptions = [];\n var years = this.props.yearRange.split(':');\n var yearStart = parseInt(years[0], 10);\n var yearEnd = parseInt(years[1], 10);\n\n for (var i = yearStart; i <= yearEnd; i++) {\n yearOptions.push(i);\n }\n\n var viewDate = this.getViewDate();\n var viewYear = viewDate.getFullYear();\n var displayedYearNames = yearOptions.filter(function (year) {\n return !(_this19.props.minDate && _this19.props.minDate.getFullYear() > year) && !(_this19.props.maxDate && _this19.props.maxDate.getFullYear() < year);\n });\n var content = /*#__PURE__*/React.createElement(\"select\", {\n className: \"p-datepicker-year\",\n onChange: function onChange(e) {\n return _this19.onYearDropdownChange(e, e.target.value);\n },\n value: viewYear\n }, displayedYearNames.map(function (year) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: year,\n value: year\n }, year);\n }));\n\n if (this.props.yearNavigatorTemplate) {\n var options = displayedYearNames.map(function (name, i) {\n return {\n label: name,\n value: name,\n index: i\n };\n });\n var defaultContentOptions = {\n onChange: this.onYearDropdownChange,\n className: 'p-datepicker-year',\n value: viewYear,\n names: displayedYearNames,\n options: options,\n element: content,\n props: this.props\n };\n return ObjectUtils.getJSXElement(this.props.yearNavigatorTemplate, defaultContentOptions);\n }\n\n return content;\n } else {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-datepicker-year\"\n }, year);\n }\n }\n }, {\n key: \"renderTitle\",\n value: function renderTitle(monthMetaData) {\n var month = this.renderTitleMonthElement(monthMetaData.month);\n var year = this.renderTitleYearElement(monthMetaData.year);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-title\"\n }, month, year);\n }\n }, {\n key: \"renderDayNames\",\n value: function renderDayNames(weekDays) {\n var dayNames = weekDays.map(function (weekDay, index) {\n return /*#__PURE__*/React.createElement(\"th\", {\n key: \"\".concat(weekDay, \"-\").concat(index),\n scope: \"col\"\n }, /*#__PURE__*/React.createElement(\"span\", null, weekDay));\n });\n\n if (this.props.showWeek) {\n var weekHeader = /*#__PURE__*/React.createElement(\"th\", {\n scope: \"col\",\n key: 'wn',\n className: \"p-datepicker-weekheader p-disabled\"\n }, /*#__PURE__*/React.createElement(\"span\", null, localeOption('weekHeader', this.props.locale)));\n return [weekHeader].concat(_toConsumableArray(dayNames));\n } else {\n return dayNames;\n }\n }\n }, {\n key: \"renderDateCellContent\",\n value: function renderDateCellContent(date, className, groupIndex) {\n var _this20 = this;\n\n var content = this.props.dateTemplate ? this.props.dateTemplate(date) : date.day;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: className,\n onClick: function onClick(e) {\n return _this20.onDateSelect(e, date);\n },\n onKeyDown: function onKeyDown(e) {\n return _this20.onDateCellKeydown(e, date, groupIndex);\n }\n }, content, /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"renderWeek\",\n value: function renderWeek(weekDates, weekNumber, groupIndex) {\n var _this21 = this;\n\n var week = weekDates.map(function (date) {\n var selected = _this21.isSelected(date);\n\n var cellClassName = classNames({\n 'p-datepicker-other-month': date.otherMonth,\n 'p-datepicker-today': date.today\n });\n var dateClassName = classNames({\n 'p-highlight': selected,\n 'p-disabled': !date.selectable\n });\n var content = date.otherMonth && !_this21.props.showOtherMonths ? null : _this21.renderDateCellContent(date, dateClassName, groupIndex);\n return /*#__PURE__*/React.createElement(\"td\", {\n key: date.day,\n className: cellClassName\n }, content);\n });\n\n if (this.props.showWeek) {\n var weekNumberCell = /*#__PURE__*/React.createElement(\"td\", {\n key: 'wn' + weekNumber,\n className: \"p-datepicker-weeknumber\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-disabled\"\n }, weekNumber));\n return [weekNumberCell].concat(_toConsumableArray(week));\n } else {\n return week;\n }\n }\n }, {\n key: \"renderDates\",\n value: function renderDates(monthMetaData, groupIndex) {\n var _this22 = this;\n\n return monthMetaData.dates.map(function (weekDates, index) {\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: index\n }, _this22.renderWeek(weekDates, monthMetaData.weekNumbers[index], groupIndex));\n });\n }\n }, {\n key: \"renderDateViewGrid\",\n value: function renderDateViewGrid(monthMetaData, weekDays, groupIndex) {\n var dayNames = this.renderDayNames(weekDays);\n var dates = this.renderDates(monthMetaData, groupIndex);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-calendar-container\"\n }, /*#__PURE__*/React.createElement(\"table\", {\n className: \"p-datepicker-calendar\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, dayNames)), /*#__PURE__*/React.createElement(\"tbody\", null, dates)));\n }\n }, {\n key: \"renderMonth\",\n value: function renderMonth(monthMetaData, index) {\n var weekDays = this.createWeekDays();\n var backwardNavigator = this.renderBackwardNavigator(index === 0);\n var forwardNavigator = this.renderForwardNavigator(this.props.numberOfMonths === 1 || index === this.props.numberOfMonths - 1);\n var title = this.renderTitle(monthMetaData);\n var dateViewGrid = this.renderDateViewGrid(monthMetaData, weekDays, index);\n var header = this.props.headerTemplate ? this.props.headerTemplate() : null;\n return /*#__PURE__*/React.createElement(\"div\", {\n key: monthMetaData.month,\n className: \"p-datepicker-group\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-header\"\n }, header, backwardNavigator, title, forwardNavigator), dateViewGrid);\n }\n }, {\n key: \"renderMonths\",\n value: function renderMonths(monthsMetaData) {\n var _this23 = this;\n\n var groups = monthsMetaData.map(function (monthMetaData, index) {\n return _this23.renderMonth(monthMetaData, index);\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-group-container\"\n }, groups);\n }\n }, {\n key: \"renderDateView\",\n value: function renderDateView() {\n var viewDate = this.getViewDate();\n var monthsMetaData = this.createMonths(viewDate.getMonth(), viewDate.getFullYear());\n var months = this.renderMonths(monthsMetaData);\n return /*#__PURE__*/React.createElement(React.Fragment, null, months);\n }\n }, {\n key: \"renderMonthViewMonth\",\n value: function renderMonthViewMonth(index) {\n var _this24 = this;\n\n var className = classNames('p-monthpicker-month', {\n 'p-highlight': this.isMonthSelected(index)\n });\n var monthNamesShort = localeOption('monthNamesShort', this.props.locale);\n var monthName = monthNamesShort[index];\n return /*#__PURE__*/React.createElement(\"span\", {\n key: monthName,\n className: className,\n onClick: function onClick(event) {\n return _this24.onMonthSelect(event, index);\n },\n onKeyDown: function onKeyDown(event) {\n return _this24.onMonthCellKeydown(event, index);\n }\n }, monthName, /*#__PURE__*/React.createElement(Ripple, null));\n }\n }, {\n key: \"renderMonthViewMonths\",\n value: function renderMonthViewMonths() {\n var months = [];\n\n for (var i = 0; i <= 11; i++) {\n months.push(this.renderMonthViewMonth(i));\n }\n\n return months;\n }\n }, {\n key: \"renderMonthView\",\n value: function renderMonthView() {\n var backwardNavigator = this.renderBackwardNavigator(true);\n var forwardNavigator = this.renderForwardNavigator(true);\n var yearElement = this.renderTitleYearElement(this.getViewDate().getFullYear());\n var months = this.renderMonthViewMonths();\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-group-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-group\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-header\"\n }, backwardNavigator, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-title\"\n }, yearElement), forwardNavigator))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-monthpicker\"\n }, months));\n }\n }, {\n key: \"renderDatePicker\",\n value: function renderDatePicker() {\n if (!this.props.timeOnly) {\n if (this.props.view === 'date') {\n return this.renderDateView();\n } else if (this.props.view === 'month') {\n return this.renderMonthView();\n } else {\n return null;\n }\n }\n }\n }, {\n key: \"renderHourPicker\",\n value: function renderHourPicker() {\n var _this25 = this;\n\n var currentTime = this.getCurrentDateTime();\n var hour = currentTime.getHours();\n\n if (this.props.hourFormat === '12') {\n if (hour === 0) hour = 12;else if (hour > 11 && hour !== 12) hour = hour - 12;\n }\n\n var hourDisplay = hour < 10 ? '0' + hour : hour;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-hour-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this25.onTimePickerElementMouseDown(e, 0, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this25.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, hourDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this25.onTimePickerElementMouseDown(e, 0, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this25.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n }, {\n key: \"renderMinutePicker\",\n value: function renderMinutePicker() {\n var _this26 = this;\n\n var currentTime = this.getCurrentDateTime();\n var minute = currentTime.getMinutes();\n var minuteDisplay = minute < 10 ? '0' + minute : minute;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-minute-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this26.onTimePickerElementMouseDown(e, 1, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this26.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, minuteDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this26.onTimePickerElementMouseDown(e, 1, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this26.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n }, {\n key: \"renderSecondPicker\",\n value: function renderSecondPicker() {\n var _this27 = this;\n\n if (this.props.showSeconds) {\n var currentTime = this.getCurrentDateTime();\n var second = currentTime.getSeconds();\n var secondDisplay = second < 10 ? '0' + second : second;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-second-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this27.onTimePickerElementMouseDown(e, 2, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this27.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, secondDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this27.onTimePickerElementMouseDown(e, 2, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this27.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n\n return null;\n }\n }, {\n key: \"renderMiliSecondPicker\",\n value: function renderMiliSecondPicker() {\n var _this28 = this;\n\n if (this.props.showMillisec) {\n var currentTime = this.getCurrentDateTime();\n var millisecond = currentTime.getMilliseconds();\n var millisecondDisplay = millisecond < 100 ? (millisecond < 10 ? '00' : '0') + millisecond : millisecond;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-millisecond-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this28.onTimePickerElementMouseDown(e, 3, 1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this28.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, millisecondDisplay), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onMouseDown: function onMouseDown(e) {\n return _this28.onTimePickerElementMouseDown(e, 3, -1);\n },\n onMouseUp: this.onTimePickerElementMouseUp,\n onMouseLeave: this.onTimePickerElementMouseLeave,\n onKeyDown: function onKeyDown(e) {\n return _this28.onContainerButtonKeydown(e);\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n\n return null;\n }\n }, {\n key: \"renderAmPmPicker\",\n value: function renderAmPmPicker() {\n if (this.props.hourFormat === '12') {\n var currentTime = this.getCurrentDateTime();\n var hour = currentTime.getHours();\n var display = hour > 11 ? 'PM' : 'AM';\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-ampm-picker\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onClick: this.toggleAmPm\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-up\"\n }), /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement(\"span\", null, display), /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-link\",\n onClick: this.toggleAmPm\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-down\"\n }), /*#__PURE__*/React.createElement(Ripple, null)));\n }\n\n return null;\n }\n }, {\n key: \"renderSeparator\",\n value: function renderSeparator(separator) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-separator\"\n }, /*#__PURE__*/React.createElement(\"span\", null, separator));\n }\n }, {\n key: \"renderTimePicker\",\n value: function renderTimePicker() {\n if (this.props.showTime || this.props.timeOnly) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-timepicker\"\n }, this.renderHourPicker(), this.renderSeparator(':'), this.renderMinutePicker(), this.props.showSeconds && this.renderSeparator(':'), this.renderSecondPicker(), this.props.showMillisec && this.renderSeparator('.'), this.renderMiliSecondPicker(), this.props.hourFormat === '12' && this.renderSeparator(':'), this.renderAmPmPicker());\n }\n\n return null;\n }\n }, {\n key: \"renderInputElement\",\n value: function renderInputElement() {\n if (!this.props.inline) {\n return /*#__PURE__*/React.createElement(InputText, {\n ref: this.inputRef,\n id: this.props.inputId,\n name: this.props.name,\n type: \"text\",\n className: this.props.inputClassName,\n style: this.props.inputStyle,\n readOnly: this.props.readOnlyInput,\n disabled: this.props.disabled,\n required: this.props.required,\n autoComplete: \"off\",\n placeholder: this.props.placeholder,\n tabIndex: this.props.tabIndex,\n onInput: this.onUserInput,\n onFocus: this.onInputFocus,\n onBlur: this.onInputBlur,\n onKeyDown: this.onInputKeyDown,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n inputMode: this.props.inputMode\n });\n }\n\n return null;\n }\n }, {\n key: \"renderButton\",\n value: function renderButton() {\n if (this.props.showIcon) {\n return /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n icon: this.props.icon,\n onClick: this.onButtonClick,\n tabIndex: \"-1\",\n disabled: this.props.disabled,\n className: \"p-datepicker-trigger\"\n });\n }\n\n return null;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var input = this.renderInputElement();\n var button = this.renderButton();\n\n if (this.props.iconPos === 'left') {\n return /*#__PURE__*/React.createElement(React.Fragment, null, button, input);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, input, button);\n }\n }, {\n key: \"renderButtonBar\",\n value: function renderButtonBar() {\n var _this29 = this;\n\n if (this.props.showButtonBar) {\n var todayClassName = classNames('p-button-text', this.props.todayButtonClassName);\n var clearClassName = classNames('p-button-text', this.props.clearButtonClassName);\n\n var _localeOptions4 = localeOptions(this.props.locale),\n today = _localeOptions4.today,\n clear = _localeOptions4.clear;\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-buttonbar\"\n }, /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n label: today,\n onClick: this.onTodayButtonClick,\n onKeyDown: function onKeyDown(e) {\n return _this29.onContainerButtonKeydown(e);\n },\n className: todayClassName\n }), /*#__PURE__*/React.createElement(Button, {\n type: \"button\",\n label: clear,\n onClick: this.onClearButtonClick,\n onKeyDown: function onKeyDown(e) {\n return _this29.onContainerButtonKeydown(e);\n },\n className: clearClassName\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n if (this.props.footerTemplate) {\n var content = this.props.footerTemplate();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-datepicker-footer\"\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames,\n _this30 = this;\n\n var className = classNames('p-calendar p-component p-inputwrapper', this.props.className, (_classNames = {}, _defineProperty(_classNames, \"p-calendar-w-btn p-calendar-w-btn-\".concat(this.props.iconPos), this.props.showIcon), _defineProperty(_classNames, 'p-calendar-disabled', this.props.disabled), _defineProperty(_classNames, 'p-calendar-timeonly', this.props.timeOnly), _defineProperty(_classNames, 'p-inputwrapper-filled', this.props.value || DomHandler.hasClass(this.inputRef.current, 'p-filled') && this.inputRef.current.value !== ''), _defineProperty(_classNames, 'p-inputwrapper-focus', this.state.focused), _classNames));\n var panelClassName = classNames('p-datepicker p-component', this.props.panelClassName, {\n 'p-datepicker-inline': this.props.inline,\n 'p-disabled': this.props.disabled,\n 'p-datepicker-timeonly': this.props.timeOnly,\n 'p-datepicker-multiple-month': this.props.numberOfMonths > 1,\n 'p-datepicker-monthpicker': this.props.view === 'month',\n 'p-datepicker-touch-ui': this.props.touchUI\n });\n var content = this.renderContent();\n var datePicker = this.renderDatePicker();\n var timePicker = this.renderTimePicker();\n var buttonBar = this.renderButtonBar();\n var footer = this.renderFooter();\n var isVisible = this.props.inline || this.isVisible();\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: function ref(el) {\n return _this30.container = el;\n },\n id: this.props.id,\n className: className,\n style: this.props.style\n }, content, /*#__PURE__*/React.createElement(CalendarPanel, {\n ref: this.overlayRef,\n className: panelClassName,\n style: this.props.panelStyle,\n appendTo: this.props.appendTo,\n inline: this.props.inline,\n onClick: this.onPanelClick,\n onMouseUp: this.onPanelMouseUp,\n \"in\": isVisible,\n onEnter: this.onOverlayEnter,\n onEntered: this.onOverlayEntered,\n onExit: this.onOverlayExit,\n onExited: this.onOverlayExited,\n transitionOptions: this.props.transitionOptions\n }, datePicker, timePicker, buttonBar, footer));\n }\n }]);\n\n return Calendar;\n}(Component);\n\n_defineProperty(Calendar, \"defaultProps\", {\n id: null,\n inputRef: null,\n name: null,\n value: null,\n visible: false,\n viewDate: null,\n style: null,\n className: null,\n inline: false,\n selectionMode: 'single',\n inputId: null,\n inputStyle: null,\n inputClassName: null,\n inputMode: 'none',\n required: false,\n readOnlyInput: false,\n keepInvalid: false,\n mask: null,\n disabled: false,\n tabIndex: null,\n placeholder: null,\n showIcon: false,\n icon: 'pi pi-calendar',\n iconPos: 'right',\n showOnFocus: true,\n numberOfMonths: 1,\n view: 'date',\n touchUI: false,\n showTime: false,\n timeOnly: false,\n showSeconds: false,\n showMillisec: false,\n hourFormat: '24',\n stepHour: 1,\n stepMinute: 1,\n stepSecond: 1,\n stepMillisec: 1,\n shortYearCutoff: '+10',\n hideOnDateTimeSelect: false,\n showWeek: false,\n locale: null,\n dateFormat: null,\n panelStyle: null,\n panelClassName: null,\n monthNavigator: false,\n yearNavigator: false,\n yearRange: null,\n disabledDates: null,\n disabledDays: null,\n minDate: null,\n maxDate: null,\n maxDateCount: null,\n showOtherMonths: true,\n selectOtherMonths: false,\n showButtonBar: false,\n todayButtonClassName: 'p-button-secondary',\n clearButtonClassName: 'p-button-secondary',\n autoZIndex: true,\n baseZIndex: 0,\n appendTo: null,\n tooltip: null,\n tooltipOptions: null,\n ariaLabelledBy: null,\n dateTemplate: null,\n headerTemplate: null,\n footerTemplate: null,\n monthNavigatorTemplate: null,\n yearNavigatorTemplate: null,\n transitionOptions: null,\n onVisibleChange: null,\n onFocus: null,\n onBlur: null,\n onInput: null,\n onSelect: null,\n onChange: null,\n onViewDateChange: null,\n onTodayButtonClick: null,\n onClearButtonClick: null,\n onShow: null,\n onHide: null\n});\n\nexport { Calendar };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,SAA3B,QAA4C,OAA5C;AACA,SAASC,SAAT,QAA0B,sBAA1B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAASC,aAAT,QAA8B,0BAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAASC,IAAT,EAAeC,WAAf,EAA4BC,UAA5B,EAAwCC,6BAAxC,EAAuEC,WAAvE,EAAoFC,UAApF,QAAsG,kBAAtG;AACA,SAASC,GAAT,QAAoB,oBAApB;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,OAAOC,UAAP,IAAqBC,YAArB,EAAmCC,aAAnC,QAAwD,gBAAxD;AACA,SAASC,cAAT,QAA+B,2BAA/B;;AAEA,SAASC,QAAT,GAAoB;EAClBA,QAAQ,GAAGC,MAAM,CAACC,MAAP,IAAiB,UAAUC,MAAV,EAAkB;IAC5C,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGC,SAAS,CAACC,MAA9B,EAAsCF,CAAC,EAAvC,EAA2C;MACzC,IAAIG,MAAM,GAAGF,SAAS,CAACD,CAAD,CAAtB;;MAEA,KAAK,IAAII,GAAT,IAAgBD,MAAhB,EAAwB;QACtB,IAAIN,MAAM,CAACQ,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCJ,MAArC,EAA6CC,GAA7C,CAAJ,EAAuD;UAC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