From fa93dffdb4f350e8db8acc7f06b06761974eea8e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 17 Jul 2020 10:46:07 -0400 Subject: [PATCH] feat(input): accept datetime-local, month, and week type values (#21758) resolves #21757 --- core/api.txt | 2 +- core/src/components/input/readme.md | 2 +- core/src/interface.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/api.txt b/core/api.txt index 01fc0bce71..9601ddbd7a 100644 --- a/core/api.txt +++ b/core/api.txt @@ -475,7 +475,7 @@ ion-input,prop,required,boolean,false,false,false ion-input,prop,size,number | undefined,undefined,false,false ion-input,prop,spellcheck,boolean,false,false,false ion-input,prop,step,string | undefined,undefined,false,false -ion-input,prop,type,"date" | "email" | "number" | "password" | "search" | "tel" | "text" | "time" | "url",'text',false,false +ion-input,prop,type,"date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week",'text',false,false ion-input,prop,value,null | number | string | undefined,'',false,false ion-input,method,getInputElement,getInputElement() => Promise ion-input,method,setFocus,setFocus() => Promise diff --git a/core/src/components/input/readme.md b/core/src/components/input/readme.md index ff5254d592..3be1dc4864 100644 --- a/core/src/components/input/readme.md +++ b/core/src/components/input/readme.md @@ -317,7 +317,7 @@ export class InputExample { | `size` | `size` | The initial size of the control. This value is in pixels unless the value of the type attribute is `"text"` or `"password"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, or `"password"`, otherwise it is ignored. | `number \| undefined` | `undefined` | | `spellcheck` | `spellcheck` | If `true`, the element will have its spelling and grammar checked. | `boolean` | `false` | | `step` | `step` | Works with the min and max attributes to limit the increments at which a value can be set. Possible values are: `"any"` or a positive floating point number. | `string \| undefined` | `undefined` | -| `type` | `type` | The type of control to display. The default type is text. | `"date" \| "email" \| "number" \| "password" \| "search" \| "tel" \| "text" \| "time" \| "url"` | `'text'` | +| `type` | `type` | The type of control to display. The default type is text. | `"date" \| "datetime-local" \| "email" \| "month" \| "number" \| "password" \| "search" \| "tel" \| "text" \| "time" \| "url" \| "week"` | `'text'` | | `value` | `value` | The value of the input. | `null \| number \| string \| undefined` | `''` | diff --git a/core/src/interface.d.ts b/core/src/interface.d.ts index 0c58775b9d..139dc02771 100644 --- a/core/src/interface.d.ts +++ b/core/src/interface.d.ts @@ -47,7 +47,7 @@ export type AutocompleteTypes = ( | 'tel-extension' | 'impp' | 'url' | 'photo'); -export type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time'; +export type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time' | 'week' | 'month' | 'datetime-local'; export type Side = 'start' | 'end'; export type PredefinedColors = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark'; export type Color = PredefinedColors | string;