You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
We run into issues with the Clear button in the date picker popup, which cannot clear the date. So I did some digging in the datepicker popup.js code, and found a bug in the following code, where the null or undefined value (for dt) is not taken care of, causing the $scope.date variable to remain (therefore Clear button does not work for me):
// Inner change
$scope.dateSelection = function(dt) {
if (angular.isDefined(dt)) {
$scope.date = dt; // what if dt is null or undefined here? $scope.date is not reset then!
}
var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function
$element.val(date);
ngModel.$setViewValue(date);
if (closeOnDateSelection) {
$scope.isOpen = false;
$element[0].focus();
}
};
The text was updated successfully, but these errors were encountered:
rcholic
changed the title
Possible bug in the datepicker popup
Possible bug with the Clear button in the datepicker popup
May 18, 2016
Angular Version: 1.4.9
Bootstrap Version: 3.3.4
Angular UI Bootstrap: 1.3.2
Browser tested: Firefox and Chrome (latest)
We run into issues with the Clear button in the date picker popup, which cannot clear the date. So I did some digging in the datepicker popup.js code, and found a bug in the following code, where the
null
orundefined
value (fordt
) is not taken care of, causing the$scope.date
variable to remain (thereforeClear
button does not work for me):The text was updated successfully, but these errors were encountered: