1

I just want to show a label of type='time' without AM PM.

I tried writing this on my css:

input[type=time]::-webkit-datetime-edit-ampm-field {
  display: none;}

and the label looks like this:

<label><input type='time' value = '00:00'  name='temps[ ]'></label>

But it still showing anyway.

Thanks

Nic3500
  • 8,144
  • 10
  • 29
  • 40
Laura Galera
  • 89
  • 1
  • 10
  • 1
    I think there isn't a reliable cross-browser solution for this. There is a lot of posts here on SO about this https://stackoverflow.com/questions/13523060/html5-time-inputs-shows-12-hours#13523302 – Pedro Estevão Jan 11 '20 at 02:49
  • Thanks but I already checked that answer and it led me here, trying what I tried and without working. Anyways, I got a solution changing the type and adding a couple things. – Laura Galera Jan 11 '20 at 23:59

1 Answers1

0

It's worked for me

input[type=time]::-webkit-datetime-edit-ampm-field {
display: none;
}
Sheriff
  • 738
  • 10
  • 20