jQueryで日付範囲のピッカーを作成し、それを入力テキストフィールドに結びつけています。jQuery日付ピッカーが入力テキストフィールドエラーに結びついています
コードは次のようになります:
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#datepicker").datepicker();
});
</script>
</head>
<body style="font-size:62.5%;">
<form action="sample.php" method="post">
Start Date: <input type="text" name="startdate" id="datepicker"/>
End Date: <input type="text" name="enddate" id="datepicker"/>
<input type="submit" />
</form>
</body>
</html>
データは、開始日の入力テキストフィールドのために働いているようです。
しかし、私は終了日の入力テキストフィールドをクリックすると、カレンダーが表示されません:私は開始日フィールドを選択すると、カレンダーが表示されます。そのカレンダーを使用してSTARTとENDの日付を選択する必要があります。
私のコードで何かが間違っていなければなりません。誰でも私に教えてくれますか?
ありがとうございます!
ありがとうございました。 –