For some reason, my date field ends-up empty when loading the page. here is the code:
$(function() {
$("#start_date").datepicker();
$('#start_date').datepicker('option', {dateFormat: 'yy-mm-dd'});
$('#start_date').datepicker('option', {dateFormat: 'yy-mm-dd'});
$("#end_date").datepicker();
$('#end_date').datepicker('option', {dateFormat: 'yy-mm-dd'});
});
// ---------------- FORM FIELD ----------------------//
<input type="text" size="10" name="start_date" id="start_date" value="2010-01-01" >
The Datepicker works very well, but for some reason, it doesn't want to display the initial value when the page is loaded. Probably a newbie question, but I'm sure someone has the answer! :)
Thanks in advance!
JE