{"version":3,"file":"kendo.dateinput.min.js","names":["global","factory","exports","module","require","define","amd","globalThis","self","kendodateinput","js","this","$","undefined$1","kendo","window","ui","Widget","DateInputCommon","ns","objectToString","toString","isPlainObject","FOCUSED","STATEDISABLED","STATEINVALID","DISABLED","READONLY","CHANGE","IntlService","Class","extend","init","options","info","culture","getCulture","messages","cldr","name","calendar","numbers","numberFormat","parseDate","value","format","formatDate","date","splitDateFormat","dateFormatNames","locale","dateFieldName","type","buildKeys","cultureInfo","keys","push","calendars","standard","getCultureFormat","patterns","DateInput","element","that","fn","call","_extractFormat","d","min","attr","max","wrapperClass","parent","skipStyling","indexOf","initialValue","val","wrapper","wrap","addClass","className","removeClass","style","cssText","css","height","_validationIcon","icon","iconClass","insertAfter","_form","dateInputInstance","autoCorrectParts","autoSwitchKeys","length","enableMouseWheel","twoDigitYearMax","steps","formatPlaceholder","events","inputEnd","e","error","_blinkInvalidState","keydown","event","keyCode","UP","DOWN","setTimeout","trigger","blur","_change","preventDefault","intlService","autoSwitchParts","_emptyMask","on","setAttribute","is","parents","enable","readonly","_applyCssClasses","label","_label","notify","Date","year","month","day","weekday","hour","minute","second","milliseconds","dayperiod","size","millisecond","fillMode","rounded","setOptions","destroy","off","_formElement","_resetHandler","remove","getTime","writeValue","floatingLabel","refresh","_hasDateInput","_editable","disable","this$1$1","labelOptions","content","Label","widget","floatCheck","document","activeElement","_inputLabel","_bindInput","_unbindInput","removeAttribute","oldValue","_oldValue","_addInvalidState","clearTimeout","_invalidStateTimeout","_removeInvalidState","bind","formId","form","closest","_paste","cssProperties","registerPrefix","registerValues","prop","values","roundedValues","concat","plugin","jQuery"],"sources":["kendo.dateinput.js"],"mappings":"CAAA,SAAWA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBA,OAAOD,QAAUD,EAAQG,QAAQ,iBAAkBA,QAAQ,kBAAmBA,QAAQ,kBAAmBA,QAAQ,8BAC9J,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,CAAC,i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AG5BkI,EAAK,KACL/G,EAAKkF,cAAgB,WACjBpC,YAAW,WACP9C,EAAKnB,MAAM+B,OAInBZ,EAAKiF,aAAe8B,EAAKzD,GAAG,QAAStD,EAAKkF,iBAIlD+B,OAAQ,SAAS3E,GACbA,EAAEY,oBAMVnG,EAAMmK,cAAcC,eAAe,YAAa,YAEhDpK,EAAMmK,cAAcE,eAAe,YAAa,CAAC,CAC7CC,KAAM,UACNC,OAAQvK,EAAMmK,cAAcK,cAAcC,OAAO,CAAC,CAAC,OAAQ,aAG/DvK,EAAGwK,OAAO3H,GApfd,CAsfG9C,OAAOD,MAAM2K,QACF3K","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('kendo.core.js'), require('kendo.label.js'), require('kendo.icons.js'), require('kendo.dateinput.common.js')) :\n typeof define === 'function' && define.amd ? define(['kendo.core', 'kendo.label', 'kendo.icons', 'kendo.dateinput.common'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.kendodateinput = global.kendodateinput || {}, global.kendodateinput.js = factory()));\n})(this, (function () {\n var __meta__ = {\n id: \"dateinput\",\n name: \"DateInput\",\n category: \"web\",\n description: \"The DateInput widget allows to edit date by typing.\",\n depends: [ \"core\", \"label\" ]\n };\n\n (function($, undefined$1) {\n var global = window;\n var kendo = global.kendo;\n var ui = kendo.ui;\n var Widget = ui.Widget;\n var DateInputCommon = ui.DateInputCommon;\n var ns = \".kendoDateInput\";\n var objectToString = {}.toString;\n var isPlainObject = $.isPlainObject;\n\n\n var FOCUSED = \"k-focus\";\n var STATEDISABLED = \"k-disabled\";\n var STATEINVALID = \"k-invalid\";\n\n var DISABLED = \"disabled\";\n var READONLY = \"readonly\";\n var CHANGE = \"change\";\n\n var IntlService = kendo.Class.extend({\n init: function(options) {\n var info = options.culture ? kendo.getCulture(options.culture) : kendo.culture();\n this.messages = options.messages;\n this.cldr = { };\n this.cldr[info.name] = {\n name: info.name,\n calendar: info.calendar || {},\n numbers: info.numberFormat\n };\n },\n\n parseDate: function(value, format, culture) {\n return kendo.parseDate(value, format, culture);\n },\n\n formatDate: function(date, format, culture) {\n return kendo.toString(date, format, culture);\n },\n\n splitDateFormat: function(format) {\n return kendo.date.splitDateFormat(format);\n },\n\n dateFormatNames: function(locale, options) {\n return kendo.date.dateFormatNames(options);\n },\n\n dateFieldName: function(options) {\n return this.messages[options.type] || {};\n }\n });\n\n function buildKeys() {\n var cultureInfo = kendo.culture();\n var keys = [];\n\n keys.push(cultureInfo.calendars.standard[\"/\"]);\n keys.push(cultureInfo.calendars.standard[\":\"]);\n\n return keys;\n }\n\n function getCultureFormat(culture, format) {\n if (!culture) {\n return format;\n }\n var cultureInfo = kendo.getCulture(culture);\n return cultureInfo.calendars.standard.patterns[format] || format;\n }\n\n var DateInput = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n element = that.element;\n\n options = that.options;\n options.format = kendo._extractFormat(options.format || kendo.getCulture(options.culture).calendars.standard.patterns.d);\n options.min = kendo.parseDate(element.attr(\"min\")) || kendo.parseDate(options.min);\n options.max = kendo.parseDate(element.attr(\"max\")) || kendo.parseDate(options.max);\n\n var wrapperClass = (element.parent().attr(\"class\") || \"\");\n var skipStyling = wrapperClass.indexOf(\"picker\") >= 0 && wrapperClass.indexOf(\"rangepicker\") < 0;\n var initialValue = that.options.value || element.val();\n\n if (skipStyling) {\n that.wrapper = that.element.parent();\n } else {\n that.wrapper = element.wrap(\"\").parent();\n that.wrapper.addClass(element[0].className).removeClass('input-validation-error');\n }\n that.wrapper[0].style.cssText = element[0].style.cssText;\n element.css({\n height: element[0].style.height\n });\n\n\n that._validationIcon = $(kendo.ui.icon({ icon: \"exclamation-circle\", iconClass: \"k-input-validation-icon k-hidden\" })).insertAfter(element);\n\n that._form();\n\n that.dateInputInstance = new DateInputCommon(element[0], {\n format: getCultureFormat(options.culture, options.format),\n autoCorrectParts: options.autoCorrectParts,\n autoSwitchKeys: options.autoSwitchKeys.length ? options.autoSwitchKeys : buildKeys(),\n enableMouseWheel: options.enableMouseWheel,\n twoDigitYearMax: options.twoDigitYearMax,\n steps: options.steps,\n formatPlaceholder: options.messages,\n events: {\n inputEnd: function(e) {\n if (e.error) {\n that._blinkInvalidState();\n }\n },\n keydown: function(e) {\n if (e.event.keyCode == kendo.keys.UP || e.event.keyCode == kendo.keys.DOWN) {\n setTimeout(function() {\n that.element.trigger(CHANGE);\n });\n }\n },\n blur: function(e) {\n that._change();\n e.preventDefault();\n },\n },\n intlService: new IntlService({\n culture: options.culture,\n messages: that.options.messages\n }),\n autoSwitchParts: options.autoSwitchParts\n });\n\n that._emptyMask = this.element.val();\n if (options.value) {\n that.value(options.value);\n }\n\n that.element\n .addClass(\"k-input-inner\")\n .attr(\"autocomplete\", \"off\")\n .on(\"focus\" + ns, function() {\n that.wrapper.addClass(FOCUSED);\n })\n .on(\"focusout\" + ns, function() {\n that.wrapper.removeClass(FOCUSED);\n });\n\n try {\n element[0].setAttribute(\"type\", \"text\");\n } catch (e) {\n element[0].type = \"text\";\n }\n\n var disabled = element.is(\"[disabled]\") || $(that.element).parents(\"fieldset\").is(':disabled');\n\n if (disabled) {\n that.enable(false);\n } else {\n that.readonly(element.is(\"[readonly]\"));\n }\n that.value(initialValue);\n if (!skipStyling) {\n that._applyCssClasses();\n }\n\n if (options.label) {\n that._label();\n }\n\n kendo.notify(that);\n },\n\n options: {\n name: \"DateInput\",\n autoCorrectParts: true,\n autoSwitchKeys: [],\n autoSwitchParts: false,\n enableMouseWheel: true,\n culture: \"\",\n value: \"\",\n format: \"\",\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n messages: {\n \"year\": \"year\",\n \"month\": \"month\",\n \"day\": \"day\",\n \"weekday\": \"day of the week\",\n \"hour\": \"hours\",\n \"minute\": \"minutes\",\n \"second\": \"seconds\",\n \"milliseconds\": \"milliseconds\",\n \"dayperiod\": \"AM/PM\"\n },\n size: \"medium\",\n steps: {\n year: 1,\n month: 1,\n day: 1,\n hour: 1,\n minute: 1,\n second: 1,\n millisecond: 1,\n },\n fillMode: \"solid\",\n rounded: \"medium\",\n label: null\n },\n\n events: [\n CHANGE\n ],\n\n min: function(value) {\n if (value !== undefined$1) {\n this.options.min = value;\n } else {\n return this.options.min;\n }\n },\n\n max: function(value) {\n if (value !== undefined$1) {\n this.options.max = value;\n } else {\n return this.options.max;\n }\n },\n\n setOptions: function(options) {\n var that = this;\n Widget.fn.setOptions.call(that, options);\n that.dateInputInstance.destroy();\n that.dateInputInstance = null;\n\n that.dateInputInstance = new DateInputCommon(this.element[0], {\n format: getCultureFormat(that.options.culture, that.options.format),\n autoSwitchKeys: that.options.autoSwitchKeys.length ? that.options.autoSwitchKeys : buildKeys(),\n autoCorrectParts: that.options.autoCorrectParts,\n enableMouseWheel: that.options.enableMouseWheel,\n steps: that.options.steps,\n twoDigitYearMax: that.options.twoDigitYearMax,\n formatPlaceholder: that.options.messages,\n events: {\n inputEnd: function(e) {\n if (e.error) {\n that._blinkInvalidState();\n }\n },\n keydown: function(e) {\n if (e.event.keyCode == kendo.keys.UP || e.event.keyCode == kendo.keys.DOWN) {\n setTimeout(function() {\n that.element.trigger(CHANGE);\n });\n }\n },\n blur: function(e) {\n that._change();\n e.preventDefault();\n },\n },\n intlService: new IntlService({\n culture: that.options.culture,\n messages: that.options.messages\n }),\n autoSwitchParts: that.options.autoSwitchParts\n });\n },\n\n destroy: function() {\n var that = this;\n that.element.off(ns);\n that.dateInputInstance.destroy();\n\n if (that._formElement) {\n that._formElement.off(\"reset\", that._resetHandler);\n }\n\n if (that.label) {\n that.label.destroy();\n }\n\n if (that._validationIcon) {\n that._validationIcon.remove();\n }\n\n Widget.fn.destroy.call(that);\n },\n\n value: function(value) {\n if (value === undefined$1) {\n return this.dateInputInstance.value;\n }\n\n if (value === null) {\n value = \"\";\n }\n\n if (objectToString.call(value) !== \"[object Date]\") {\n value = kendo.parseDate(value, this.options.format, this.options.culture);\n }\n\n if (value && !value.getTime()) {\n value = null;\n }\n\n this.dateInputInstance.writeValue(value);\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.refresh();\n }\n },\n\n _hasDateInput: function() {\n\n return this._emptyMask !== this.element.val();\n },\n\n readonly: function(readonly) {\n this._editable({\n readonly: readonly === undefined$1 ? true : readonly,\n disable: false\n });\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.readonly(readonly === undefined$1 ? true : readonly);\n }\n },\n\n enable: function(enable) {\n this._editable({\n readonly: false,\n disable: !(enable = enable === undefined$1 ? true : enable)\n });\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.enable(enable = enable === undefined$1 ? true : enable);\n }\n },\n\n _label: function() {\n var this$1$1 = this;\n\n var that = this;\n var options = that.options;\n var labelOptions = isPlainObject(options.label) ? options.label : {\n content: options.label\n };\n\n that.label = new kendo.ui.Label(null, $.extend({}, labelOptions, {\n widget: that,\n floatCheck: function () {\n if (!that.value() && !that._hasDateInput() && document.activeElement !== that.element[0]) {\n this$1$1.element.val(\"\");\n return true;\n }\n\n return false;\n }\n }));\n\n that._inputLabel = that.label.element;\n },\n\n _bindInput: function() {\n var that = this;\n that.element\n .on(\"focus\" + ns, function() {\n that.wrapper.addClass(FOCUSED);\n })\n .on(\"focusout\" + ns, function() {\n that.wrapper.removeClass(FOCUSED);\n });\n },\n\n _unbindInput: function() {\n this.element\n .off(\"focus\" + ns)\n .off(\"focusout\" + ns);\n },\n\n _editable: function(options) {\n var that = this;\n var element = that.element;\n var disable = options.disable;\n var readonly = options.readonly;\n var wrapper = that.wrapper;\n\n that._unbindInput();\n\n if (!readonly && !disable) {\n wrapper.removeClass(STATEDISABLED);\n if (element && element.length) {\n element[0].removeAttribute(DISABLED);\n element[0].removeAttribute(READONLY);\n }\n\n that._bindInput();\n } else {\n if (disable) {\n wrapper.addClass(STATEDISABLED);\n element.attr(DISABLED, disable);\n if (element && element.length) {\n element[0].removeAttribute(READONLY);\n }\n }\n if (readonly) {\n element.attr(READONLY, readonly);\n }\n }\n },\n\n _change: function() {\n var that = this;\n var oldValue = that._oldValue;\n var value = that.value();\n\n if (value && that.min() && value < that.min()) {\n that.value(that.min());\n value = that.value();\n }\n if (value && that.max() && value > that.max()) {\n that.value(that.max());\n value = that.value();\n }\n\n if (oldValue && value && value.getTime() !== oldValue.getTime() ||\n oldValue && !value ||\n !oldValue && value\n ) {\n that._oldValue = value;\n that.trigger(CHANGE);\n that.element.trigger(CHANGE);\n }\n },\n\n\n _blinkInvalidState: function() {\n var that = this;\n\n that._addInvalidState();\n clearTimeout(that._invalidStateTimeout);\n that._invalidStateTimeout = setTimeout(that._removeInvalidState.bind(that), 100);\n },\n\n _addInvalidState: function() {\n var that = this;\n\n that.wrapper.addClass(STATEINVALID);\n that._validationIcon.removeClass(\"k-hidden\");\n },\n\n _removeInvalidState: function() {\n var that = this;\n\n that.wrapper.removeClass(STATEINVALID);\n that._validationIcon.addClass(\"k-hidden\");\n that._invalidStateTimeout = null;\n },\n\n\n _form: function() {\n var that = this;\n var element = that.element;\n var formId = element.attr(\"form\");\n var form = formId ? $(\"#\" + formId) : element.closest(\"form\");\n var initialValue = element[0].value;\n\n if (!initialValue && that.options.value) {\n initialValue = that.options.value;\n }\n\n if (form[0]) {\n that._resetHandler = function() {\n setTimeout(function() {\n that.value(initialValue);\n });\n };\n\n that._formElement = form.on(\"reset\", that._resetHandler);\n }\n },\n\n _paste: function(e) {\n e.preventDefault();\n },\n\n\n });\n\n kendo.cssProperties.registerPrefix(\"DateInput\", \"k-input-\");\n\n kendo.cssProperties.registerValues(\"DateInput\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n\n ui.plugin(DateInput);\n\n })(window.kendo.jQuery);\n var kendo$1 = kendo;\n\n return kendo$1;\n\n}));\n"]}