Jquery Datepicker不会在弹出窗口中更改月份和年份

时间:2014-06-22 09:30:15

标签: javascript jquery datepicker

我在Jquery中遇到问题Datepicker无法更改月份&弹出一年:(

请帮帮我

截图 http://prntscr.com/3vauj2

这个CSS& JS日期选择器

<link rel="stylesheet" href="../stylesheets/ui-lightness/jquery.ui.all.css">
<script src="../javascripts/jquery-1.10.2.js"></script>
<script src="../javascripts/jquery.ui.core.js"></script>
<script src="../javascripts/jquery.ui.widget.js"></script>
<script src="../javascripts/jquery.ui.datepicker.js"></script>
<script>var date = jQuery.noConflict();
  date(function() {
    date("#asd").datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat : "yy-mm-dd",
        yearRange: "-0:+1",
    });
});
</script>

HTML

<ul class="inline-popups">
                                <h3><a href="#text-popup-html" data-effect="mfp-zoom-in"><i class="fa fa-plus">Add Gallery</i></a></h3>
                            </ul>


                            <!-- Form popup -->
                            <div id="text-popup-html" class="white-popup mfp-with-anim mfp-hide">
                            <CENTER>ADD GALLERY</CENTER><br/>
                                  <form id="ff" action="ad_gallery.php" method="POST" enctype="multipart/form-data"> 
                                  <div class="form-group">
                                    <label for="exampleInputEmail1">Title Gallery</label>
                                    <input type="text" maxlength="50" class="form-control" id="addgallery" name="ti" placeholder="Title Gallery">
                                 </div> 

                                 <div class="form-group">
                                    <label>Date</label>
                                <input type="text" class="form-control"  id="asd" name="dt" >
                                </div>

                                  <center>
                                  <button type="submit" class="btn btn-primary">Submit</button>  <button type="reset" class="btn btn-danger">Reset</button>
                                    </center>
                                   </form>
                            </div><br/>

我困惑:(

0 个答案:

没有答案