开发者

Datepicker setDate doesn't work anymore?

can you explain me why this code :

http://jsfiddle.net/3qJx9开发者_如何转开发/7/

doesn't work ?

I used to use it in order to put the current date as default when no date were loaded, but it doesn't work anymore, and I don't understand why.

Thanks !


You can only call methods on an initialized jQuery UI widget and you forgot to initialize the datepicker:

$("#date").datepicker();
$("#date").datepicker("setDate", new Date());

Updated JSFiddle

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜