def _weekday_clicked(self, evt):
        """ A day on the weekday bar has been clicked.  Select all days. """
        evt.Skip()
        weekday = evt.GetWeekDay()
        cal = evt.GetEventObject()
        month = cal.GetDate().GetMonth()+1
        year = cal.GetDate().GetYear()

        days = []
        # Messy math to compute the dates of each weekday in the month.
        # Python uses Monday=0, while wx uses Sunday=0.
        month_start_weekday = (datetime.date(year, month, 1).weekday()+1) %7
        weekday_offset = (weekday - month_start_weekday) % 7
        for day in range(weekday_offset, 31, 7):
            try:
                day = datetime.date(year, month, day+1)
                if self.allow_future or day <= self.today:
                    days.append(day)
            except __HOLE__:
                pass
        self.add_days_to_selection(days)

        self.selected_list_changed()
        return
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/date_editor.py/MultiCalendarCtrl._weekday_clicked