The form looks like this:
Code: Select all
<input type="text" value="<?=date('Ymd');?>" id="from" id="<?php echo $_REQUEST["from"]; ?>" name="displaydate">Code: Select all
<?=date('Ymd');?> Code: Select all
<?php echo $_REQUEST["from"]; ?>Code: Select all
<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>Now what I need help to, is that I would like to place a small calendar image beside the form. When you click the small image the calendar also "drop-down" just as when you click on the form. I have tried with the code:
Code: Select all
<img src='images/calendar.png' onclick="from" style='cursor: pointer; vertical-align: middle;' />