i have this issue. I am trying to create a form page where it will show a list of data using a while loop and each of them have the input field option to choose a date which will all be submitted over. So far i have about 4 fields displayed but the datepicker only works for the first one. The rest are just empty text box.
This my code :
$query = "SELECT * FROM application WHERE Shortlist_status = 1 ORDER BY Candidate_id ASC";
$result = mysqli_query($link, $query) or die(mysqli_error($link));
<html>
<head>
<link href="stylesheet/style.css" rel="stylesheet"/>
<script src="script/jquery-1.10.2.min.js"></script>
<script src="script/jquery-ui-1.10.3.custom.min.js"></script>
<link rel="stylesheet" href="stylesheet/jquery-ui-1.10.3.custom.min.css">
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<title>
Arrange interview
</title>
<body>
while ($row = mysqli_fetch_array($result)) {
(Some other input data)
<input type="text" id="datepicker" name="date"/>
}