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.
ng-model as numeric does not work properly when using datepicker-popup. By looking at this line from the source code, I would say that the check for numeric value should be done before and not after, i.e.:
$scope.date = dateParser.fromTimezone(value, timezone);
if (angular.isNumber($scope.date)) {
$scope.date = new Date($scope.date);
}
Should be instead:
if (angular.isNumber(value)) {
value = new Date(value);
}
$scope.date = dateParser.fromTimezone(value, timezone);
Because dateParser.fromTimezone expects a Date and not a Number, the error TypeError: date.getTimezoneOffset is not a function is thrown.
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.5
UIBS: 1.3.2
Bootstrap: 3.3.5
The text was updated successfully, but these errors were encountered:
Bug description:
ng-model
as numeric does not work properly when usingdatepicker-popup
. By looking at this line from the source code, I would say that the check for numeric value should be done before and not after, i.e.:Should be instead:
Because
dateParser.fromTimezone
expects aDate
and not aNumber
, the errorTypeError: date.getTimezoneOffset is not a function
is thrown.Version of Angular, UIBS, and Bootstrap
Angular: 1.5.5
UIBS: 1.3.2
Bootstrap: 3.3.5
The text was updated successfully, but these errors were encountered: