/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2018 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global','sap/ui/core/Control','./library','./DatePicker','./DateTimePicker','./TimePicker','sap/ui/model/type/Date','sap/ui/model/type/Time','sap/ui/model/type/DateTime','sap/ui/model/odata/type/ODataType','sap/ui/core/library','sap/ui/Device',"./DateTimeInputRenderer"],function(q,C,l,D,a,T,b,c,d,O,e,f,g){"use strict";var h=l.DateTimeInputType;var j=e.TextDirection;var k=e.TextAlign;var V=e.ValueState;var m=C.extend("sap.m.DateTimeInput",{metadata:{library:"sap.m",designtime:"sap/m/designtime/DateTimeInput.designtime",properties:{value:{type:"string",group:"Data",defaultValue:null,bindable:"bindable"},width:{type:"sap.ui.core.CSSSize",group:"Dimension",defaultValue:"100%"},enabled:{type:"boolean",group:"Behavior",defaultValue:true},editable:{type:"boolean",group:"Behavior",defaultValue:true},valueState:{type:"sap.ui.core.ValueState",group:"Appearance",defaultValue:V.None},valueStateText:{type:"string",group:"Misc",defaultValue:null},showValueStateMessage:{type:"boolean",group:"Misc",defaultValue:true},name:{type:"string",group:"Misc",defaultValue:null},placeholder:{type:"string",group:"Misc",defaultValue:null},textAlign:{type:"sap.ui.core.TextAlign",group:"Appearance",defaultValue:k.Initial},textDirection:{type:"sap.ui.core.TextDirection",group:"Appearance",defaultValue:j.Inherit},type:{type:"sap.m.DateTimeInputType",group:"Data",defaultValue:h.Date},displayFormat:{type:"string",group:"Appearance",defaultValue:null},valueFormat:{type:"string",group:"Data",defaultValue:null},dateValue:{type:"object",group:"Data",defaultValue:null}},aggregations:{_picker:{type:"sap.ui.core.Control",multiple:false,visibility:"hidden"}},associations:{ariaLabelledBy:{type:"sap.ui.core.Control",multiple:true,singularName:"ariaLabelledBy"}},events:{change:{parameters:{value:{type:"string"},dateValue:{type:"object"},valid:{type:"boolean"}}}}}});!(function(P,$,i){var r=l.getLocaleData();q.extend(P,{_types:{Date:{valueFormat:r.getDatePattern("short"),displayFormat:r.getDatePattern("medium")},Time:{valueFormat:r.getTimePattern("short"),displayFormat:r.getTimePattern("short")},DateTime:{valueFormat:r.getDateTimePattern("short"),displayFormat:r.getDateTimePattern("short")}}});["Time","Date"].forEach(function(t,s){["valueFormat","displayFormat"].forEach(function(F){var u=P._types;u.DateTime[F]=u.DateTime[F].replace("{"+s+"}",u[t][F]);});});}(m.prototype,q,f));m.prototype.init=function(){this.setType(h.Date);};m.prototype.onBeforeRendering=function(){o.call(this);};m.prototype.getFocusDomRef=function(){var P=_.call(this);return P.getFocusDomRef();};m.prototype.getIdForLabel=function(){var P=_.call(this);return P.getIdForLabel();};function n(t){var P;switch(t){case h.DateTime:P=new a(this.getId()+"-Picker");break;case h.Time:P=new T(this.getId()+"-Picker",{localeId:sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale().toString()});break;default:P=new D(this.getId()+"-Picker");break;}P.setDisplayFormat(this.getDisplayFormat()||this._types[t].displayFormat);P.setValueFormat(this.getValueFormat()||this._types[t].valueFormat);if(this.getDateValue()){P.setDateValue(this.getDateValue());}P.setEnabled(this.getEnabled());P.setEditable(this.getEditable());P.setValueState(this.getValueState());P.setValueStateText(this.getValueStateText());P.setShowValueStateMessage(this.getShowValueStateMessage());P.setName(this.getName());P.setPlaceholder(this.getPlaceholder());P.setTextAlign(this.getTextAlign());P.setTextDirection(this.getTextDirection());P.setWidth("100%");P.attachChange(p,this);var A=this.getAriaLabelledBy();for(var i=0;i