muraee / Horizontal-Calendar

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

Wrong current date in fragment #134

Open muneebahmed97 opened 3 years ago

muneebahmed97 commented 3 years ago
yes, I'm using current version ### Expected Behavior / Goal > Calendar should work properly in fragments just like activities ### Steps to Reproduce the Problem (sample code if possible) XML: Kotlin: private lateinit var horizontalCalendar: HorizontalCalendar horizontalCalendar = HorizontalCalendar.Builder(rootView, R.id.my_calendar_view) .range(startDate, endDate) .datesNumberOnScreen(5) .configure() .formatTopText("MMM") .formatMiddleText("dd") .formatBottomText("EEE") .showTopText(true) .selectorColor(ResourcesCompat.getColor(resources, R.color.new_mustard_dark, null)) .showBottomText(true) .textColor(Color.LTGRAY, ResourcesCompat.getColor(resources, R.color.black_1, null)) .colorTextMiddle( Color.LTGRAY, ResourcesCompat.getColor(resources, R.color.black_1, null) ) .end() .defaultSelectedDate(Calendar.getInstance()) .addEvents(null) .build() I have tried horizontalCalendar.goToday() too but still there's an issues in fragments. ### Specifications > - Android Version: 10,11 > - Horizontal-Calendar Version: 1.3.4