I'm using the datetimepicker of Bootstrap, it's working pretty well. The thing is that it's in english, and I need it in spanish, I had read some post but nothing works to me. my HTML is defined as:
<div class="form-group">
<div class='input-group date datepicker' data-date-startdate="{{$student->middle}}" name="datepicker" >
<input type='text' class="form-control placementT" id="fecha">
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
In the javascript, I have only one function related with the datetimepicker, this is:
$('.input-group.date').each(function() {
$(this).datetimepicker().on('dp.hide',function (ev) {
//something
});
});
So, what should I add to change this to spanish?I had read that this is with locale.js but can I add the definition of days and months inside my javascript?
You need to add locale, reference can be found here
For spanish
locale: 'es'
Script
DateTimePicker in Spanish