Better number and date input handling in JavaScript

preview_player
Показать описание

#javascript #webdev #devtips #html
Рекомендации по теме
Комментарии
Автор

I knew it but completely forgotten. Thanks for reminding me.

nivaldolemos
Автор

found this the other day and just came back for it on a real use case. thanks mate.

AAmorim
Автор

Just putting + sign before the expression all also works

maxxinmaze
Автор

Oh damn, I didn't know it worked for dates as well, cheers!

frammiie
Автор

Those small details make a difference!!

victors
Автор

man seen some nice clips from you hopefully remember this stuff day to day :P much apreciated

Iandavidandrino
Автор

I may opt not to use valueAsNumber at times because if the user removes the input value using the backspace key, we may receive a NaN value when using valueAsNumber.

pjchender
Автор

as long as you don’t need the radix(ie, you’re working with base 10), why not `const number = +input.value?`

aarond
Автор

Ok dude, I just subscribed after going through a # if your shorts. Excellent stuff ✌🏾

judemusyoki
Автор

Does someone knows the software he uses for recording and subtitles?🥺

howuseehim
Автор

Just curious is there anything for parseFloat??

jayantrawat
Автор

Why not just "Number(value)"? Much more simpler.

AmodeusR
Автор

WHAT
You mean I could have avoided playing around with date and string ALL THIS TIME

FFTEJIFEKITDEYKU

Obsywon
visit shbcf.ru