Hello, I'm developing a panel and I need datepicker in Portuguese, I already tried to modify the js file itself but the dates disappeared.
$('#datepicker').datepicker({
autoclose: true,
language:'pt-BR',
format: {
/*
* Say our UI should display a week ahead,
* but textbox should store the actual date.
* This is useful if we need UI to select local dates,
* but store in UTC
*/
toDisplay: function (date, format, language) {
var language ='pt-BR';
var data = new Date(date);
var dia = date.getDate()+1;
console.log(dia);
if (dia.toString().length == 1)
dia = "0"+dia;
var mes = data.getMonth()+1;
if (mes.toString().length == 1)
mes = "0"+mes;
var ano = data.getFullYear();
//console.log(moment().format('mm'));
console.log(language);
return dia+"/"+mes+"/"+ano;
},
toValue: function (date, format, language) {
var d = new Date(date);
d.setDate(d.getDate() + 7);
// console.log(new Date(d));
return new Date(d);
}
}
});
});