heysupratim / material-daterange-picker

A material Date Range Picker based on wdullaers MaterialDateTimePicker
Apache License 2.0
1.33k stars 266 forks source link

Scroll to Correct Month on Tab Change #23

Closed oliviadodge closed 8 years ago

oliviadodge commented 8 years ago

Hi, for the date range picker I noticed the scrolling behavior is faulty when you change tabs if you are not already at the position of the selected day. It will scroll to the month before the day you selected.

heysupratim commented 8 years ago

hey @oliviadodge - can you check this issue in the latest version 1.6 i had fixed it in that version i remember

oliviadodge commented 8 years ago

hi @borax12 - so sorry I should have been more clear in my description! I'll list the steps to reproduce the bug.

  1. open the date picker and select a start date for sometime in the future (March 15 for example)
  2. scroll to another month on the day picker view, but do not select another day (August for example).
  3. click on the end date tab.
  4. click back on the start date tab. This should cause a scroll to the month of March since the selected day is still March 15, but for me it scrolls to April (and sometimes July!).
  5. If you click back on the end date tab and then the start date tab, it should scroll to the correct month.

It's not that big of a deal since you can get to the correct month by clicking back and forth on the tabs, but I just thought I'd mention it because I thought it was strange. I've gotten the same result on Android 4.4.2 and Android 6.0 emulator.

heysupratim commented 8 years ago

The PR you pushed does fix that . Thanks for the contribution. Keep looking around and adding stuff that you feel is relevant . I did the code review and it is working fine now