mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
feat(datetime): add clear button (#23920)
resolves #17482 Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
20
core/src/components.d.ts
vendored
20
core/src/components.d.ts
vendored
@ -708,6 +708,10 @@ export namespace Components {
|
||||
* The text to display on the picker's cancel button.
|
||||
*/
|
||||
"cancelText": string;
|
||||
/**
|
||||
* The text to display on the picker's "Clear" button.
|
||||
*/
|
||||
"clearText": string;
|
||||
/**
|
||||
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
|
||||
*/
|
||||
@ -777,9 +781,13 @@ export namespace Components {
|
||||
*/
|
||||
"readonly": boolean;
|
||||
/**
|
||||
* Resets the internal state of the datetime but does not update the value. Passing a value ISO-8601 string will reset the state of te component to the provided date.
|
||||
* Resets the internal state of the datetime but does not update the value. Passing a valid ISO-8601 string will reset the state of the component to the provided date. If no value is provided, the internal state will be reset to today.
|
||||
*/
|
||||
"reset": (value?: string | undefined) => Promise<void>;
|
||||
"reset": (startDate?: string | undefined) => Promise<void>;
|
||||
/**
|
||||
* If `true`, a "Clear" button will be rendered alongside the default "Cancel" and "OK" buttons at the bottom of the `ion-datetime` component. Developers can also use the `button` slot if they want to customize these buttons. If custom buttons are set in the `button` slot then the default buttons will not be rendered.
|
||||
*/
|
||||
"showClearButton": boolean;
|
||||
/**
|
||||
* If `true`, the default "Cancel" and "OK" buttons will be rendered at the bottom of the `ion-datetime` component. Developers can also use the `button` slot if they want to customize these buttons. If custom buttons are set in the `button` slot then the default buttons will not be rendered.
|
||||
*/
|
||||
@ -4300,6 +4308,10 @@ declare namespace LocalJSX {
|
||||
* The text to display on the picker's cancel button.
|
||||
*/
|
||||
"cancelText"?: string;
|
||||
/**
|
||||
* The text to display on the picker's "Clear" button.
|
||||
*/
|
||||
"clearText"?: string;
|
||||
/**
|
||||
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
|
||||
*/
|
||||
@ -4384,6 +4396,10 @@ declare namespace LocalJSX {
|
||||
* If `true`, the datetime appears normal but is not interactive.
|
||||
*/
|
||||
"readonly"?: boolean;
|
||||
/**
|
||||
* If `true`, a "Clear" button will be rendered alongside the default "Cancel" and "OK" buttons at the bottom of the `ion-datetime` component. Developers can also use the `button` slot if they want to customize these buttons. If custom buttons are set in the `button` slot then the default buttons will not be rendered.
|
||||
*/
|
||||
"showClearButton"?: boolean;
|
||||
/**
|
||||
* If `true`, the default "Cancel" and "OK" buttons will be rendered at the bottom of the `ion-datetime` component. Developers can also use the `button` slot if they want to customize these buttons. If custom buttons are set in the `button` slot then the default buttons will not be rendered.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user