Horizontal-Calendar icon indicating copy to clipboard operation
Horizontal-Calendar copied to clipboard

Wrong current date in fragment

Open muneebahmed97 opened this issue 4 years ago • 0 comments

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: <devs.mulham.horizontalcalendar.HorizontalCalendarView android:id="@+id/my_calendar_view" android:layout_width="match_parent" android:layout_height="wrap_content" />

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

muneebahmed97 avatar Feb 12 '21 11:02 muneebahmed97