From aa1aceabc3c9160e4fd4a00563f7c3395dae738a Mon Sep 17 00:00:00 2001 From: Uday Srinath Date: Thu, 10 Aug 2017 13:36:33 -0700 Subject: [PATCH] Adding a helper to enable jump to today for consumers --- .../materialcalendarview/view/CalendarView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/materialcalendarview/src/main/java/io/blackbox_vision/materialcalendarview/view/CalendarView.java b/materialcalendarview/src/main/java/io/blackbox_vision/materialcalendarview/view/CalendarView.java index 64e8c32..ea95faf 100644 --- a/materialcalendarview/src/main/java/io/blackbox_vision/materialcalendarview/view/CalendarView.java +++ b/materialcalendarview/src/main/java/io/blackbox_vision/materialcalendarview/view/CalendarView.java @@ -354,6 +354,11 @@ public void onTitleClick() { } } + public void onGotoTodayClick(@NonNull View v) { + currentMonthIndex = 0; + updateCalendarOnTouch(); + } + public void onNextButtonClick(@NonNull View v) { currentMonthIndex++; updateCalendarOnTouch();