MCPcopy Create free account
hub / github.com/angular/angular / formatDateForMinMax

Function formatDateForMinMax

packages/forms/signals/src/directive/native.ts:204–213  ·  view source on GitHub ↗
(name: string, value: unknown, type: string)

Source from the content-addressed store, hash-verified

202}
203
204export function formatDateForMinMax(name: string, value: unknown, type: string): unknown {
205 if (
206 value instanceof Date &&
207 (name === 'min' || name === 'max') &&
208 (type === 'date' || type === 'month')
209 ) {
210 return formatDateForInput(value, type);
211 }
212 return value;
213}

Callers 3

nativeControlCreateFunction · 0.90
cvaControlCreateFunction · 0.90
customControlCreateFunction · 0.90

Calls 1

formatDateForInputFunction · 0.85

Tested by

no test coverage detected