I have a jQuery datepicker script:
$(function() {
$( \"#datepicker\" ).datepicker({ dateFormat: \"yyyy-mm-dd\" });
<script>
$(document).ready(function() {
$("#datepicker").datepicker();
});
$(document).ready(function() {
$("#datepicker2").datepicker();
});
$(document).ready(function() {
$("#datepicker3").datepicker();
});
</script>
And just give the forms the id's: datepicker datepicker2 datepicker3
It isn't valid to have duplicated IDs. You should add a class instead:
<input type="text" name="MyDate1" class="datepicker" id="datepicker1">
<input type="text" name="MyDate2" class="datepicker" id="datepicker2">
Then you can do:
$(function() {
$( ".datepicker" ).datepicker({ dateFormat: "yyyy-mm-dd" });
});