App.datetimepicker=function(e,t,a){var r={language:"zh-CN",format:"yyyy-mm-dd",minView:"month",todayBtn:true,autoclose:true,todayHighlight:true};r=$.extend(r,a||{});var n=$(e).datetimepicker(r);if(!t)return n;var i=$(t).datetimepicker(r);n.on("changeDate",function(e){i.datetimepicker("setStartDate",e.date)});i.on("changeDate",function(e){n.datetimepicker("setEndDate",e.date)});if($(e).val())i.datetimepicker("setStartDate",$(e).val());if($(t).val())n.datetimepicker("setEndDate",$(t).val());return[n,i]};App.daterangepicker=function(e,t){var a=false;var r={customArrowPrevSymbol:'<i class="fa fa-arrow-left"></i>',customArrowNextSymbol:'<i class="fa fa-arrow-right"></i>',autoClose:true,format:"YYYY-MM-DD",separator:" - ",singleDate:false,language:"cn",monthSelect:true,maxDays:30,yearSelect:true,time:{enabled:false}};r=$.extend(r,t||{});if(!r.time.enabled&&r.format.indexOf("H")!=-1)r.time.enabled=true;$(e).on("focus click touch",function(){$(this).select()});return $(e).dateRangePicker(r).bind("datepicker-closed",function(){$(e).focus();if(a)$(e).trigger("change")}).bind("datepicker-change",function(){a=true})};App.daterangepickerx=function(e,r,n,t){var a={getValue:function(){if($(r).val()&&$(n).val())return $(r).val()+" - "+$(n).val();return""},setValue:function(e,t,a){$(r).val(t);$(n).val(a)}};App.daterangepicker(e,$.extend(a,t||{}))};App.datepicker=function(e,t){if(!t)t={};t.singleDate=true;t.singleMonth=true;t.showShortcuts=false;t.showTopbar=false;return App.daterangepicker(e,t)};