I'm trying to change the language of datepicker in materialize css version 0.99.0 actual, but don't work. i tried change the language on * The date picker defaults.in materialize.js but didn't worked too. Someone know how to do this? Thanks.
html:
<div class="input-field col s6">
<input type="date" class="datepicker" id="pickdate">
<label for="pickdate">DATA</label>
</div>
javascript:
$( document ).ready(function() {
$('.datepicker').pickadate({
format: 'dd/mm/yyyy',
selectMonths: true, // Creates a dropdown to control month
selectYears: 15 // Creates a dropdown of 15 years to control year
});
Setting i18n object to Spanish traslation in materializecss 1.0.0-beta:
$('.datepicker').datepicker({
firstDay: true,
format: 'yyyy-mm-dd',
i18n: {
months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Dic"],
weekdays: ["Domingo","Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
weekdaysShort: ["Dom","Lun", "Mar", "Mie", "Jue", "Vie", "Sab"],
weekdaysAbbrev: ["D","L", "M", "M", "J", "V", "S"]
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With