I have a page that is fed with information from the Mysql Database. This page also contains an Input Text with dataPicker calendar. The problem is that only the first line of the looping works with DataPicker, the others do not.
Form:
while($fetch = mysql_fetch_assoc($xxx)){
<input name="protocolo" id="protocolo" type="text"
placeholder="00/00/0000"
style="width:100px;font-size: 13px" class="form-control input-md">
DataPicker
<script type="text/javascript">
$(document).ready(function(e) {
$("#protocolo").datepicker({
dayNamesMin: ['D','S','T','Q','Q','S','S','D'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'],
dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
dateFormat: 'yy-mm-dd',
nextText: 'Próximo',
prevText: 'Anterior'
});
});
</script>
} ?>
Both are within the While, I tested putting the DataPicker out of the white, but the problem remains, only the first line of While opens the calendar, the others do not.