public void addDaysLabelListener() {

        JLabel prevDay = null;
        int tempMonth = controller.getCurMonth();
        int tempYear = controller.getCurYear();

        if (!daysLabels.get(0).getText().equals("1")) {
            tempMonth = (tempMonth - 1) % 12;
            if (tempMonth == -1) {
                tempMonth = 11;
            }
        } else {
            if (controller.getCurMonth() == 0) {
                tempYear--;
            }
        }

        for (final JLabel jl : daysLabels) {
            if (prevDay != null) {
                if (Integer.parseInt(jl.getText()) < Integer.parseInt(prevDay.getText())) {
                    tempMonth = (tempMonth + 1) % 12;
                    if (tempMonth == 0) //changing from Dec to Jan
                    {
                        tempYear++;
                    }
                }
            }
            prevDay = jl;

            final int tempMonthCopy = tempMonth;
            final int tempYearCopy = tempYear;
            jl.addMouseListener(
                    new MouseAdapter() {
                /**
                 * Changes the current view to the day that was clicked on
                 */
                @Override
                public void mouseClicked(MouseEvent e) {
                    controller.getCurView().showView(tempYearCopy, tempMonthCopy, Integer.parseInt(jl.getText()));
                }

                /**
                 * Highlight the day that is under mouse cursor
                 */
                @Override
                public void mouseEntered(MouseEvent e) {
                    jl.setBackground(new Color(222, 222, 222));
                    jl.setCursor(new Cursor(Cursor.HAND_CURSOR));
                }

                /**
                 * Unhighlight the day when mouse is no longer hovering over it
                 */
                @Override
                public void mouseExited(MouseEvent e) {
                    jl.setBackground(Color.white);
                }
            });
        }
    }