def METHOD_NAME():
    dt = dt_2002
    dt_min = dt_1664
    dt_max = datetime.datetime(1337, 1, 1, tzinfo=pytz.utc)
    w = DatetimePicker(value=dt, min=dt_min)
    with pytest.raises(TraitError):
        w.max = dt_max