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
Hello, at first I have to say that we have been using your datepicker for a while and we appreciate the tool very much.
Description
Recently we found one special case where no dates are displayed in the datepicker container.
Having min/max date set in datepicker element where max is one day after min, date range is equal exactly 864e5 ms.
In this case code this.value = toFormattedDateString(new Date(newValue)); is never reached.
Additionally if datepicker value is not valid value (for example it is null) then this.value is set to be today's date by default.
In result we can have this.value from outside min-max range. Then, inside getMultiCalendars helper function we have incorrect value of selectedDate and if (lastDayOfMonthTime < minTime || +firstDayOfMonth > maxTime) { condition is true, because of that no dates are displayed.
Expected outcome
Dates should be displayed in calendar container, honoring min-max range, date from min-max range should be focused.
Actual outcome
Calendar container is empty.
Steps to reproduce
Have datepicker where this.value is null, min and max are dates one after another from month other than current month
(example value: null, today: 2020-10-16, min: 2020-09-02, max: 20202-09-03)
Browsers Affected
Chrome/ Opera
Firefox
Safari 10+
Safari 9
Safari 8
Safari 7
Edge 12+
IE 11
Summary
Suggested solution would be to change > to >= in if (getDateRange(minTime, maxTime) > 864e5) {check.
The text was updated successfully, but these errors were encountered:
Hello, at first I have to say that we have been using your datepicker for a while and we appreciate the tool very much.
Description
Recently we found one special case where no dates are displayed in the datepicker container.
Having min/max date set in datepicker element where max is one day after min, date range is equal exactly 864e5 ms.
In this case code
this.value = toFormattedDateString(new Date(newValue));
is never reached.Additionally if datepicker value is not valid value (for example it is
null
) then this.value is set to be today's date by default.In result we can have this.value from outside min-max range. Then, inside getMultiCalendars helper function we have incorrect value of selectedDate and
if (lastDayOfMonthTime < minTime || +firstDayOfMonth > maxTime) {
condition is true, because of that no dates are displayed.Expected outcome
Dates should be displayed in calendar container, honoring min-max range, date from min-max range should be focused.
Actual outcome
Calendar container is empty.
Steps to reproduce
(example value: null, today: 2020-10-16, min: 2020-09-02, max: 20202-09-03)
Browsers Affected
Summary
Suggested solution would be to change > to >= in
if (getDateRange(minTime, maxTime) > 864e5) {
check.The text was updated successfully, but these errors were encountered: