News for hackers. Stuff that matters.
Re:Date/Time Inputs Enabled on Firefox Nightly by yvoschaap on Monday October 23, 2017 @03:43AM (#15531432)
I think the idea behind a native datepicker for <input> fields is good. But the fact I can't customize the design and UX of the datepicker interface, it always ends up being replaced by some javascript library where I can.

Same goes for the <select> input. The native one is usually always replaced by a custom designed one.

Re:Date/Time Inputs Enabled on Firefox Nightly by nkristoffersen on Monday October 23, 2017 @04:25AM (#15531612)
The best reason for using native form fields (in my experience) is for the mobile devices. Using some old school Jquery custom JS select input means its a very poor experience for mobile. At least on iOS by using native, I get the Safari mobile dates/select inputs that work much better+smoother than js/css alternatives. Of course this doesn't matter if you don't target mobile with your website/webapp.
Re:Date/Time Inputs Enabled on Firefox Nightly by pault on Monday October 23, 2017 @05:44AM (#15531910)
It’s possible to have both; just make your js component issue a synthetic click on a hidden native input, and read the value when changed. I do this all the time.
Re:Date/Time Inputs Enabled on Firefox Nightly by Piskvorrr on Monday October 23, 2017 @07:01AM (#15532208)
And oh the fun you'll have when you try to use a keyboard! (Nope nope nope, everyone clicks, you with the keyboard don't matter, and you with the screenreader just go away already)
Re:Date/Time Inputs Enabled on Firefox Nightly by pault on Monday October 23, 2017 @07:08AM (#15532236)
The idea is that you are using the native field to listen for user events, so the ux shouldn’t change. You have to proxy click events since the element isn’t visible, but key presses work as usual.
Re:Date/Time Inputs Enabled on Firefox Nightly by oliv__ on Monday October 23, 2017 @03:46AM (#15531447)
Agreed. You should really be able to fully style those inputs with bare CSS. Would make life so much easier!
Re:Date/Time Inputs Enabled on Firefox Nightly by yorwba on Monday October 23, 2017 @05:33AM (#15531874)
Why do you need to be able to control the look of the date picker (or any other input element)?

If every website used the same, it would be much more convenient than the current situation, where each date picker uses a subtly different mechanism to select the individual fields and then confirm the selected date. Most do not even support keyboard input.

Re:Date/Time Inputs Enabled on Firefox Nightly by majewsky on Monday October 23, 2017 @05:22AM (#15531828)
Okay, please write a proposal for how to select parts of this widget with CSS. Remember, it must be compatible with all major browsers and across all formfactors (mobile, desktop, 10-inch, automotive, etc.). I'll schedule an appointment for a review in 2020, since I don't expect you to be finished earlier than that.
Re:Date/Time Inputs Enabled on Firefox Nightly by dbbk on Monday October 23, 2017 @06:42AM (#15532123)
There are already ways to style native UI widgets, you can even style scrollbars...
Re:Date/Time Inputs Enabled on Firefox Nightly by jhasse on Monday October 23, 2017 @08:38AM (#15532674)
Styling scrollbars isn't really supported in Firefox IIRC. I hope it stays that way.
Re:Date/Time Inputs Enabled on Firefox Nightly by amelius on Monday October 23, 2017 @05:32AM (#15531872)
That's why they should have written the controls in Javascript and put it on their CDN, or include it in the browser distribution. Then using the controls would only require a simple include in the head of the document, and you could style the controls just like any other HTML.
Re:Date/Time Inputs Enabled on Firefox Nightly by keganunderwood on Monday October 23, 2017 @05:57AM (#15531959)
No, push back against insane requirements. Why do we want to style input? Bill them for a custom solution if they want a custom solution.