How to make time input with 24 hour format using javascript | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How to make time input with 24 hour format using javascript

14th Nov 2019, 2:29 AM
Backspace M
Backspace M - avatar
2 Réponses
+ 2
let timeVar = new Date(); console.log( timeVar.toString());
14th Nov 2019, 6:05 AM
Gordon
Gordon - avatar
+ 2
I recommend using MomentJS or some other date / time library. https://momentjs.com It will make this a lot easier.
14th Nov 2019, 8:51 AM
David Carroll
David Carroll - avatar