I’m try to implement a Datetime-local in Firefox but don’t work, someone have an solution for this?, or a js that can ilustrate something similar like datetime-local?
This is like look in FireFox :
I only want to found a solution for this, that the user can write a Date-time on input
2
Answers
Gee, you are 100% correct. FireFox is a absolute mess and a big train falling off the tracks in a HUGE ball of flames.
Given this simple markup:
In Edge (new Chrome version), and in Google Chrome, we get/see this:
As you can see, for Date, Time, and DateTime, BOTH Edge and Google Chrome browsers work fine.
However, FireFox falls down, does not work, and creates a huge ball of flames in failure:
WOW! I’ve always been a big fan of Firefox, but this is a HUGE deal breaker for the whole asp.net community.
So, as above shows, with FireFox, then the data picker does work, but the time picker does not pop a dialog (it DOES show a input mask). And the Date+time picker fails in a huge ball of flames.
So, there are two solutions I can think of:
One: simple warn and tell users not to use FireFox, since it simple fails, does not work, and can’t do simple web based tasks like picking a time.
Two: Adopt a 3rd party jQuery or bootstrap library that allows some kind of pop dialog or time picker. There are many to choose from, but attempts to use a input control on a form with a automatic time picker with FireFox is simply not an option at this point in time.
So, FireFox simply does not work, can’t be used, or as noted, if you want to support FireFox, then you have to introduce a 3rd party time picker, as the built in browser based ones can’t be used.
There are endless choices of sample JavaScript libraries, but Firefox out of the box is not such a valid choice. You need to adopt 3rd party code for this to work.
I have totally scrapped the idea of using datetime-local because the users complained when using Firefox and Safari. I have spent all this week trying to use the JQuery ui Datepicker and merge another time time picker into one.
I have a solution that is working great for my application. I used the clocklet library for the time portion. The only drawback is that you can’t edit the final datetime, you must use the date and time buttons.
Operation is straight forward, select date then select time and press enter.
Here is the code: