Open dennischeunggroupon opened 12 years ago
As a workaround, if you're using Modernizr, you can conditionally load the picker based on the browsers support (or lack of):
if (!Modernizr.inputtypes.date) {
$("input[type='date']").datepicker();
}
Another workaround if you want to have the bootstrap-datepicker for all browsers i.e. maintain consistency is to simply change the input to 'text'. Of course that might not be strictly 'valid' but it's an easy hack
@SlashmanX : hum yes but when you deal with some framework construction element or just want to use the html5 form validation it's a little bit violent
See my comment here: https://plus.google.com/102860501900098846931/posts/hTcMLVNKnec
Its possible to remove the little arrow used to trigger the date picker with the following style:
input::-webkit-calendar-picker-indicator {
display: none;
}
@web-dev I've noticed that while these stops the Chrome picker from showing, selecting a date using the bootstrap-datepicker doesn't actually update the field.
EDIT: Just noticed the 2nd part of the comment on G+ regarding setting the date using yyyy-mm-dd. My mistake
Confirming the comment by SlashmanX. Of these suggestions, the use of Modernizr or changing the input element type to text are the ones that work. Merely suppressing the built-in style on Chrome doesn't fix the issue of the input conflict.
Is there any solution to this yet? I've tried setting the input to text and have also tried with Modernizr, but neither works... I even tried disabling the native chrome datepicker.
Firefox works fine, though!
On Sun, Aug 23, 2015 at 7:19 PM, Richard notifications@github.com wrote:
Firefox works fine, though!
firefox doesn't support date as an input an falls back to type="text"
I am using type="text", but validation fails. It seems to default to the American date format, despite specifying a UK date format. Any ideas?
Since recent (I am using 20.0.1132.43 m), chrome will have a build-in datepicker for . https://plus.google.com/102860501900098846931/posts/hTcMLVNKnec
However, it cause duplicated with "bootstrap-datepicker".
bootstrap-datepicker should auto-detect and disable either and keep one active.