muraee / Horizontal-Calendar

A material horizontal calendar view for Android based on RecyclerView
Apache License 2.0
1.21k stars 230 forks source link

selectDate(Calendar date,false) does not scroll when date is set to 01 to 09 #112

Open ZubayerDeveloper opened 5 years ago

ZubayerDeveloper commented 5 years ago

Expected Behavior / Goal

should scroll to any given date

Actual Behavior

scrolls when date is between 10 to 31. does not scroll when date is 01 to 09

Steps to Reproduce the Problem (sample code if possible)

Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DAY_OF_MONTH, 02); horizontalCalendar.selectDate(calendar, false);

Specifications

  • Android Version: 6.0
  • Horizontal-Calendar Version: 1.3.4
safullin commented 4 years ago

use 1-9

WalidDev1 commented 3 years ago

this is what I add when I wan set the new selected date

Calendar clickedDayCalendar = eventDay.getCalendar();

if((Calendar.getInstance()).get(Calendar.WEEK_OF_MONTH) != clickedDayCalendar.get(Calendar.WEEK_OF_MONTH)){ clickedDayCalendar.set(clickedDayCalendar.get(Calendar.YEAR),clickedDayCalendar.get(Calendar.MONTH),clickedDayCalendar.get(Calendar.DAY_OF_MONTH)+1); }