1
'<link href="css/base/jquery-ui.css" rel="stylesheet" type="text/css">
<link href="style2.css" rel="stylesheet" type="text/css">
<script src="js/jquery-1.8.3.min.js"></script>
<script>
$(function() {
$("#datepicker").datepicker();
});
</script>

Date:

I cant make the datepicker appear by clicking the textbox. Please help. how can i make it work without linking a UI? Can i just code it?? I mean, i want it to work even without internet connection.. How? please help meee. Thanks in Advance..

4

1 回答 1

0

尝试这个:

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

  <script>
  $(document).ready(function() {
    $("#datepicker").datepicker({ 
        minDate: 1,
        onSelect: function(theDate) {
            $("#dataEnd").datepicker('option', 'minDate', new Date(theDate));
        },
        beforeShow: function() {
            $('#ui-datepicker-div').css('z-index', 9999);
        },
        dateFormat: 'yy-mm-dd' 
    });
  });
  </script>



    <input id="datepicker" name="date" style="width:235px;"/>

     <style type="text/css">
.ui-datepicker {
    background: linear-gradient(#1b597d, #113c59,#0e293f,#0a1b2a,#08141f,#0c2031,#102c42,#11354e,#11334c);
    border: 1px solid #555;
    color: white;
}
</style>
于 2015-02-27T11:43:36.217 回答