开发者

jquery datepicker only works on <input type=text> within Chrome?

I have a very simple page that's using jquery's datepicker. I have:

<input id=datepicker type=image src='cal.png'>开发者_如何学编程;

When I click on the image in FF/IE, it works as expected, but does not work in Chrome (ver. 4.1.249.1064). However if I simply change to "type=text", it works within Chrome.

So my question is this: am I allowed to use Datepicker with "type=image"?


http://jqueryui.com/demos/datepicker/#option-buttonImageOnly

I think you want to use the buttonImageOnly option for the datepicker. You may need to create a text or hidden input to hold the value, if you are wanting to only display cal.png with out a text input for the selected date.


Have you tried

<input id="datepicker" type="image" src='cal.png'>

Not sure if you need it but wrap the names in quote marks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜