I created a form that has a panel, and in that panel it has a input
date with a jquery datepicker
. If I have data entered in the database, my PHP creates more rows in this panel (via ajax
) with other input
to insert date, however these new input
are not enabling the possibility to choose the date with datepicker
.
I believe it's in the order of javascript and PHP rendering in the application.
How can I make this new input also assign my datepicker
?
Note: new input is also defined with class="data"
datepicker
$('.data').datepicker({
dateFormat: 'dd/mm/yy',
dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'],
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'],
nextText: 'Próximo',
prevText: 'Anterior',
maxDate: new Date,
});
(1)LinesgeneratedbymyPHPwhenitfindsdatainthedatabase
(2)Inputwithclass="data"
that does not take the jquery characteristic datepicker
.
(3) Input that already loads when requesting page