admin管理员组

文章数量:1410730

I cannot get the buttonimage for the uidatepicker plugin for jquery to work:

$( "#datepicker" ).datepicker(
      {        
          dateFormat: 'dd-mm-yy',
          buttonImage: "/images/calendar.gif",
      }
);

I have the image in the right location (in a subdirectory named images)...what am I doing wrong?

Here is the link:

.php

I cannot get the buttonimage for the uidatepicker plugin for jquery to work:

$( "#datepicker" ).datepicker(
      {        
          dateFormat: 'dd-mm-yy',
          buttonImage: "/images/calendar.gif",
      }
);

I have the image in the right location (in a subdirectory named images)...what am I doing wrong?

Here is the link:

http://dev.speechlink.co.uk/David/sixthiteration/performanceanalysis.php

Share Improve this question edited Aug 25, 2011 at 0:44 user906568 asked Aug 25, 2011 at 0:02 user906568user906568 4712 gold badges9 silver badges21 bronze badges 5
  • Try adding buttonImageOnly: true to it. – mnsr Commented Aug 25, 2011 at 0:06
  • doesn't work-plus I want both to be triggers...:/ – user906568 Commented Aug 25, 2011 at 0:07
  • what browser are you using? In IE, does it show the [X] image holder where the button should be? Can you paste the HTML you've used for the datepicker, please? also, does the datepicker show when you click on the textbox? – mnsr Commented Aug 25, 2011 at 0:26
  • I am using safari and firefox, in both the images do not appear. See edit for the link. – user906568 Commented Aug 25, 2011 at 0:36
  • Do you still have the problem? I could see the button image in Firefox – Vini Commented Aug 25, 2011 at 1:07
Add a ment  | 

2 Answers 2

Reset to default 6

Add showOn: "both" and buttonImageOnly: true to stop the image looking like a button.

That should work fine. But you can try this alternative.

$("#datepicker").datepicker( "option", "buttonImage", '/images/calendar.gif');

本文标签: javascriptjQuery uidatepicker buttonimage not workingStack Overflow