$("#seu_campo_id").datepicker({defaultDate: "getDate()",
dateFormat: 'dd/mm/yy',
dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo'],
dayNamesMin: ['D','S','T','Q','Q','S','S','D'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'],
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
changeMonth: false,
numberOfMonths: 1,
minDate: 0}).datepicker("setDate", new Date());
Hello @Diegofelipe, I made the change but the field does not show me the date, where the ID "#mydata" in my case is called "#Initial date".
– adventistapr
@adventistapr your date field is a correct text input type?
– user28595
Yes, it looks like this: <input name="dDataInitial" type="text" class="form-control" id="dDataInitial">
– adventistapr
I’ll add an example from the same Soen post, see if it helps you.
– user28595
Hello @Diegofelipe, change something if you say I’m using Datapicker for Bootstrap?
– adventistapr
@adventistapr but bootstrap datepicker needs jquery. See requirements here. Add
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
after the bootstrap js lib in your code and see if it works.– user28595
@adventistapr edited the answer, see if it now works.
– user28595