def selected_list_changed(self, evt=None):
        """ Update the date colors of the days in the widgets. """
        for cal in self.cal_ctrls:
            cur_month = cal.GetDate().GetMonth() + 1
            cur_year = cal.GetDate().GetYear()
            selected_days = self.selected_days

            # When multi_select is False wrap in a list to pass the for-loop.
            if self.multi_select == False:
                if selected_days == None:
                    selected_days = []
                else:
                    selected_days = [selected_days]

            # Reset all the days to the correct colors.
            for day in range(1,32):
                try:
                    paint_day = datetime.date(cur_year, cur_month, day)
                    if not self.allow_future and paint_day > self.today:
                        attr = wx.calendar.CalendarDateAttr(colText=UNAVAILABLE_FG)
                        cal.SetAttr(day, attr)
                    elif paint_day in selected_days:
                        attr = wx.calendar.CalendarDateAttr(colText=SELECTED_FG)
                        cal.SetAttr(day, attr)
                    else:
                        cal.ResetAttr(day)
                except __HOLE__:
                    # Blindly creating Date objects sometimes produces invalid.
                    pass

            cal.highlight_changed()
        return
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/date_editor.py/MultiCalendarCtrl.selected_list_changed