Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49268

Ionic Datetime Issue Android

$
0
0

@alokjkumar97 wrote:

I’ve had a report from a production app about the datetime component not working. Instead of showing numbers for the time it just shows a series of periods “…” (picture attached)

I can’t seem to replicate the issue on my own device or any emulator and haven’t found any resource online with the same issue. I’ve asked for specific device details but it looks like a Samsung Galaxy device from the photo, still awaiting Android version number. Any ideas?

settings.page.html

    <ion-item>
      <ion-label>Notifications</ion-label>
      <ion-datetime displayFormat="HH:mm" [(ngModel)]="notificationTime" (ionChange)="setNotificationTime()"></ion-datetime>
    </ion-item>

settings.page.ts

  public notificationTime = "16:00";

  constructor(private storage: Storage, private quoteService: QuoteService, private router: Router) { }

  ngOnInit() {
    this.storage.get('notificationTime').then((val) => {
      if(val === null) {
        this.quoteService.scheduleNotifications();
        this.notificationTime = "16:00";
      } else {
        this.notificationTime = `${val[0]}:${val[1]}`;
      }
    })
  }

  setNotificationTime(): void {
    let time = this.notificationTime.split(":").map(function(item) {
        return parseInt(item, 10);
    });
    this.quoteService.scheduleNotifications(time);
  }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49268

Trending Articles