text: /*
  * Kendo UI Web v2014.1.318 (http://kendoui.com)
  * Copyright 2014 Telerik AD. All rights reserved.
  *
  * Kendo UI Web commercial licenses may be obtained at
  * http://www.telerik.com/purchase/license-agreement/kendo-ui-web
  * If you do not own a commercial license, this file shall be governed by the
  * GNU General Public License (GPL) version 3.
  * For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
  */
  !function(e,define){define(["./kendo.calendar.min","./kendo.popup.min"],e)}(function(){return function(e,t){function n(t){var n=t.parseFormats,i=t.format;N.normalize(t),n=e.isArray(n)?n:[n],-1===e.inArray(i,n)&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var r,o=window.kendo,a=o.ui,s=a.Widget,l=o.parseDate,u=o.keys,c=o.template,d=o._activeElement,f="<div />",h="<span />",p=".kendoDatePicker",g="click"+p,m="open",v="close",_="change",y="disabled",b="readonly",w="k-state-default",x="k-state-focused",k="k-state-selected",C="k-state-disabled",T="k-state-hover",S="mouseenter"+p+" mouseleave"+p,F="mousedown"+p,D="id",M="min",E="max",z="month",O="aria-disabled",A="aria-expanded",P="aria-hidden",H="aria-readonly",N=o.calendar,I=N.isInRange,R=N.restrictValue,L=N.isEqualDatePart,B=e.extend,q=e.proxy,W=Date,j=function(t){var n,i=this,r=document.body,s=e(f).attr(P,"true").addClass("k-calendar-container").appendTo(r);i.options=t=t||{},n=t.id,n&&(n+="_dateview",s.attr(D,n),i._dateViewID=n),i.popup=new a.Popup(s,B(t.popup,t,{name:"Popup",isRtl:o.support.isRtl(t.anchor)})),i.div=s,i.value(t.value)};j.prototype={_calendar:function(){var t,n=this,r=n.calendar,s=n.options;r||(t=e(f).attr(D,o.guid()).appendTo(n.popup.element).on(F,i).on(g,"td:has(.k-link)",q(n._click,n)),n.calendar=r=new a.Calendar(t),n._setOptions(s),o.calendar.makeUnselectable(r.element),r.navigate(n._value||n._current,s.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,start:e.start})},setOptions:function(e){var t=this.options;this.options=B(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(M,e)},max:function(e){this._option(E,e)},toggle:function(){var e=this;e[e.popup.visible()?v:m]()},move:function(e){var n=this,i=e.keyCode,r=n.calendar,o=e.ctrlKey&&i==u.DOWN||i==u.ENTER;if(i==u.ESC)return n.close(),t;if(e.altKey)return i==u.DOWN?(n.open(),e.preventDefault()):i==u.UP&&(n.close(),e.preventDefault()),t;if(n.popup.visible())return o&&r._cell.hasClass(k)?(n.close(),e.preventDefault(),t):(n._current=r._move(e),t)},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options;t._value=e,t._current=new W(+R(e,i.min,i.max)),n&&n.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(k)&&this.close()},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},j.normalize=n,o.DateView=j,r=s.extend({init:function(e,t){var i,r,a=this;s.fn.init.call(a,e,t),e=a.element,t=a.options,t.min=l(e.attr("min"))||l(t.min),t.max=l(e.attr("max"))||l(t.max),n(t),a._wrapper(),a.dateView=new j(B({},t,{id:e.attr(D),anchor:a.wrapper,change:function(){a._change(this.value()),a.close()},close:function(t){a.trigger(v)?t.preventDefault():(e.attr(A,!1),r.attr(P,!0))},open:function(t){var n,i=a.options;a.trigger(m)?t.preventDefault():(a.element.val()!==a._oldText&&(n=l(e.val(),i.parseFormats,i.culture),a.dateView[n?"current":"value"](n)),e.attr(A,!0),r.attr(P,!1),a._updateARIA(n))}})),r=a.dateView.div,a._icon();try{e[0].setAttribute("type","text")}catch(u){e[0].type="text"}e.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":a.dateView._dateViewID}),a._reset(),a._template(),i=e.is("[disabled]"),i?a.enable(!1):a.readonly(e.is("[readonly]")),a._old=a._update(t.value||a.element.val()),a._oldText=e.val(),o.notify(a)},events:[m,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:z,depth:z,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,i=t._value;s.fn.setOptions.call(t,e),e=t.options,e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),i&&(t.element.val(o.toString(i,e.format,e.culture)),t._updateARIA(i))},_editable:function(e){var t=this,n=t._dateIcon.off(p),r=t.element.off(p),o=t._inputWrapper.off(p),a=e.readonly,s=e.disable;a||s?(o.addClass(s?C:w).removeClass(s?w:C),r.attr(y,s).attr(b,a).attr(O,s).attr(H,a)):(o.addClass(w).removeClass(C).on(S,t._toggleHover),r.removeAttr(y).removeAttr(b).attr(O,!1).attr(H,!1).on("keydown"+p,q(t._keydown,t)).on("blur"+p,q(t._blur,t)).on("focus"+p,function(){t._inputWrapper.addClass(x)}),n.on(g,q(t._click,t)).on(F,i))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(p),e._dateIcon.off(p),e._inputWrapper.off(p),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(M,e)},max:function(e){return this._option(E,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(x)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),o.support.touch||t[0]===d()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t.trigger(_),t.element.trigger(_))},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val();n.popup.visible()||e.keyCode!=u.ENTER||i===t._oldText?(n.move(e),t._updateARIA(n._current)):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span>').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=l(n,r.parseFormats,r.culture),n&&(r[e]=new W(+n),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,a=i.max,s=l(e,i.parseFormats,i.culture);return+s===+n._value?(t=o.toString(s,i.format,i.culture),t!==e&&n.element.val(null===s?e:t),s):(null!==s&&L(s,r)?s=R(s,r,a):I(s,r,a)||(s=null),n._value=s,n.dateView.value(s),n.element.val(s?o.toString(s,i.format,i.culture):e),n._updateARIA(s),s)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(h).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(h).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=c(this.options.ARIATemplate)},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),a.plugin(r)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});