Hello stackOverflow family
I'm finalizing a project and I'm having problems with datepicker. I have two datepicker fields (calendar and calendar1), working perfectly, but I need the field "calendar1" to present dates from the date field of the "calendar" field. Could I make myself understood?
In short: the calendar field is chosen 14-01-2018 and the date options in calendar1 should be from 15-01-2018
Follow the datepicker
<script>
$(function() {
$( "#calendario" ).datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
showOtherMonths: true,
selectOtherMonths: false,
numberOfMonths: 2,
maxDate: '-1d +12m',
minDate: '+1d',
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']
});
$( "#calendario1" ).datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
showOtherMonths: true,
selectOtherMonths: false,
numberOfMonths: 2,
maxDate: '-2d +12m',
minDate: '+3d',
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']
});
});
</script>