def _post_setattr_maximum(self, old, new):
        """ Post setattr the maximum datetime.

        If the new maximum is less than the current value or the
        minimum, those values are adjusted down.

        """
        if new < self.minimum:
            self.minimum = new
        if new < self.datetime:
            self.datetime = new

    #--------------------------------------------------------------------------
    # Post Validate Handlers
    #--------------------------------------------------------------------------
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/widgets/bounded_datetime.py/BoundedDatetime._post_setattr_maximum/original