SingleDateAndTimePicker icon indicating copy to clipboard operation
SingleDateAndTimePicker copied to clipboard

Missed the same day in the next year

Open Ke4nuReeves opened this issue 4 years ago • 2 comments

I tried to pick the same day in the next year, and it's missed. For example, today is 6.08.2020, but, when I try to pick 6.08.2021 its absent.

Ke4nuReeves avatar Aug 06 '20 07:08 Ke4nuReeves

setMinDate overrides maxYear...

Ke4nuReeves avatar Aug 06 '20 08:08 Ke4nuReeves

@Ke4nuReeves The library currently supports date ranges of ±1 year only in both directions from the current date. In your case current date was 6.08.2020 and +1 year in future ended on day 5.08.21 hence the missing same day of next year.

Also, since the picker is circular, after the last day of next year, i.e. 5.08.21 you will see the next day as 8.08.19.

Solution: Use a separate Year picker available both from Builder class and XML.

Akhunzaada avatar Nov 06 '20 16:11 Akhunzaada