Open vishalhalani opened 5 years ago
Hi, I had the same problem. I needed to highlight current day. Just use decorator without setCellClickInterceptor method. My code :
calendarView.decorators = arrayListOf() calendarView.decorators.add(CalendarCellDecorator { cellView, date -> with(cellView) { if (DateUtils.isToday(date.time)) { if (viewModel.isSelectedDayIsNotHighlighted(date)) { isHighlighted = true dayOfMonthTextView.setTextColor(ContextCompat.getColor(context!!, R.color.black)) } else { isHighlighted = false dayOfMonthTextView.setTextColor(ContextCompat.getColor(context!!, R.color.white)) } } } })
if I clicked on highlighted changed on selectable background else on highlighted
so now what solution for this anyone have an idea
Hey. don't use .withHighlightedDate() method. Just write own decorator and check if date need to highlight set cellview.isHighlighted = true and click will be working. see my comment above
Hello,
I have to show some highlated date cell . its highlated fine but even i want that cell click listener which i was not getting.
Any solution to handle highlated cell click.