Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 966e01c

Browse files
twhitbeckNarretz
authored andcommitted
docs(input): mention ngMin and ngMax for all date input types
Closes #11636 Closes #12244
1 parent 67afd9d commit 966e01c

File tree

1 file changed

+59
-18
lines changed

1 file changed

+59
-18
lines changed

src/ng/directive/input.js

+59-18
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,17 @@ var inputType = {
138138
* @param {string} ngModel Assignable angular expression to data-bind to.
139139
* @param {string=} name Property name of the form under which the control is published.
140140
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
141-
* valid ISO date string (yyyy-MM-dd).
141+
* valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
142+
* (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Note that `min` will also add native HTML5
143+
* constraint validation.
142144
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be
143-
* a valid ISO date string (yyyy-MM-dd).
145+
* a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
146+
* (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Note that `max` will also add native HTML5
147+
* constraint validation.
148+
* @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string
149+
* the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
150+
* @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string
151+
* the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
144152
* @param {string=} required Sets `required` validation error key if the value is not entered.
145153
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
146154
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -232,10 +240,18 @@ var inputType = {
232240
*
233241
* @param {string} ngModel Assignable angular expression to data-bind to.
234242
* @param {string=} name Property name of the form under which the control is published.
235-
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
236-
* valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).
237-
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be
238-
* a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).
243+
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
244+
* This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
245+
* inside this attribute (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
246+
* Note that `min` will also add native HTML5 constraint validation.
247+
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
248+
* This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
249+
* inside this attribute (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
250+
* Note that `max` will also add native HTML5 constraint validation.
251+
* @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string
252+
* the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
253+
* @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string
254+
* the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
239255
* @param {string=} required Sets `required` validation error key if the value is not entered.
240256
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
241257
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -328,10 +344,18 @@ var inputType = {
328344
*
329345
* @param {string} ngModel Assignable angular expression to data-bind to.
330346
* @param {string=} name Property name of the form under which the control is published.
331-
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
332-
* valid ISO time format (HH:mm:ss).
333-
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be a
334-
* valid ISO time format (HH:mm:ss).
347+
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
348+
* This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
349+
* attribute (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`). Note that `min` will also add
350+
* native HTML5 constraint validation.
351+
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
352+
* This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
353+
* attribute (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`). Note that `max` will also add
354+
* native HTML5 constraint validation.
355+
* @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the
356+
* `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
357+
* @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the
358+
* `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
335359
* @param {string=} required Sets `required` validation error key if the value is not entered.
336360
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
337361
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -423,10 +447,18 @@ var inputType = {
423447
*
424448
* @param {string} ngModel Assignable angular expression to data-bind to.
425449
* @param {string=} name Property name of the form under which the control is published.
426-
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
427-
* valid ISO week format (yyyy-W##).
428-
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be
429-
* a valid ISO week format (yyyy-W##).
450+
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
451+
* This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
452+
* attribute (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Note that `min` will also add
453+
* native HTML5 constraint validation.
454+
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
455+
* This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
456+
* attribute (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Note that `max` will also add
457+
* native HTML5 constraint validation.
458+
* @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
459+
* the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
460+
* @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
461+
* the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
430462
* @param {string=} required Sets `required` validation error key if the value is not entered.
431463
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
432464
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -520,10 +552,19 @@ var inputType = {
520552
*
521553
* @param {string} ngModel Assignable angular expression to data-bind to.
522554
* @param {string=} name Property name of the form under which the control is published.
523-
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be
524-
* a valid ISO month format (yyyy-MM).
525-
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must
526-
* be a valid ISO month format (yyyy-MM).
555+
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
556+
* This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
557+
* attribute (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Note that `min` will also add
558+
* native HTML5 constraint validation.
559+
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
560+
* This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
561+
* attribute (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Note that `max` will also add
562+
* native HTML5 constraint validation.
563+
* @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
564+
* the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
565+
* @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
566+
* the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
567+
527568
* @param {string=} required Sets `required` validation error key if the value is not entered.
528569
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
529570
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of

0 commit comments

Comments
 (0)