• Returns a validator function that checks if the control value is a date before the specified maximum date.

    Parameters

    • maxDate: DateOnly | Date

      The maximum date.

    Returns (control: AbstractControl) => null | ValidationErrors