question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setOnDayClickListener is not executing

See original GitHub issue

setOnDayClickListener is not executing in version 1.3.2 and I am not using app:datePicker=“true” in xml. What is the problem?

my xml code looks like below:

**<com.applandeo.materialcalendarview.CalendarView
        android:id="@+id/calendarview_picker"
        android:layout_width="match_parent"
        android:layout_height="380dp"
        app:headerColor="@color/lightBlue"
        app:type="one_day_picker"
        app:datePicker="false"
        android:divider="@android:color/transparent"
        app:selectionColor="@color/colorAccent"
        app:todayLabelColor="@color/colorPrimaryDark" />**

Note: I am using this in Dialog. When i debug my app and click on date setOnDayClickListener is not executing. Please help. My code is below:

final CalendarView calendarview_picker = (CalendarView) dialog.findViewById(R.id.calendarview_picker);
            calendarview_picker.setOnDayClickListener(new OnDayClickListener() {
                public Date start_date,end_date;
                @Override
                public void onDayClick(EventDay eventDay) {
                    int size = calendarview_picker.getSelectedDates().size();
                    start_date = eventDay.getCalendar().getTime();
                }
            });

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ZakiResoluteSolutionscommented, Dec 20, 2017

simulator screen shot nov 30 2017 7 10 46 pm

See this image, I need two date to be select. Hope you understand what i want. Please help me on this. How can i achieve this @kormateusz @mateuszSawa

0reactions
ZakiResoluteSolutionscommented, Dec 20, 2017

How you change the background color when date is selected without any event? Please help me on this? I want click event of date in range_picker. @kormateusz @mateuszSawa

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - setOnDayClickListener is not executing for calendar ...
setOnDayClickListener is not working for calendar app calendarView=(CalendarView)findViewById(R.id.calendarView); calendarView.
Read more >
Android Custom Calendar with events | by Patel prashant
Contains no ads or unnecessary permissions. It is fully open-source, ... setOnDayClickListener(new OnDayClickListener() { @Override
Read more >
Applandeo - Bountysource
setOnDayClickListener { onDateSelected(it.time) } ... Strangely Calendar's PreviousPageChangeListener is not working while ForwardPageChangeListener is. $ 0.
Read more >
Diff - platform/frameworks/base - Google Git
+ * time the application is started. If multiple processes are currently running + * for this instrumentation, all of those processes will...
Read more >
CalendarView.setOnDayClickListener - Java - Tabnine
calendarView.setMaximumDate(max); calendarView.setOnDayClickListener(eventDay -> Toast.makeText(getApplicationContext(), eventDay.getCalendar().getTime().
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found