Only show time in datepicker if format is HH/HH:mm/HH:mm:ss (#6525)

This commit is contained in:
Rasmus Kongshøj
2019-10-17 16:27:34 +02:00
committed by Sebastiaan Janssen
parent 6b4f7f9ec8
commit 2aede644f4

View File

@@ -53,6 +53,12 @@ function dateTimePickerController($scope, notificationsService, assetsService, a
dateFormat: dateFormat,
time_24hr: true
};
// Don't show calendar if date format has been set to only time
if ($scope.model.config.format === "HH:mm:ss" || $scope.model.config.format === "HH:mm" || $scope.model.config.format === "HH") {
$scope.datePickerConfig.enableTime = true;
$scope.datePickerConfig.noCalendar = true;
}
setDatePickerVal();