Ionic 6 hide part of datetime header

Viewed 27

I am using Ionic 6 with Angular. I have a datetime component and I have set the title slot, such as:

<ion-datetime [showDefaultTitle]="false" presentation="date">
  <span slot="title">Title</span>
</ion-datetime>

The issue is that this displays my title as subtitle and another title containing the currently selected date as the header. On their example in their own documentation this is not even there.

My question is how can I remove this additional header?

It is added with the class datetime-selected-date. I tried not displaying this class by setting the property display: none but it does not do the trick even when doing this with ::ng-deep.

Additional title

1 Answers

I have used this structure to display a title above the date picker, without displaying the date in the title:

<ion-item>
    <ion-label>...</ion-label>
    <ion-datetime>...</ion-datetime>
</ion-item>
Related