@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
3 lines • 21.2 kB
JavaScript
/* @license */
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`kendo.datepicker.min.js`),require(`kendo.timepicker.min.js`),require(`kendo.html.button.min.js`),require(`kendo.label.min.js`),require(`kendo.actionsheet.min.js`)):typeof define==`function`&&define.amd?define([`exports`,`kendo.datepicker.min`,`kendo.timepicker.min`,`kendo.html.button.min`,`kendo.label.min`,`kendo.actionsheet.min`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.Datetimepicker={}),e.kendo._globals.Datepicker,e.kendo._globals.Timepicker,e.kendo._globals.HtmlButton,e.kendo._globals.Label,e.kendo._globals.Actionsheet))})(this,function(e,t,n,r,i,a){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let o={id:`datetimepicker`,name:`DateTimePicker`,category:`web`,description:`The DateTimePicker allows the end user to select a value from a calendar or a time drop-down list.`,depends:[`datepicker`,`timepicker`,`label`,`actionsheet`]};(function(e,t){var n=window.kendo,r=n.TimeView,i=n.html,a=n.parseDate,o=n.support,s=n.mediaQuery,c=n._activeElement,l=n._extractFormat,u=n.calendar,d=u.isInRange,f=u.restrictValue,p=u.isEqualDatePart,m=r.getMilliseconds,h=n.ui,g=h.Widget,_=`open`,v=`close`,y=`change`,b=`.kendoDateTimePicker`,x=`click`+b,S=o.mouseAndTouchPresent?n.applyEventMap(`up`,b.slice(1)):x,C=`disabled`,w=`readonly`,T=`k-focus`,E=`k-hover`,D=`k-disabled`,O=`mouseenter`+b+` mouseleave`+b,k=`mousedown`+b,A=`month`,j=`<span/>`,M=`aria-activedescendant`,N=`aria-expanded`,P=`aria-hidden`,F=`aria-disabled`,I=`aria-readonly`,L=Date,R=new L(1800,0,1),z=new L(2099,11,31),B={view:`date`},V={view:`time`},H=e.extend,U=({buttonSize:e,messages:t})=>`<div class="k-date-tab k-datetime-wrap"><div class="k-datetime-buttongroup"><div class="k-button-group k-button-group-stretched">`+n.html.renderButton(`<button class="k-selected k-group-start">${n.htmlEncode(t.date)}</button>`,{size:e})+n.html.renderButton(`<button class="k-group-end">${n.htmlEncode(t.time)}</button>`,{size:e})+`</div></div><div class="k-datetime-selector"><div class="k-datetime-calendar-wrap"></div><div class="k-datetime-time-wrap"></div></div><div class="k-datetime-footer k-actions-stretched k-actions">`+n.html.renderButton(`<button class="k-time-accept" title="Set" aria-label="Set">${n.htmlEncode(t.set)}</button>`,{size:e,themeColor:`primary`})+n.html.renderButton(`<button class="k-time-cancel" title="Cancel" aria-label="Cancel">${n.htmlEncode(t.cancel)}</button>`,{size:e})+`</div></div>`,W=`k-selected`,G=g.extend({init:function(t,r){var i=this,o,c;r||={},r.componentType=r.componentType||`classic`,g.fn.init.call(i,t,r),t=i.element,r=i.options,r.disableDates=n.calendar.disabled(r.disableDates),r.min=a(t.attr(`min`))||a(r.min),r.max=a(t.attr(`max`))||a(r.max),r.inputMode=r.inputMode||t.attr(`inputmode`)||`text`,t.attr(`inputmode`,r.inputMode),(+r.max!=+z||+r.min!=+R||+r.startTime!=+R||r.endTime!=+z)&&(this._specifiedRange=!0),J(r),i._initialOptions=H({},r),i._wrapper(),i.bigScreenMQL=s(`large`),i.options.adaptiveMode==`auto`&&i.bigScreenMQL.onChange(function(){i.dateView.popup&&i.dateView.popup.wrapper&&i.dateView.popup.wrapper.remove(),i.dateView&&i.dateView.destroy(),i.timeView.popup&&i.timeView.popup.wrapper&&i.timeView.popup.wrapper.remove(),i.timeView&&i.timeView.destroy(),i.popup&&i.popup.wrapper&&i.popup.wrapper.remove(),r.singlePopup&&i._popup(),i._views()}),i.smallScreenMQL=s(`small`),i.options.adaptiveMode==`auto`&&i.smallScreenMQL.onChange(function(){i.popup&&n.isFunction(i.popup.fullscreen)&&(i.popup.fullscreen(i.smallScreenMQL.mediaQueryList.matches),i.options.timeView&&i.options.timeView.list===`scroll`&&(i.timeView.addTranslate(),i.timeView._updateRanges()))}),r.singlePopup&&i._popup(),i._views(),i._icons(),i._reset(),i._template();try{t[0].setAttribute(`type`,`text`)}catch{t[0].type=`text`}t.addClass(`k-input-inner`).attr({role:`combobox`,"aria-expanded":!1,"aria-haspopup":`dialog`,"aria-controls":i.dateView._dateViewID+` `+i.timeView._timeViewID,autocomplete:`off`}),i._midnight=i._calculateMidnight(r.min,r.max),o=t.is(`[disabled]`)||e(i.element).parents(`fieldset`).is(`:disabled`),o?i.enable(!1):i.readonly(t.is(`[readonly]`)),c=a(r.value||i.element.val(),r.parseFormats,r.culture),i._createDateInput(r),i._old=i._update(c||i.element.val()),i._oldText=t.val(),i._applyCssClasses(),r.label&&i._label(),i.element.removeAttr(`style`),n.notify(i)},options:{name:`DateTimePicker`,autoAdjust:!0,adaptiveTitle:null,adaptiveSubtitle:null,value:null,format:``,timeFormat:``,culture:``,parseFormats:[],dates:[],disableDates:null,startTime:null,endTime:null,min:new L(R),max:new L(z),interval:30,height:200,footer:``,start:A,depth:A,animation:{},month:{},ARIATemplate:({valueType:e,text:t})=>`Current focused ${e} is ${t}`,dateButtonText:`Open the date view`,timeButtonText:`Open the time view`,dateInput:!1,weekNumber:!1,messages:{set:`Set`,cancel:`Cancel`,hour:`hour`,minute:`minute`,second:`second`,millisecond:`millisecond`,now:`Now`,date:`Date`,time:`Time`,today:`Today`,weekColumnHeader:``},adaptiveMode:`none`,componentType:`classic`,size:t,fillMode:t,rounded:t,label:null,autoCorrectParts:!0},events:[_,v,y],componentTypes:{classic:{singlePopup:!1,timeView:{list:`list`}},modern:{singlePopup:!0,timeView:{list:`scroll`}}},setOptions:function(e){let t=this,r=e.value||t.options.value||t._value,i,o,s,c=!1;if(e.componentType&&(c=e.componentType!==t.options.componentType),g.fn.setOptions.call(t,e),e=t.options,e.min=i=a(e.min),e.max=o=a(e.max),J(e),t._midnight=t._calculateMidnight(e.min,e.max),s=e.value||t._value||t.dateView._current,i&&!p(i,s)&&(i=new L(R)),o&&!p(o,s)&&(o=new L(z)),t._dateIcon.off(b),t._dateIcon.remove(),t._timeIcon.off(b),t._timeIcon.remove(),c){let n=G.prototype.componentTypes;e.timeView=n[e.componentType].timeView,e.singlePopup=n[e.componentType].singlePopup,e.omitPopup=n[e.componentType].singlePopup,e.singlePopup&&t._popup(),t._views()}t.dateView.setOptions(e),t.timeView.setOptions(H({},e,{format:e.timeFormat,min:i,max:o})),t._icons(),t._editable(e),t._createDateInput(e),t._dateInput||t.element.val(n.toString(r,e.format,e.culture)),r&&(t._updateARIA(r),t.value(new Date(r)),t.dateView&&t.dateView.value(new Date(r))),e.label&&t._inputLabel?t.label.setOptions(e.label):e.label===!1?(t.label._unwrapFloating(),t._inputLabel.remove(),delete t._inputLabel):e.label&&t._label()},_editable:function(e){var t=this,r=t.element.off(b),i=t._dateIcon.off(b),a=t._timeIcon.off(b),o=t.wrapper.off(b),s=e.readonly,c=e.disable;!s&&!c?(o.removeClass(D).on(O,t._toggleHover),r&&r.length&&(r[0].removeAttribute(C),r[0].removeAttribute(w,!1),r[0].removeAttribute(F,!1),r[0].removeAttribute(I,!1)),r.on(`keydown`+b,t._keydown.bind(t)).on(`focus`+b,function(){t.wrapper.addClass(T)}).on(`focusout`+b,function(){t.wrapper.removeClass(T),r.val()!==t._oldText&&(t._change(r.val()),r.val()||t.dateView.current(n.calendar.getToday())),!t.options.singlePopup&&(t.close(`date`),t.close(`time`))}),i.on(k,q).on(S,function(e){t.toggle(`date`),t._focusElement(e.type)}),a.on(k,q).on(S,function(e){t.toggle(`time`),t._focusElement(e.type)})):(o.addClass(c?D:``).removeClass(c?``:D),r.attr(C,c).attr(w,s).attr(F,c).attr(I,s))},_label:function(){var t=this,r=t.options,i=e.isPlainObject(r.label)?r.label:{content:r.label};t._dateInput&&(i.floatCheck=()=>!t.value()&&(!t._dateInput._hasDateInput()||t.element.val()===``)&&document.activeElement!==t.element[0]?(t.element.val(``),!0):!1),t.label=new n.ui.Label(null,e.extend({},i,{widget:t})),t._inputLabel=t.label.element},_focusElement:function(e){var t=this.element;(!o.touch||o.mouseAndTouchPresent&&!(e||``).match(/touch/i))&&t[0]!==c()&&t.trigger(`focus`)},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t?!0:e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t?!0:e)},destroy:function(){var e=this;g.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.label&&e.label.destroy(),e.options.singlePopup&&(e.popup.element.off(b),e.popup.destroy()),e.element.off(b),e._dateIcon.off(b),e._timeIcon.off(b),e.wrapper.off(b),e._form&&e._form.off(`reset`,e._resetHandler),e.bigScreenMQL&&=(e.bigScreenMQL.destroy(),null),e.smallScreenMQL&&=(e.smallScreenMQL.destroy(),null)},close:function(e){var t=this;t.options.singlePopup?t.popup.close():(e!==`time`&&(e=`date`),t[e+`View`].close()),setTimeout(function(){t.element.removeAttr(`aria-activedescendant`)})},open:function(e){var t=this,n;t.options.singlePopup?(t.dateView._calendar(),t.timeView.ul.find(`li`).length<1&&t.timeView.bind(),n=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),e===`time`?t._switchToTimeView():t._switchToDateView(),this._dateIcon.toggle(e!==`time`),this._timeIcon.toggle(e===`time`),setTimeout(function(){t.popup._hovered=n},1)):(e!==`time`&&(e=`date`),this[e+`View`].open())},min:function(e){return this._option(`min`,e)},max:function(e){return this._option(`max`,e)},toggle:function(e){if(this.options.singlePopup)this.popup.visible()?this.close():this.open(e);else{var t=`timeView`;e===`time`?t=`dateView`:e=`date`,this[e+`View`].toggle(),this[t].close()}},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),n._old===null&&(n._dateInput?n._dateInput.value(n._old):n.element.val(``)),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_change:function(e){var t=this,n=t.element.val(),r;e=t._update(e),r=+t._old!=+e;var i=r&&!t._typing,a=n!==t.element.val();(i||a)&&t.element.trigger(y),r&&(t._old=e,t._oldText=t.element.val(),t.trigger(y)),t._typing=!1},_option:function(e,n){var r=this,i=r.options,o=r.timeView,s=o.options,c=r._value||r._old,l,u;if(n===t)return i[e];if(n=a(n,i.parseFormats,i.culture),s.maxSet=!1,n){if(i.min.getTime()===i.max.getTime()&&(s.dates=[]),i[e]=new L(n.getTime()),r.dateView[e](n),r._dateInput&&r._dateInput[e](n),r._midnight=r._calculateMidnight(i.min,i.max),c&&(l=p(i.min,c),u=p(i.max,c)),l||u){if(s[e]=n,l&&!u&&(s.max=K(i.interval)),u)if(r._midnight){o.dataBind([z]);return}else l||(s.min=R,s.maxSet=!0)}else s.max=z,s.min=R;o.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(E,t.type===`mouseenter`)},_update:function(t){var r=this,i=r.options,o=i.min,s=i.max,c=i.startTime,l=i.endTime,u=i.dates,m=r.timeView,h=r._value,g=a(t,i.parseFormats,i.culture),_=g===null&&h===null||g instanceof Date&&h instanceof Date,v,b,x,S,C;return i.disableDates&&i.disableDates(g)&&(g=null,!r._old&&!r.element.val()&&(t=null)),+g==+h&&_?(C=n.toString(g,i.format,i.culture),C!==t&&(r.element.val(g===null?t:C),t instanceof String&&r.element.trigger(y)),g):(g!==null&&p(g,o)?g=f(g,o,s):d(g,o,s)||(g=null),r._value=g,m.value(g),r.dateView.value(g),g&&(x=r._old,b=m.options,b.maxSet=!1,u[0]&&(u=e.grep(u,function(e){return p(g,e)}),u[0]&&(m.dataBind(u),S=!0)),S||(p(g,o)&&(b.min=c||o,b.max=l||K(i.interval),v=!0),p(g,s)&&(r._midnight?(m.dataBind([z]),S=!0):(b.max=l||s,b.maxSet=!0,v||(b.min=R),v=!0))),!S&&(!x&&v||x&&!p(x,g))&&(v||(b.max=l||z,b.min=c||R),m.bind())),r._dateInput?g&&r._dateInput.value(g):r.element.val(n.toString(g||t,i.format,i.culture)),r._updateARIA(g),g)},_keydown:function(e){var t=this,r=t.dateView,i=t.timeView,a=t.element.val(),o=t.options.singlePopup?t.popup.visible():r.popup.visible(),s=t._dateInput&&e.stopImmediatePropagation;e.altKey&&e.keyCode===n.keys.DOWN?t.toggle(o?`time`:`date`):o?(r.move(e),t._updateARIA(r._current),e.keyCode===n.keys.ENTER&&t.toggle(`time`)):!t.options.singlePopup&&i.popup.visible()?i.move(e):e.keyCode===n.keys.ENTER&&a!==t._oldText?t._change(a):(t._typing=!0,s=!1),s&&e.stopImmediatePropagation()},_timeOption:function(e){var t=this,n=t.options,r=n[e],i=e==`startTime`?n.min:n.max,a=e==`startTime`?new L(R):new L(z),o;return r&&(a=new L(r)),r&&i&&(o=new Date(i.getFullYear(),i.getMonth(),i.getDate(),r.getHours(),r.getMinutes(),r.getSeconds()),e==`startTime`?t.options.min=o:t.options.max=o),n.componentType===`modern`&&(a=i),a},_views:function(){var e=this,t=e.element,i=e.options,o=t.attr(`id`),s,c,l,u,d,f,p,m,h;i.singlePopup&&(i.dateDiv=e.popup.element.find(`.k-datetime-calendar-wrap`),p=e.popup.element.find(`.k-datetime-time-wrap`),i.omitPopup=m=!0,h=i.timeView),e.dateView&&=(e.dateView.destroy(),null),e.dateView=s=new n.DateView(H({},i,{id:o,anchor:e.wrapper,change:function(){var t=e._applyDateValue();i.singlePopup?(e.timeView._currentlySelected||(e.timeView._currentlySelected=new Date),e.timeView._currentlySelected.setFullYear(t.getFullYear()),e.timeView._currentlySelected.setMonth(t.getMonth()),e.timeView._currentlySelected.setDate(t.getDate()),e._switchToTimeView(),e._toggleIcons(`time`)):(e._change(t),e.close(`date`))},close:function(n){e.trigger(v,B)?n.preventDefault():(t.attr(N,!1),l.attr(P,!0))},open:function(n){e.trigger(_,B)?n.preventDefault():(t.val()!==e._oldText&&(f=a(t.val(),i.parseFormats,i.culture),e.dateView[f?`current`:`value`](f)),l.attr(P,!1),t.attr(N,!0),e._updateARIA(f))}})),l=s.div,d=i.min.getTime(),e.timeView&&=(e.timeView.destroy(),null),e.timeView=c=new r({id:o,adaptiveMode:i.adaptiveMode,adaptiveTitle:i.adaptiveTitle,adaptiveSubtitle:i.adaptiveSubtitle,value:i.value,size:i.adaptiveMode!=`auto`||e.bigScreenMQL.mediaQueryList.matches?i.size:`large`,anchor:e.wrapper,animation:i.animation,format:i.timeFormat,culture:i.culture,height:i.componentType===`modern`?null:i.height,interval:i.interval,startTime:i.startTime,endTime:i.endTime,min:e._timeOption(`startTime`),max:e._timeOption(`endTime`),dates:d===i.max.getTime()?[new Date(d)]:[],parseFormats:i.parseFormats,validateDate:!(i.startTime||i.endTime),change:function(r,a){r=e._applyTimeValue(r),a?(e._timeSelected=!0,e._change(r)):(t.val(n.toString(r,i.format,i.culture)),s.value(r),e._updateARIA(r))},close:function(n){e.trigger(v,V)?n.preventDefault():(u.attr(P,!0),t.attr(N,!1))},open:function(n){e.options.componentType===`modern`?e.timeView._updateTitle():c._adjustListWidth(),e.trigger(_,V)?n.preventDefault():(t.val()!==e._oldText&&(f=a(t.val(),i.parseFormats,i.culture),e.timeView.value(f)),u.attr(P,!1),t.attr(N,!0),c.options.active(c.current()))},active:function(e){t&&t.length&&t[0].removeAttribute(M),e&&t.attr(M,c._optionID)},popup:i.popup,useValueToRender:!0,specifiedRange:e._specifiedRange,omitPopup:m,timeDiv:p,timeView:h,messages:e.options.messages}),u=c.ul},_applyDateValue:function(){var e=this,t=e.options,r=e.dateView.calendar.value(),i=+r,a=+t.min,o=+t.max,s,c;return(i===a||i===o)&&(s=i===a?a:o,s=new L(e._value||s),s.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),d(s,a,o)&&(r=s)),e._value&&(c=n.date.setHours(new Date(r),e._value),d(c,a,o)&&(r=c)),r},_applyTimeValue:function(e){var t=this.timeView,n=this.options;return e=t._parse(e),e<n.min?(e=new L(+n.min),t.options.min=e):e>n.max&&(e=new L(+n.max),t.options.max=e),e},_icons:function(){var t=this,n=t.element,r=t.options;t.wrapper.find(`button.k-input-button`)[0]||(t._dateIcon=e(i.renderButton(`<button unselectable="on" tabindex="-1" class="k-input-button" aria-label="`+r.dateButtonText+`"></button>`,{icon:`calendar`,size:r.size,fillMode:r.fillMode,shape:`none`})).insertAfter(n),t._timeIcon=e(i.renderButton(`<button unselectable="on" tabindex="-1" class="k-input-button" aria-label="`+r.timeButtonText+`"></button>`,{icon:`clock`,size:r.size,fillMode:r.fillMode,shape:`none`})).insertAfter(t._dateIcon)),r.singlePopup&&t._timeIcon.hide()},_wrapper:function(){var e=this,t=e.element,n=t.parents(`.k-datetimepicker`);n[0]||(n=t.wrap(j).parent()),n[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),e.wrapper=n.addClass(`k-datetimepicker k-input`).addClass(t[0].className).removeClass(`input-validation-error`)},_reset:function(){var t=this,r=t.element,i=r.attr(`form`),a=i?e(`#`+i):r.closest(`form`),o=t.options,s=o.disableDates,c=o.parseFormats.length?o.parseFormats:null,l=t._initialOptions.value,u=r[0].defaultValue;l&&s&&s(l)&&(l=null),(!u||!n.parseDate(u,c,o.culture))&&l&&r.attr(`value`,n.toString(l,o.format,o.culture)),a[0]&&(t._resetHandler=function(){t.value(l||r[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=a.on(`reset`,t._resetHandler))},_template:function(){this._ariaTemplate=n.template(this.options.ARIATemplate).bind(this)},_createDateInput:function(e){this._dateInput&&=(this._dateInput.destroy(),null),e.dateInput&&(this._dateInput=new h.DateInput(this.element,{culture:e.culture,format:e.format,size:e.size,fillMode:e.fillMode,rounded:e.rounded,min:e.min,max:e.max,interval:e.interval,messages:e.messages.dateInput,autoCorrectParts:e.autoCorrectParts,autoAdjust:e.autoAdjust,toggleDayPeriod:!0,inputMode:e.inputMode}))},_calculateMidnight:function(e,t){return m(e)+m(t)===0},_updateARIA:function(e){var t=this,n=t.dateView.calendar;t.element&&t.element.length&&t.element[0].removeAttribute(M),n&&t.element.attr(M,n._updateAria(t._ariaTemplate,e))},_popup:function(){var t=this,r=t.options,i=e(`<div></div>`).attr(P,`true`).addClass(`k-datetime-container k-group k-reset`).appendTo(document.body);i.append(n.template(U)(H({},t.options,{buttonSize:r.adaptiveMode!=`auto`||t.bigScreenMQL.mediaQueryList.matches?r.size:`large`}))),t.popup&&=(t.popup.destroy(),t.popup.element.remove(),null),t.options.adaptiveMode==`auto`&&!t.bigScreenMQL.mediaQueryList.matches?t.popup=new h.ActionSheet(i,{adaptive:!0,title:r.adaptiveTitle||`Select Date and Time`,subtitle:r.adaptiveSubtitle,closeButton:{icon:`check`,themeColor:`primary`},focusOnActivate:!1,fullscreen:t.smallScreenMQL.mediaQueryList.matches,popup:H(r.popup,r,{name:`Popup`,isRtl:n.support.isRtl(t.wrapper),anchor:t.wrapper,activate:function(){t.options.timeView&&t.options.timeView.list===`scroll`&&(t.timeView.addTranslate(),t.timeView.applyValue(t._value),t.timeView._updateRanges())},open:function(e){t.trigger(_,{view:this.element.find(`.k-date-tab`).length?`date`:`time`,sender:t})?e.preventDefault():(this.element.attr(P,!1),t.element.attr(N,!0)),t.timeView._updateTitle()},close:function(e){t.trigger(v,{view:this.element.find(`.k-date-tab`).length?`date`:`time`,sender:t})?e.preventDefault():(t.element.attr(N,!1),this.element.attr(P,!0))}})}):t.popup=new h.Popup(i,H(r.popup,r,{name:`Popup`,isRtl:n.support.isRtl(t.wrapper),anchor:t.wrapper,activate:function(){t.options.timeView&&t.options.timeView.list===`scroll`&&(t.timeView.addTranslate(),t.timeView.applyValue(t._value),t.timeView._updateRanges())},open:function(e){t.trigger(_,{view:this.element.find(`.k-date-tab`).length?`date`:`time`,sender:t})?e.preventDefault():(this.element.attr(P,!1),t.element.attr(N,!0)),t.timeView._updateTitle()},close:function(e){t.trigger(v,{view:this.element.find(`.k-date-tab`).length?`date`:`time`,sender:t})?e.preventDefault():(t.element.attr(N,!1),this.element.attr(P,!0))}})),i.on(x+b,`.k-datetime-buttongroup .k-button`,t._groupChangeClick.bind(t)),i.on(x+b,`.k-datetime-footer button.k-time-cancel`,t._cancelClickHandler.bind(t)),i.on(x+b,`.k-datetime-footer button.k-time-accept`,t._setClickHandler.bind(t))},_groupChangeClick:function(t){q(t),e(t.currentTarget).index()?(this._switchToTimeView(),this._toggleIcons(`time`)):(this._switchToDateView(),this._toggleIcons(`date`))},_switchToDateView:function(){this.timeView.list.addClass(`k-hidden`),this.popup.element.find(`.k-group-start, .k-group-end`).removeClass(W).eq(0).addClass(W),this.popup.element.find(`.k-datetime-wrap`).removeClass(`k-time-tab`).addClass(`k-date-tab`)},_switchToTimeView:function(){this.timeView.list.removeClass(`k-hidden`),this.timeView.addTranslate(),this.timeView.applyValue(this._value),this.timeView._updateRanges(),this.popup.element.find(`.k-group-start, .k-group-end`).removeClass(W).eq(1).addClass(W),this.popup.element.find(`.k-datetime-wrap`).removeClass(`k-date-tab`).addClass(`k-time-tab`)},_toggleIcons:function(e){if(!e){this._dateIcon.toggle(),this._timeIcon.toggle();return}this._dateIcon.toggle(e!==`time`),this._timeIcon.toggle(e===`time`)},_cancelClickHandler:function(e){q(e),this._value&&(this.value(this._value),this.dateView.value(this._value)),this.popup.close()},_setClickHandler:function(e){q(e);var t=this._applyDateValue(),n;t||=new Date,n=this.timeView._currentlySelected||t,this.timeView._updateCurrentlySelected(),t.setHours(n.getHours()),t.setMinutes(n.getMinutes()),t.setSeconds(n.getSeconds()),t=this._applyTimeValue(t),this._change(t),this.popup.close()}});function K(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function q(e){e.preventDefault()}function J(t){var r=n.getCulture(t.culture).calendars.standard.patterns,i=!t.parseFormats.length,a;t.format=l(t.format||r.g),t.timeFormat=a=l(t.timeFormat||r.t),n.DateView.normalize(t),i&&t.parseFormats.unshift(`yyyy-MM-ddTHH:mm:ss`),e.inArray(a,t.parseFormats)===-1&&t.parseFormats.push(a)}n.cssProperties.registerPrefix(`DateTimePicker`,`k-input-`),n.cssProperties.registerValues(`DateTimePicker`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}]),h.plugin(G)})(window.kendo.jQuery);var s=kendo;e.__meta__=o,e.default=s});
//# sourceMappingURL=kendo.datetimepicker.min.js.map