Skip to content

Commit 1c982fd

Browse files
committed
docs(input): add mention of ngMin and ngMax. Closes angular#11636
1 parent fe0af2c commit 1c982fd

File tree

1 file changed

+39
-10
lines changed

1 file changed

+39
-10
lines changed

src/ng/directive/input.js

+39-10
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,15 @@ 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). If you want this attribute to be data-bound use interpolation
142+
* (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Unlike `ngMin`, this will instruct native HTML5 date inputs
143+
* to restrict user input appropriately.
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). If you want this attribute to be data-bound use interpolation
146+
* (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Unlike `ngMax`, this will instruct native HTML5 date inputs
147+
* to restrict user input appropriately.
148+
* @param {date=} ngMin Sets the `min` validation constraint to the date value that the `ngMin` expression evaluates to.
149+
* @param {date=} ngMax Sets the `max` validation constraint to the date value that the `ngMax` expression evaluates to.
144150
* @param {string=} required Sets `required` validation error key if the value is not entered.
145151
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
146152
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -233,9 +239,15 @@ var inputType = {
233239
* @param {string} ngModel Assignable angular expression to data-bind to.
234240
* @param {string=} name Property name of the form under which the control is published.
235241
* @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).
242+
* valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). If you want this attribute to be data-bound use
243+
* interpolation (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`). Unlike `ngMin`, this will instruct
244+
* native HTML5 date inputs to restrict user input appropriately.
237245
* @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).
246+
* a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). If you want this attribute to be data-bound use
247+
* interpolation (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`). Unlike `ngMax`, this will instruct
248+
* native HTML5 date inputs to restrict user input appropriately.
249+
* @param {date=} ngMin Sets the `min` validation constraint to the date value that the `ngMin` expression evaluates to.
250+
* @param {date=} ngMax Sets the `max` validation constraint to the date value that the `ngMax` expression evaluates to.
239251
* @param {string=} required Sets `required` validation error key if the value is not entered.
240252
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
241253
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -329,9 +341,13 @@ var inputType = {
329341
* @param {string} ngModel Assignable angular expression to data-bind to.
330342
* @param {string=} name Property name of the form under which the control is published.
331343
* @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).
344+
* valid ISO time format (HH:mm:ss). If you want this attribute to be data-bound use interpolation
345+
* (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`).
333346
* @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+
* valid ISO time format (HH:mm:ss). If you want this attribute to be data-bound use interpolation
348+
* (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`).
349+
* @param {date=} ngMin Sets the `min` validation constraint to the date value that the `ngMin` expression evaluates to.
350+
* @param {date=} ngMax Sets the `max` validation constraint to the date value that the `ngMax` expression evaluates to.
335351
* @param {string=} required Sets `required` validation error key if the value is not entered.
336352
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
337353
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -424,9 +440,15 @@ var inputType = {
424440
* @param {string} ngModel Assignable angular expression to data-bind to.
425441
* @param {string=} name Property name of the form under which the control is published.
426442
* @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##).
443+
* valid ISO week format (yyyy-W##). If you want this attribute to be data-bound use interpolation
444+
* (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Unlike `ngMin`, this will instruct native HTML5 date inputs
445+
* to restrict user input appropriately.
428446
* @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##).
447+
* a valid ISO week format (yyyy-W##). If you want this attribute to be data-bound use interpolation
448+
* (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Unlike `ngMax`, this will instruct native HTML5 date inputs
449+
* to restrict user input appropriately.
450+
* @param {date=} ngMin Sets the `min` validation constraint to the date value that the `ngMin` expression evaluates to.
451+
* @param {date=} ngMax Sets the `max` validation constraint to the date value that the `ngMax` expression evaluates to.
430452
* @param {string=} required Sets `required` validation error key if the value is not entered.
431453
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
432454
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
@@ -521,9 +543,16 @@ var inputType = {
521543
* @param {string} ngModel Assignable angular expression to data-bind to.
522544
* @param {string=} name Property name of the form under which the control is published.
523545
* @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).
546+
* a valid ISO month format (yyyy-MM). If you want this attribute to be data-bound use interpolation
547+
* (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Unlike `ngMin`, this will instruct native HTML5 date inputs
548+
* to restrict user input appropriately.
525549
* @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).
550+
* be a valid ISO month format (yyyy-MM). If you want this attribute to be data-bound use interpolation
551+
* (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Unlike `ngMax`, this will instruct native HTML5 date inputs
552+
* to restrict user input appropriately.
553+
* @param {date=} ngMin Sets the `min` validation constraint to the date value that the `ngMin` expression evaluates to.
554+
* @param {date=} ngMax Sets the `max` validation constraint to the date value that the `ngMax` expression evaluates to.
555+
527556
* @param {string=} required Sets `required` validation error key if the value is not entered.
528557
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
529558
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of

0 commit comments

Comments
 (0)