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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user