savvisingh / DateRangePicker

Date Range Picker is a Calendar Picker View to show a Customized Date Range Picker with improved UI and functionality to add subtitles to the dates
Apache License 2.0
784 stars 160 forks source link

Calender view only visible ca 10 days ahead and onward #37

Closed vincenthauser closed 6 years ago

vincenthauser commented 6 years ago

Issue:

I am initing with 2018-08-01 but calendar shows from 2018-08-12, unable to scroll back in time to 2018-08-01.

Locale and time are correct and the issue suddenly shows up on all devices .

Setting init with calendar.init(today - 12 days, 200 in future, TimeZone.getDefault()) we can overcome this but then the cells before today are selectable (which they weren't before).

I am completely stumped since I have not changed our code lately. Any help would be appreciated.

I am initializing the calender so: (today = 2018-08-01)

(somewhat pseudo)

calendar.init(min = today, max= 200 days in future, TimeZone.getDefault()) .inMode(CalendarPickerView.SelectionMode.RANGE) .withSelectedDate(today) Calendar shows like so:

image

vincenthauser commented 6 years ago

I had the calendar view inside a ConstraintLayout with height=0dp. Setting this to match_parent solved this issue, with the list items coming into correct position.

Sorry for bother :)