florent37 / SingleDateAndTimePicker

You can now select a date and a time with only one widget !
Apache License 2.0
1.02k stars 333 forks source link

Missed the same day in the next year #290

Open Ke4nuReeves opened 4 years ago

Ke4nuReeves commented 4 years ago

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 commented 4 years ago

setMinDate overrides maxYear...

Akhunzaada commented 3 years ago

@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.