This is my code:
$("#text").each(function randomDate(start, end) {{
var date = new Date(+start + Math.random() * (end - start));
return date;
}
var date1 = new Date(2000,09,01);
var date2 = new Date();
//alert($.datepicker.formatDate("mm/dd/yy",randomDate(date1, date2)));
});
I want to be able to randomly select a date and put it in a textbox using javascript or jquery. The $("text") is the id of the text box.
Basically I want a simple solution to select a random date that automatically gets entered in the date textbox. Any help is much appreciated. Thanks.