def update_editor ( self ):
        if self.value:
            date = self.control.GetValue()
            # FIXME: A Trait assignment should support fixing an invalid
            # date in the widget.
            if date.IsValid():
                # Important: set the day before setting the month, otherwise wx may fail
                # to set the month.
                date.SetYear(self.value.year)
                date.SetDay(self.value.day)
                # wx 2.8.8 has 0-indexed months.
                date.SetMonth(self.value.month - 1)
                self.control.SetValue(date)
                self.control.Refresh()
        return
#-- end SimpleEditor definition -----------------------------------------------


#------------------------------------------------------------------------------
#--  Custom Editor
#------------------------------------------------------------------------------
Updates the editor when the object trait changes externally to the
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/date_editor.py/SimpleEditor.update_editor