input type="date" nu functioneaza pe Mozilla

Coduri intrebari, probleme legate de HTML, XHTML si CSS
andras
Mesaje: 430

input type="date" nu functioneaza pe Mozilla

Salut, bine v-am regasit in Anul Nou 2016!

Cod: Selectaţi tot

<input type="date">
nu functioneaza corect in Modzila, merge in Chrome si Opera. De pe net am vazut ca Modzila nu are suport HTML5. Cum formatez cimpul type="date" astfel incit sa fie recunoscut de toate browserele? Multumesc.

MarPlo Mesaje: 4343
Salut
Solutia ar fi sa folosesti un datepicker cu javascript. Exista astfel de scripturi pe net, de exemplu:
- jQuery UI datepicker
- Sau cu webshim cu polyfiller (un plugin jquery pt a folosi elemente html5 in browsere care inca nu le suporta).
Exemplu (trebuie sa ai intai inclus jquery):

Cod: Selectaţi tot

<script src="http://cdn.jsdelivr.net/webshim/1.12.4/extras/modernizr-custom.js"></script>
<script src="http://cdn.jsdelivr.net/webshim/1.12.4/polyfiller.js"></script>
<script>
webshims.setOptions('waitReady', false);
webshims.setOptions('forms-ext', {types: 'date'});
webshims.polyfill('forms forms-ext');
</script>

Date: <input type="date">
Demo:
Date:

Subiecte similare