This is the input field in the html body ..
Date: <input type="text" id="datepicker" name="datepicker" readonly="readonly"/>
Following code adds an animation to the datepicker fine when the commented code is uncommented, however when trying to add the date restriction too only the animation works.
Adding the date restrction on its own works fine though.
How come these two functions ‘interfere’ with eachother? not sure if im calling them right.
$(function() {
var today = new Date();
$('input[name=datepicker]').val((today.getMonth() + 1) + "/" + today.getDate() + "/" + today.getFullYear());
//$("#datepicker").datepicker();
var backupStarted = new Date(2012,10,07);
$("#datepicker").datepicker("option", "showAnim", "drop");
$("#datepicker").datepicker({minDate: backupStarted, maxDate: today});
});
Appreciate any help on this!
Why don’t you use just one call?
I don’t know if that solves the problem but it could.