-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
I have created datepickers based on the new Temporal api and I would like to use these types for handling min/max in my custom components.
Proposed solution
extends the types for min/max validator functions like this :
TValue extends number | string | Temporal.PlainDate | Temporal.PlainDateTime |... | null
Alternatives considered
passing manually min/max as inputs to my custom components and having custom validators.
minDate(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
minValue: Temporal.PlainDate | LogicFn<TValue, Temporal.PlainDate | undefined, TPathKind>,
) {
validate(path, () => ...)
}
maxDate(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
maxValue: Temporal.PlainDate | LogicFn<TValue, Temporal.PlainDate | undefined, TPathKind>,
) {
validate(path, () => ...))
}
Metadata
Metadata
Assignees
Type
Projects
Status