I am having trouble with this. So, I created a from that allows you select a date range. Then from there, the form populates with records from the database based on the date range. Pretty easy.
However, the date field didn't work in firefox, so I tried switching it to jquery. and how it doesn't work. I am assuming it's something with the format. So here is my jquery code:
<script>
$(function() {
$( "#from" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#to" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#from" ).datepicker( "option", "maxDate", selectedDate );
}
});
});
</script>
and here is the mysql statement:
$sql = "SELECT * FROM v88374 WHERE date >= DATE_FORMAT('" . $from . "', '%Y/%m/%d') AND date <= DATE_FORMAT('" . $to . "', '%Y/%m/%d')";
Any help is greatly appreciated. I need it to work in all browsers ahd the reason I switched jquery was because the basic date field wouldn't work in firefox....so if someone has a better fix for this then I am definitely open to it.