roboto-calendar-view icon indicating copy to clipboard operation
roboto-calendar-view copied to clipboard

Calendar year is not displaying

Open Yogesh2408 opened this issue 8 years ago • 1 comments

calendar

Calendar year is not displaying what should i do ?

Thank You Help Appreciated.

Yogesh2408 avatar Feb 28 '17 14:02 Yogesh2408

Try to change the method inside the RobotoCalendarView.java to this

private void setUpMonthLayout() {
        String dateText = new DateFormatSymbols(Locale.getDefault()).getMonths()[currentCalendar.get(Calendar.MONTH)];
        dateText = dateText.substring(0, 1).toUpperCase() + dateText.subSequence(1, dateText.length());
        Calendar calendar = Calendar.getInstance();
        /*if (currentCalendar.get(Calendar.YEAR) == calendar.get(Calendar.YEAR)) {
            dateTitle.setText(dateText);
        } else {
            dateTitle.setText(String.format("%s %s", dateText, currentCalendar.get(Calendar.YEAR)));
        }*/
        dateTitle.setText(String.format("%s, %s", dateText, currentCalendar.get(Calendar.YEAR)));
    }

Ric17101 avatar Feb 28 '17 14:02 Ric17101