Page 1 of 1

IONIC time input

Posted: Wed Jul 26, 2017 10:21 am
by Andy Parker

Hi,

I've got an input component set to type "time" on my ionic project and need to know how to set this component to only display HH:mm

I've read several blogs on this that suggest using:

displayFormat = "HH:mm"

but have not been successful when using it in the builder, as the entry displayformat seems to be ignored
Any ideas?

The screenshot below shos "ng-" in front, I tried both :-)
Image


IONIC time input

Posted: Thu Jul 27, 2017 9:28 am
by Serhii Kulibaba

Hello,

The input component with a type = "time" has a default format HH:mm. Please clarify, what format do you have there?


IONIC time input

Posted: Thu Jul 27, 2017 10:29 am
by Andy Parker

the problem is the display, it shows HH:mm:ss:ms

But, I have found that if I set the seconds and milliseconds of the time variable to 0, they do not show - so that solves the issue that way.

thanks.