Fixes: U4-7624 Datepicker Sql server error

Since we are not saving the formatted value, don't try parsing the date with formatting config.
Added in explicit parsing format compatible with the one used when saving the value, just to ensure parsing is done the same way.
This commit is contained in:
Claus
2016-01-04 11:56:59 +01:00
parent deb1f2f343
commit 3a4f0f4c11

View File

@@ -96,11 +96,11 @@ function dateTimePickerController($scope, notificationsService, assetsService, a
});
if ($scope.hasDatetimePickerValue) {
//assign value to plugin/picker
var dateVal = $scope.model.value ? moment($scope.model.value, $scope.model.config.format) : moment();
var dateVal = $scope.model.value ? moment($scope.model.value, "YYYY-MM-DD HH:mm:ss") : moment();
element.datetimepicker("setValue", dateVal);
$scope.datetimePickerValue = moment($scope.model.value).format($scope.model.config.format);
$scope.datetimePickerValue = dateVal.format($scope.model.config.format);
}
element.find("input").bind("blur", function() {