File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ import { ViewController } from '../../navigation/view-controller';
51
51
'<template ngSwitchDefault>' +
52
52
'<div class="alert-input-group">' +
53
53
'<div *ngFor="let i of d.inputs" class="alert-input-wrapper">' +
54
- '<input [placeholder]="i.placeholder" [(ngModel)]="i.value" [type]="i.type" class="alert-input">' +
54
+ '<input [placeholder]="i.placeholder" [(ngModel)]="i.value" [type]="i.type" [min]="i.min" [max]="i.max" class="alert-input">' +
55
55
'</div>' +
56
56
'</div>' +
57
57
'</template>' +
@@ -157,6 +157,8 @@ export class AlertCmp {
157
157
disabled : ! ! input . disabled ,
158
158
id : isPresent ( input . id ) ? input . id : `alert-input-${ this . id } -${ index } ` ,
159
159
handler : isPresent ( input . handler ) ? input . handler : null ,
160
+ min : isPresent ( input . min ) ? input . min : null ,
161
+ max : isPresent ( input . max ) ? input . max : null
160
162
} ;
161
163
} ) ;
162
164
Original file line number Diff line number Diff line change @@ -19,4 +19,6 @@ export interface AlertInputOptions {
19
19
checked ?: boolean ;
20
20
disabled ?: boolean ;
21
21
id ?: string ;
22
+ min ?: string ;
23
+ max ?: string ;
22
24
}
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ export class Alert extends ViewController {
244
244
* | label | `string` | The input's label (only for radio/checkbox inputs) |
245
245
* | checked | `boolean` | Whether or not the input is checked. |
246
246
* | id | `string` | The input's id. |
247
+ * | min | `string` | The input's minimum authorized value (only for date inputs) |
248
+ * | max | `string` | The input's maximum authorized value (only for date inputs) |
247
249
*
248
250
* Button options
249
251
*
Original file line number Diff line number Diff line change @@ -109,6 +109,18 @@ export class E2EPage {
109
109
type : 'url' ,
110
110
placeholder : 'Favorite site ever'
111
111
} ) ;
112
+ // input date with min & max
113
+ alert . addInput ( {
114
+ name : 'name4' ,
115
+ type : 'date' ,
116
+ min : '2017-03-01' ,
117
+ max : '2018-01-12'
118
+ } ) ;
119
+ // input date without min nor max
120
+ alert . addInput ( {
121
+ name : 'name5' ,
122
+ type : 'date'
123
+ } ) ;
112
124
alert . addButton ( {
113
125
text : 'Cancel' ,
114
126
handler : ( data : any ) => {
You can’t perform that action at this time.
0 commit comments