def METHOD_NAME(self, event=None):
    # sanity checking of values
    if (
        self.minimum_datetime is not None
        and self.maximum_datetime is not None
        and self.minimum_datetime > self.maximum_datetime
    ):
        self.maximum_datetime = self.minimum_datetime
    if self.control is not None:
        if self.minimum_datetime is not None:
            self.control.setMinimumDateTime(
                QDateTime(self.minimum_datetime)
            )
        else:
            self.control.clearMinimumDateTime()