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 was archived by the owner on May 29, 2019. It is now read-only.
We use uib-datepicker with popup where we allow the user the enter a date manually.
The dateformat ('d MMMM y') has a year with a single y so a single-digit year can also be entered as a year.
On load we set today's date with a four-digit year. When you change the year to have only 2 digits the datepicker renders with all null and nan values, see attached screenshot. This happens only on Internet Explorer (tested on 11). Chrome and FireFox do not have this issue.
We have modified these like below to fix the issue.
if (ngModelCtrl.$modelValue) {
var inputDate = new Date(ngModelCtrl.$viewValue),
isInputValid = !isNaN(inputDate);
if (isInputValid) {
this.activeDate = dateParser.fromTimezone(inputDate, ngModelOptions.timezone);
}
}