/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.datetimepicker.min",["kendo.datepicker.min","kendo.timepicker.min"],e)}(function(){return function(e,t){function a(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function n(e){e.preventDefault()}function i(t){var a,n=r.getCulture(t.culture).calendars.standard.patterns,i=!t.parseFormats.length;t.format=d(t.format||n.g),t.timeFormat=a=d(t.timeFormat||n.t),r.DateView.normalize(t),i&&t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"),e.inArray(a,t.parseFormats)===-1&&t.parseFormats.splice(1,0,a)}var r=window.kendo,o=r.TimeView,l=r.parseDate,s=r._activeElement,d=r._extractFormat,m=r.calendar,u=m.isInRange,c=m.restrictValue,p=m.isEqualDatePart,f=o.getMilliseconds,_=r.ui,v=_.Widget,g="open",w="close",h="change",x=".kendoDateTimePicker",k="click"+x,y="disabled",b="readonly",V="k-state-default",D="k-state-focused",T="k-state-hover",A="k-state-disabled",I="mouseenter"+x+" mouseleave"+x,F="mousedown"+x,C="month",O="<span/>",R="aria-activedescendant",M="aria-expanded",H="aria-hidden",W="aria-owns",B="aria-disabled",S=Date,E=new S(1800,0,1),q=new S(2099,11,31),N={view:"date"},P={view:"time"},j=e.extend,Y=v.extend({init:function(t,a){var n,o=this;v.fn.init.call(o,t,a),t=o.element,a=o.options,a.disableDates=r.calendar.disabled(a.disableDates),a.min=l(t.attr("min"))||l(a.min),a.max=l(t.attr("max"))||l(a.max),i(a),o._initialOptions=j({},a),o._wrapper(),o._views(),o._icons(),o._reset(),o._template();try{t[0].setAttribute("type","text")}catch(s){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1}),o._midnight=o._calculateMidnight(a.min,a.max),n=t.is("[disabled]")||e(o.element).parents("fieldset").is(":disabled"),n?o.enable(!1):o.readonly(t.is("[readonly]")),o._old=o._update(a.value||o.element.val()),o._oldText=t.val(),r.notify(o)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],min:new S(E),max:new S(q),interval:30,height:200,footer:"",start:C,depth:C,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "d")#',dateButtonText:"Open the date view",timeButtonText:"Open the time view"},events:[g,w,h],setOptions:function(e){var t,a,n,o=this,s=o._value;v.fn.setOptions.call(o,e),e=o.options,e.min=t=l(e.min),e.max=a=l(e.max),i(e),o._midnight=o._calculateMidnight(e.min,e.max),n=e.value||o._value||o.dateView._current,t&&!p(t,n)&&(t=new S(E)),a&&!p(a,n)&&(a=new S(q)),o.dateView.setOptions(e),o.timeView.setOptions(j({},e,{format:e.timeFormat,min:t,max:a})),s&&(o.element.val(r.toString(s,e.format,e.culture)),o._updateARIA(s))},_editable:function(t){var a=this,i=a.element.off(x),o=a._dateIcon.off(x),l=a._timeIcon.off(x),d=a._inputWrapper.off(x),m=t.readonly,u=t.disable;m||u?(d.addClass(u?A:V).removeClass(u?V:A),i.attr(y,u).attr(b,m).attr(B,u)):(d.addClass(V).removeClass(A).on(I,a._toggleHover),i.removeAttr(y).removeAttr(b).attr(B,!1).on("keydown"+x,e.proxy(a._keydown,a)).on("focus"+x,function(){a._inputWrapper.addClass(D)}).on("focusout"+x,function(){a._inputWrapper.removeClass(D),i.val()!==a._oldText&&a._change(i.val()),a.close("date"),a.close("time")}),o.on(F,n).on(k,function(){a.toggle("date"),r.support.touch||i[0]===s()||i.focus()}),l.on(F,n).on(k,function(){a.toggle("time"),r.support.touch||i[0]===s()||i.focus()}))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;v.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.element.off(x),e._dateIcon.off(x),e._timeIcon.off(x),e._inputWrapper.off(x),e._form&&e._form.off("reset",e._resetHandler)},close:function(e){"time"!==e&&(e="date"),this[e+"View"].close()},open:function(e){"time"!==e&&(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){var t="timeView";"time"!==e?e="date":t="dateView",this[e+"View"].toggle(),this[t].close()},value:function(e){var a=this;return e===t?a._value:(a._old=a._update(e),null===a._old&&a.element.val(""),a._oldText=a.element.val(),t)},_change:function(e){var t,a,n,i=this,r=i.element.val();e=i._update(e),t=+i._old!=+e,a=t&&!i._typing,n=r!==i.element.val(),(a||n)&&i.element.trigger(h),t&&(i._old=e,i._oldText=i.element.val(),i.trigger(h)),i._typing=!1},_option:function(e,n){var i,r,o=this,s=o.options,d=o.timeView,m=d.options,u=o._value||o._old;if(n===t)return s[e];if(n=l(n,s.parseFormats,s.culture)){if(s.min.getTime()===s.max.getTime()&&(m.dates=[]),s[e]=new S(n.getTime()),o.dateView[e](n),o._midnight=o._calculateMidnight(s.min,s.max),u&&(i=p(s.min,u),r=p(s.max,u)),i||r){if(m[e]=n,i&&!r&&(m.max=a(s.interval)),r){if(o._midnight)return d.dataBind([q]),t;i||(m.min=E)}}else m.max=q,m.min=E;d.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_update:function(t){var n,i,o,s,d,m=this,f=m.options,_=f.min,v=f.max,g=f.dates,w=m.timeView,x=m._value,k=l(t,f.parseFormats,f.culture),y=null===k&&null===x||k instanceof Date&&x instanceof Date;return f.disableDates&&f.disableDates(k)&&(k=null,m._old||m.element.val()||(t=null)),+k===+x&&y?(d=r.toString(k,f.format,f.culture),d!==t&&(m.element.val(null===k?t:d),t instanceof String&&m.element.trigger(h)),k):(null!==k&&p(k,_)?k=c(k,_,v):u(k,_,v)||(k=null),m._value=k,w.value(k),m.dateView.value(k),k&&(o=m._old,i=w.options,g[0]&&(g=e.grep(g,function(e){return p(k,e)}),g[0]&&(w.dataBind(g),s=!0)),s||(p(k,_)&&(i.min=_,i.max=a(f.interval),n=!0),p(k,v)&&(m._midnight?(w.dataBind([q]),s=!0):(i.max=v,n||(i.min=E),n=!0))),!s&&(!o&&n||o&&!p(o,k))&&(n||(i.max=q,i.min=E),w.bind())),m.element.val(r.toString(k||t,f.format,f.culture)),m._updateARIA(k),k)},_keydown:function(e){var t=this,a=t.dateView,n=t.timeView,i=t.element.val(),o=a.popup.visible();e.altKey&&e.keyCode===r.keys.DOWN?t.toggle(o?"time":"date"):o?(a.move(e),t._updateARIA(a._current)):n.popup.visible()?n.move(e):e.keyCode===r.keys.ENTER&&i!==t._oldText?t._change(i):t._typing=!0},_views:function(){var e,t,a,n,i,s,d=this,m=d.element,c=d.options,p=m.attr("id");d.dateView=e=new r.DateView(j({},c,{id:p,anchor:d.wrapper,change:function(){var t,a,n=e.calendar.value(),i=+n,o=+c.min,l=+c.max;i!==o&&i!==l||(t=i===o?o:l,t=new S(d._value||t),t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),u(t,o,l)&&(n=t)),d._value&&(a=r.date.setHours(new Date(n),d._value),u(a,o,l)&&(n=a)),d._change(n),d.close("date")},close:function(e){d.trigger(w,N)?e.preventDefault():(m.attr(M,!1),a.attr(H,!0),t.popup.visible()||m.removeAttr(W))},open:function(t){d.trigger(g,N)?t.preventDefault():(m.val()!==d._oldText&&(s=l(m.val(),c.parseFormats,c.culture),d.dateView[s?"current":"value"](s)),a.attr(H,!1),m.attr(M,!0).attr(W,e._dateViewID),d._updateARIA(s))}})),a=e.div,i=c.min.getTime(),d.timeView=t=new o({id:p,value:c.value,anchor:d.wrapper,animation:c.animation,format:c.timeFormat,culture:c.culture,height:c.height,interval:c.interval,min:new S(E),max:new S(q),dates:i===c.max.getTime()?[new Date(i)]:[],parseFormats:c.parseFormats,change:function(a,n){a=t._parse(a),a<c.min?(a=new S((+c.min)),t.options.min=a):a>c.max&&(a=new S((+c.max)),t.options.max=a),n?(d._timeSelected=!0,d._change(a)):(m.val(r.toString(a,c.format,c.culture)),e.value(a),d._updateARIA(a))},close:function(t){d.trigger(w,P)?t.preventDefault():(n.attr(H,!0),m.attr(M,!1),e.popup.visible()||m.removeAttr(W))},open:function(e){t._adjustListWidth(),d.trigger(g,P)?e.preventDefault():(m.val()!==d._oldText&&(s=l(m.val(),c.parseFormats,c.culture),d.timeView.value(s)),n.attr(H,!1),m.attr(M,!0).attr(W,t._timeViewID),t.options.active(t.current()))},active:function(e){m.removeAttr(R),e&&m.attr(R,t._optionID)}}),n=t.ul},_icons:function(){var t=this,a=t.element,n=t.options,i=a.next("span.k-select");i[0]||(i=e('<span unselectable="on" class="k-select"><span class="k-link k-link-date" aria-label="'+n.dateButtonText+'"><span unselectable="on" class="k-icon k-i-calendar"></span></span><span class="k-link k-link-time" aria-label="'+n.timeButtonText+'"><span unselectable="on" class="k-icon k-i-clock"></span></span></span>').insertAfter(a)),i=i.children(),i=i.children(),t._dateIcon=i.eq(0).attr("aria-controls",t.dateView._dateViewID),t._timeIcon=i.eq(1).attr("aria-controls",t.timeView._timeViewID)},_wrapper:function(){var t,a=this,n=a.element;t=n.parents(".k-datetimepicker"),t[0]||(t=n.wrap(O).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(O).parent()),t[0].style.cssText=n[0].style.cssText,n.css({width:"100%",height:n[0].style.height}),a.wrapper=t.addClass("k-widget k-datetimepicker k-header").addClass(n[0].className),a._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,a=t.element,n=a.attr("form"),i=n?e("#"+n):a.closest("form");i[0]&&(t._resetHandler=function(){t.value(a[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=i.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=r.template(this.options.ARIATemplate)},_calculateMidnight:function(e,t){return f(e)+f(t)===0},_updateARIA:function(e){var t,a=this,n=a.dateView.calendar;a.element.removeAttr(R),n&&(t=n._cell,t.attr("aria-label",a._ariaTemplate({current:e||n.current()})),a.element.attr(R,t.attr("id")))}});_.plugin(Y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,a){(a||t)()});
//# sourceMappingURL=kendo.datetimepicker.min.js.map
