Open shahzad1 opened 3 years ago
The latest versions of Material CalendarView library uses LocalDate instead of Calendar class from Java Util. You will need to add dependency of com.jakewharton.threetenabp:threetenabp:$version in ur build.gradle
I am facing same issue and I got solution after adding this library in the build.gradle
file.
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.1'
and I have implemented code as below :
materialCalendarView.setSelectedDate(CalendarDay.today());
I'm trying to select date using
CalendarDay calendarDay = CalendarDay.today(); calendarView.setSelectedDate(calendarDay);
But it shows this error
**error: cannot access LocalDate class file for org.threeten.bp.LocalDate not found**
I also triedCalendarDay calendarDay = CalendarDay.from(year, month, day); calendarView.setSelectedDate(calendarDay);
and this is how i'm getting Day, Month & Year
Calendar calendar = Calendar.getInstance(); int day = calendar.get(Calendar.DAY_OF_MONTH); int month = calendar.get(Calendar.MONTH) + 1; int year = calendar.get(Calendar.YEAR);
I'm currently using latest release
implementation 'com.github.prolificinteractive:material-calendarview:2.0.1'