1
Good morning, I am finishing an Alarm application where the user selects the time the Notification should appear, I am using the native component of Ionic, the ion-Datetime. But I can’t find anywhere how I pass the data that the user selected into a variable. The part of the notifications I have already resolved with the this.hora, this.minuto
inside the Trigger.
this.localNotifications.schedule({
title: 'Atenção',
text: '',
data: { mydata: 'Notificação' },
trigger:{ every: { hour: this.hora , minute: this.minuto}, count: 1 },
foreground: true
The problem is to pass the time and minute of the Picker component to these variables.
In html it looks like this:
<ion-datetime [displayFormat]="HH:mm"></ion-datetime>
What would be a way to spend hour and minute into these variables?
What you want is to take the values of datetime is this?
– LeAndrade
That, take the values of the hour and minute (in my case)
– rzp
What RZP means?
– riki481