正在加载视频...

视频加载失败

Apparently some React devs don't know that <input type="date"> exists and think you need a library for that? So I made a really quick demo...

189,036 次观看 • 2 年前 •via X (Twitter)

10 条评论

Fran Zekan 的头像
Fran Zekan2 年前

You can still make fun of #useThePlatform for other things that platform doesn't handle well but non-native date pickers on mobile are bad...

Makisuo 的头像
Makisuo2 年前

thing though, I'm guessing the native calendar is not stylable which is kind of a dealbreaker imo.

CHIHEB Nabil 的头像
CHIHEB Nabil2 年前

I understand your perspective, but many developers opt for using date libraries to ensure consistent design across platforms/browsers. Moreover, when dealing with date localization, there are varying behaviors across different browsers. P.S. I'm not a React.js developer, but I believe this applies to other frameworks too

Fran Zekan 的头像
Fran Zekan2 年前

For those interested in more details of what you can use where ->

Alejandro Barrera Aponte 的头像
Alejandro Barrera Aponte2 年前

Wait till they learn about <datalist>

Tom Braul 🪐 的头像
Tom Braul 🪐2 年前

Apparently react devs come across some real world business needs.

Bueno 的头像
Bueno2 年前

Safari doesn't fully support this so

Fran Zekan 的头像
Fran Zekan2 年前

Safari doens't support week and month views, which up until a few months ago I didn't even know existed 😅 If you need those, fine, but most people need a date-picker and instead use a 1mb lib that doesn't work well on mobile just because...

Igor Silva 的头像
Igor Silva2 年前

tks

rmdashrfv 的头像
rmdashrfv2 年前

I like this but it is too small for me. Not the UI. I mean the bundle size. If you ain't adding 8mb of JS for a date picker in your React app then you ain't doing React

相关视频