开发者

datepicker JQuery function in modal window

I'm trying to add datepicker in my modal window, but I had no success so far.

<script src="/js/jquery-1.6.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#date_start").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: '/images/pick_date.png' });
});
</script>

<div><?php echo $this->开发者_StackOverflow社区;form->date_start ?></div> //this form element has id="date_start"

Any ideas?


nothing, it's like datepicker doesn't exist

Then probably your code runs before the DOM is ready. Fix things so it runs after the DOM is ready. jQuery can help you do this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜