Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71530

Unable to read input values from ion-datetime when displayFormat="mm'ss""

$
0
0

@flavio_b wrote:

Hello,

I wrote a simple interface to get a time value as input from the user.
The time has the following format: mm’ss" so I want the user to put a time value in minutes and seconds, using such ion-datetime picker so that she can’t put wrong values in.

Here’s the small piece of code I inserted:

<ion-datetime placeholder="in mm'ss&quot;; es. 01'04&quot;" style="text-align: right;" displayFormat="mm'ss&quot;"
        [(ngModel)]="time"></ion-datetime>

Unfortunately, after selecting the time, the time variable is not getting updated. It’s like it doesn’t like such date-time format. Actually, I tried to change it to a real date (namely, changing format to displayFormat=“MM/DD/YYYY”) and the time value correctly gets the date via ngModel.

Why is this not working when dealing with minutes and seconds?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>