diff --git a/public/components/property/addCar/addCar.js b/public/components/property/addCar/addCar.js index 5c7c0a02d..58fcba305 100644 --- a/public/components/property/addCar/addCar.js +++ b/public/components/property/addCar/addCar.js @@ -140,7 +140,7 @@ let _carNumType = $that.addCarInfo.carNumType; if(_carNumType == 'S'){ $that.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime()); - $that.addCarInfo.endTime = '2037-01-01 00:00:00'; + $that.addCarInfo.endTime = '2037-01-01'; } if(vc.component.addCarValidate()){ @@ -150,11 +150,12 @@ } }, _initDateInfo: function () { - vc.component.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime()); + vc.component.addCarInfo.startTime = vc.dateFormat(new Date().getTime()); $('.startTime').datetimepicker({ + minView: "month", language: 'zh-CN', fontAwesome: 'fa', - format: 'yyyy-mm-dd hh:ii:ss', + format: 'yyyy-mm-dd', initTime: true, initialDate: new Date(), autoClose: 1, @@ -167,9 +168,10 @@ vc.component.addCarInfo.startTime = value; }); $('.endTime').datetimepicker({ + minView: "month", language: 'zh-CN', fontAwesome: 'fa', - format: 'yyyy-mm-dd hh:ii:ss', + format: 'yyyy-mm-dd', initTime: true, initialDate: new Date(), autoClose: 1, diff --git a/public/components/property/editCar/editCar.js b/public/components/property/editCar/editCar.js index cf5b45f85..74f231a05 100644 --- a/public/components/property/editCar/editCar.js +++ b/public/components/property/editCar/editCar.js @@ -56,6 +56,12 @@ _initEvent: function () { vc.on('editCar', 'openEditCar', function (_carInfo) { vc.copyObject(_carInfo, $that.editCarInfo); + if (_carInfo.startTime.indexOf(":") > -1) { + $that.editCarInfo.startTime = $that.editCarInfo.startTime.substring(0,10); + } + if (_carInfo.endTime.indexOf(":") > -1) { + $that.editCarInfo.endTime = $that.editCarInfo.endTime.substring(0,10); + } $('#editCarModal').modal('show'); vc.component._initEditCarDateInfo(); }); @@ -161,11 +167,12 @@ }); }, _initEditCarDateInfo: function () { - vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime()); + //vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime()); $('.editCarStartTime').datetimepicker({ + minView: "month", language: 'zh-CN', fontAwesome: 'fa', - format: 'yyyy-mm-dd hh:ii:ss', + format: 'yyyy-mm-dd', initTime: true, initialDate: new Date(), autoClose: 1, @@ -178,9 +185,10 @@ vc.component.editCarInfo.startTime = value; }); $('.editCarEndTime').datetimepicker({ + minView: "month", language: 'zh-CN', fontAwesome: 'fa', - format: 'yyyy-mm-dd hh:ii:ss', + format: 'yyyy-mm-dd', initTime: true, initialDate: new Date(), autoClose: 1,