弹出窗口中的datepicker无法正常工作

时间:2014-05-19 11:28:14

标签: jquery codeigniter datepicker

下面的代码在弹出窗口中......

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
 <link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css">
<script type="text/javascript">

$(document).ready(function()
{

$( "#datepicker" ).datepicker({


changeMonth: true,
 changeYear: true,
 yearRange: "-100:+0",
  dateFormat: 'yy-mm-dd'
});
 });
  </script>

这是我的观看代码

<li><?php
                        echo anchor_popup(base_url()."index.php/controller_bookaplot", "Book Plot", $atts = array(
                            'width' => '800',
                            'height' => '600',
                            'scrollbars' => 'yes',
                            'status' => 'yes',
                            'resizable' => 'yes',
                            'screenx' => '0',
                            'screeny' => '0'
                        ));
                        ?></li>

并在controller_bookplot中加载名为bookplot_new的视图。但是在弹出窗口中,datepicker没有显示。相同的代码正在使用普通窗口。所以有人告诉我这个...我已经包含了所需的所有jquery。如何解决这个问题...

1 个答案:

答案 0 :(得分:0)

试试这个

   $(document).live(function()
   {

$( "#datepicker" ).datepicker({


changeMonth: true,
 changeYear: true,
 yearRange: "-100:+0",
  dateFormat: 'yy-mm-dd'
});
 });
相关问题