0
Ola Stackoverflow Family
I’m finalizing a project and I’m having trouble with the datepicker. I have two datepicker fields (calendar and calendario1), working perfectly, Finding precise that the field "calendario1" present dates from the choice of the date of the field "calendario". I was able to make myself understood?
In short: the calendar field is chosen 14-01-2018 and the date options in the calendario1 should be from 15-01-2018
Follow the datepicker codes
<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>
Could you mount an example on http://jsfiddle.net? This way it’s easier to help you
– Tiedt Tech
And then Rodrigo! Solved the question?
– Sam