Forum Moderators: coopster
<input type="text" value="<?=date('Ymd');?>" id="from" id="<?php echo $_REQUEST["from"]; ?>" name="displaydate"> <?=date('Ymd');?> just show the date of today. If you want to use anyother date you can click on the form and a "drop-down" calendar is showed. Its the code: <?php echo $_REQUEST["from"]; ?> that call the script. The script looks like: <script>
$(function() {
var dates = $( "#from, #to" ).datepicker({
changeMonth: true,
numberOfMonths: 2,
dateFormat: 'yy-mm-dd',
onSelect: function( selectedDate ) {
var option = this.id == "from" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" ),
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates.not( this ).datepicker( "option", option, date );
}
});
});
</script> <img src='images/calendar.png' onclick="from" style='cursor: pointer; vertical-align: middle;' /> but that dont help. Any suggestions?