Applandeo / Material-Calendar-View

Material Calendar View for Android
Apache License 2.0
975 stars 316 forks source link

DayClicklistener is not working #450

Closed rehmanjameel closed 1 year ago

rehmanjameel commented 1 year ago
calendarView.setOnDayClickListener(eventDay -> {
            Log.e("event", eventDay.getCalendar().toString());

            showDialog("Event details for " + eventDay);
            Date clickedDate = eventDay.getCalendar().getTime();

            if (dotDates.contains(clickedDate)) {
                Log.e("event", dateFormat.format(clickedDate));
                showDialog("Event details for " + dateFormat.format(clickedDate));
            } else {
                Log.e("event10", dateFormat.format(clickedDate));

                showDialog("No event on this date.");
            }
        });
    this click listener is not working even I am using the updated version of dependency 
    `implementation 'com.applandeo:material-calendar-view:1.9.0-rc03'`

and don't show the first log in logcat Log.e("event", eventDay.getCalendar().toString());

I am using this listener in onCreate method of Mainactivity.

Kindly resolve it.

day cick listener only working with (calendarView.setOnForwardPageChangeListener and calendarView.setOnPreviousPageChangeListener ) method but i need with only with setOnDayClickListener.

rehmanjameel commented 1 year ago

@josemoncada87 @sianis @mtrakal can any of you help me.

rehmanjameel commented 1 year ago

Sorry, It was my mistake. It's working now.