• Overview
@angular/forms/signals

Binds a validator to the given path that requires the value to be less than or equal to the given maxDate. This function can only be called on date paths. In addition to binding a validator, this function adds MAX property to the field.

API

function maxDate<
  TValue extends Date | null,
  TPathKind extends PathKind = PathKind.Root,
>(
  path: SchemaPath<TValue, 1, TPathKind>,
  maxDateValue: Date | LogicFn<TValue, Date | undefined, TPathKind>,
  config?: BaseValidatorConfig<TValue, TPathKind> | undefined,
): void;
@parampathSchemaPath<TValue, 1, TPathKind>

Path of the field to validate

@parammaxDateValueDate | LogicFn<TValue, Date | undefined, TPathKind>
@paramconfigBaseValidatorConfig<TValue, TPathKind> | undefined

Optional, allows providing any of the following options:

@returnsvoid
Jump to details