prolificinteractive / material-calendarview

A Material design back port of Android's CalendarView
https://prolificinteractive.github.io/material-calendarview/
MIT License
5.92k stars 1.32k forks source link

Calendar header (Month and year name) shows wrong when use setMinimumDate, setMaximumDate #501

Open hasancse91 opened 7 years ago

hasancse91 commented 7 years ago

I want to show only February 2016 using this Library. My code is:

widget.state().edit() .setMinimumDate(CalendarDay.from(2016, 1, 1)) // 1st February, 2016 .setMaximumDate(CalendarDay.from(2016, 1, 29)) // 29th February, 2016 .commit();

Information of days and dates are fine. But on the Header section it always shows "January 2017" (current month, year). I think it's a bug. If not, please give me a suggestion to show any specific month of any year.

karishnu commented 7 years ago

Same problem here! Edit: materialCalendarView.setCurrentDate(dateEnd); fixed it temporarily

hasancse91 commented 7 years ago

I fixed this problem manually with a TextView instead of the library header.