Add Ionic datetime prefix and suffix

Viewed 112

I'm trying to add a prefix and suffix to my hour and minute values. For the moment the values displayed are 00:05 (0 hours, 5 minutes) But I would still like to retrieve these values however display in another way in the selector. I would like to display 00 H and later 05min but recover 00:05. I show you the code of my template seen below. If you have any ideas I am interested and if you need more information do not hesitate.

display example: 01H & 15Min and retrieved data: 01:15 (string). In the datetime picker.

<ion-datetime 
  class="timepicker" 
  display-format="H:mm"  
  minute-values="0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55"  
  hour-values="0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12" 
  min="00:05" 
  :value="timer"
  :cancel-text="$t('datetime.cancel')"
  :done-text="$t('datetime.done')"
  @ionChange="setNewTimer($event)" 
  @ionCancel="cancelTimer"
></ion-datetime>
0 Answers
Related