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.
if you set dateformat to 'dd.MM.yyyy' the 'new Date(viewValue)' (see bellow in the angular.IsString condition) parses the string like 'MM.dd.yyyy'
The TODO is not implemented yet
// TODO: reverse from dateFilter string to Date object
function parseDate(viewValue) {
viewValue = dateFilter(viewValue, dateFormat);
if (!viewValue) {
ngModel.$setValidity('date', true);
return null;
} else if (angular.isDate(viewValue)) {
ngModel.$setValidity('date', true);
return viewValue;
} else if (angular.isString(viewValue)) {
var date = new Date(viewValue);
if (isNaN(date)) {
ngModel.$setValidity('date', false);
return undefined;
} else {
ngModel.$setValidity('date', true);
return date;
}
} else {
ngModel.$setValidity('date', false);
return undefined;
}
}
The text was updated successfully, but these errors were encountered: