2017-10-11 132 views
0

有这样一条:无法更改月份日期选择器

$(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 
      }); 
     }); 

这是结果:

enter image description here

如何确保我可以选择再过一个月,喜欢这里:

enter image description here

+2

默认情况下,您获得该控件:https://jsfiddle.net/8b31qnpd/。如果它没有出现给你,那么你可能有一些CSS干扰jQueryUI –

+0

@RoryMcCrossan,你有正确的方向,我发现我没有为jquery-ui导入css。 – Foxy

回答

0

我的不好,只是忘了包括添加lin k到jquery-ui在我的页面中:

<link type="text/css" href="<%=whatIsContextPath%>/stylesheet/jquery-ui-1.8.16.custom.css" rel="stylesheet" /> 
相关问题