Cant get new v6 DateTime Component to popup in a new blank Angular application

Hi, I Have just updated my Ionic application to V6 and am just trying to DateTime to act as a popup rather than inline (similar as before, as I have a small space to fit them in).

From this post, I am following this example in a new blank Ionicv6/Angular project.

All I have in the apps home page is the following (as per the exmaple)

<ion-header [translucent]="true">

<ion-content [fullscreen]="true">
  <ion-header collapse="condense">
      <ion-title size="large">Blank</ion-title>

      <ion-list style="height: 100%">
          <ion-label>Start Time</ion-label>
          <ion-note slot="end" id="datetimeValue">{{dateTime}}</ion-note>
          <ion-popover trigger="datetimeValue" show-backdrop="true">

And in the component code, just a date string…

public dateTime: string;
  constructor() {
    this.dateTime = new Date().toDateString();

However, in this sample app, the date time just does not popup on top. I Just see

Anyone have any ideas how to get this working?

Thanks in advance

you are missing ng-template tag

            <ion-datetime id="datetime" presentation="time" min="1989-06-04" max="2004-08-23"
1 Like

Thankyou @ciccilleju , that was exactly the problem!

1 Like