diff --git a/core/api.txt b/core/api.txt index 9704aeb4d8..52a261f9cc 100644 --- a/core/api.txt +++ b/core/api.txt @@ -337,6 +337,8 @@ ion-datetime,css-prop,--padding-end ion-datetime,css-prop,--padding-start ion-datetime,css-prop,--padding-top ion-datetime,css-prop,--placeholder-color +ion-datetime,part,placeholder +ion-datetime,part,text ion-fab,shadow ion-fab,prop,activated,boolean,false,false,false diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 3300fbee5d..e703bcc02a 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -10,6 +10,9 @@ import { DatetimeData, LocaleData, convertDataToISO, convertFormatToKey, convert /** * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. + * + * @part text - The value of the datetime. + * @part placeholder - The placeholder of the datetime. */ @Component({ tag: 'ion-datetime', @@ -609,6 +612,10 @@ export class Datetime implements ComponentInterface { ? (placeholder != null ? placeholder : '') : text; + const datetimeTextPart = text === undefined + ? (placeholder != null ? 'placeholder' : undefined) + : 'text'; + if (label) { label.id = labelId; } @@ -631,7 +638,7 @@ export class Datetime implements ComponentInterface { 'in-item': hostContext('ion-item', el) }} > -
{datetimeText}
+
{datetimeText}