Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save claudiohilario/88771cf84cc87f6cbd0d269f9674257f to your computer and use it in GitHub Desktop.
Save claudiohilario/88771cf84cc87f6cbd0d269f9674257f to your computer and use it in GitHub Desktop.
Tradução para português do Date Picker (materializecss)
$(function () {
//Config datepiker matrializecss () language
$('.datepicker').pickadate({
selectMonths: true,//Creates a dropdown to control month
selectYears: 15,//Creates a dropdown of 15 years to control year
//The title label to use for the month nav buttons
labelMonthNext: 'Proximo Mês',
labelMonthPrev: 'Mês Anterior',
//The title label to use for the dropdown selectors
labelMonthSelect: 'Selecionar Mês',
labelYearSelect: 'Selecionar Ano',
//Months and weekdays
monthsFull: [ 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' ],
monthsShort: [ 'Jan', 'Fev', 'Mar', 'Abr', 'Maio', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez' ],
weekdaysFull: [ 'Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado' ],
weekdaysShort: [ 'Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb' ],
//Materialize modified
weekdaysLetter: [ 'D', 'S', 'T', 'Q', 'Q', 'S', 'S' ],
//Today and clear
today: 'Hoje',
clear: 'Limpar',
close: 'Fechar',
//The format to show on the `input` element
format: 'dd/mm/yyyy'
});
});
@rafaelqueiroz88
Copy link

Atentar-se ao nome dado a função datepicker. Muitas documentações mostram como:

$('.datepicker').pickadate();

O ideal seria utilizar:

$('.datepicker').datepicker();

Feito isso, o que o @buutqn sugeriu faz efeito

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment