DateTime with Ionic 2


Hi All,

I am trying to make use of the Ionic DateTime component. I have the following code, but nothing displays (just the label and button). If anyone can advise, I would appreciate it.

enter image description here


    <ion-title>Last Online</ion-title>

<ion-content padding>

    <ion-spinner icon="android" *ngIf="loading"></ion-spinner>

        <ion-label>Last Online</ion-label>
        <ion-datetime displayFormat="h:mm A" pickerFormat="h mm A" [(ngModel)]="event.timeStarts"></ion-datetime>

    <button (click)="done()" block round class="form-button-text">{{'Done'}}</button>



import { Component } from '@angular/core';
import { NavController, NavParams, Events } from 'ionic-angular';
import { JobModel } from '../model/jobModel';

  templateUrl: 'build/pages/datetime/datetime.html'
export class DateTimePage {

  private loading: boolean = true;
  private jobModel: JobModel = null;
  private event: Events = null;

  constructor(private nav: NavController, private navParams: NavParams, event: Events) {
    this.event = event;
    this.jobModel = navParams.get('jobModel');
    if (!this.jobModel) {
      this.jobModel = new JobModel();
    this.loading = false;

  private done(): void {


The following works, it’s a different date picker.