1.增加参数 showDay,默认值是true,true的情况下,就是含有日的情况,跟原来的datepicker无区别,只要年和月,请在参数里添加 showDay:false,如下 : $('#selMonth').datepicker( { showOn: "both", buttonImage: "../images/jquery/jquery-ui-datepicker-buttonimage.png", buttonImageOnly: true, changeYear: true, changeMonth: true, maxDate:0, yearRange:"2010:", dateFormat:"yymm", showDay:false }); 2.如果text文本框里得到年月,请在参数里强加dateFormat方法,如上边蓝色字体。 3.增加确认按钮,和国际化文字 confirmText。默认值confirmText: 'Confirm',请在自己国际话文件里替换。 4.修改文件中,修改的地方有 wl 注释,请使用者自己搜索。
2019-12-21 19:28:13 20KB 日历控件 年和月
1