无法更改月份日期选择器
问题描述:
有这样一条:无法更改月份日期选择器
$(document).ready(function() {
$("#effectiveDate").datepicker({
dateFormat:'yy-mm-dd',
minDate: 1,
maxDate: '+4Y',
dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
showOn: "both",
buttonImage: "<%=whatIsContextPath%>/images/calendar.gif",
buttonImageOnly: true,
selectOtherMonths: true
});
});
这是结果:
如何确保我可以选择再过一个月,喜欢这里:
答
我的不好,只是忘了包括添加lin k到jquery-ui在我的页面中:
<link type="text/css" href="<%=whatIsContextPath%>/stylesheet/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
默认情况下,您获得该控件:https://jsfiddle.net/8b31qnpd/。如果它没有出现给你,那么你可能有一些CSS干扰jQueryUI –
@RoryMcCrossan,你有正确的方向,我发现我没有为jquery-ui导入css。 – Foxy