【发布时间】:2015-12-15 06:09:11
【问题描述】:
我的代码:
<html>
<head>
<link rel="stylesheet" href="js/jquery-ui-themes-1.11.1/themes/smoothness/jquery-ui.css">
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.11.1/jquery-ui.js"> </script>
<script type="text/javascript">
$(function(){
$("#datepicker1").datepicker({dateFormat: 'dd-mm-yy'});
});
</script>
<style>
.ui-datepicker{
font-size: 9.5pt;
}
.ui-widget-header{
font-size: 12px;
color: #102132;
background: #D7E5F2;
}
#ui-datepicker-div .ui-state-highlight{
background: yellow;
color: red;
font-weight: bold;
}
.ui-datepicker-current-day .ui-state-active{
background: white;
color: blue;
font-weight: bold;
}
</style>
</head>
<body>
<input type="text" name="examdate" id="datepicker1" />
</body>
</html>
现在我的问题是当我单击文本字段时,我想要文本字段下的日期选择器。应该怎么修改?
【问题讨论】:
-
底部是否有足够的空间让日期选择器打开它?
-
似乎工作正常here。
-
@zan 是的,有足够的空间
-
Alorika fiddle 我觉得不错,你能创作出小提琴吗?
标签: javascript jquery html datepicker