Hi,
I'm creating a form with a start date and end date so using the 'event search' datepicker, but I want the input box to have a calendar icon like on the 'icon trigger'
so my form works great with the 'event search' I just don't know how to integrate the 'icon trigger'
I have this:
- <script>
- $(function() {
- var dates = $( "#from, #to" ).datepicker({
- defaultDate: "+1w",
- changeMonth: false,
- numberOfMonths: 1,
- 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>
I just dont know where to put the part about the button image:
//getter
var buttonImage = $( ".selector" ).datepicker( "option", "buttonImage" );
//setter
$( ".selector" ).datepicker( "option", "buttonImage", '/images/datepicker.gif' )
or is it this bit of code:
$( ".selector" ).datepicker({ buttonImage: '/images/datepicker.gif' });
thanks in advance