我在使用MVC 4.0和VB语言的.net技术中做了一些工作。使用jquery设置datepicker的年份
我有从2006年到运行年的一套年的下拉列表。 我想将选定的年份从dropdownlist设置为datepicker,以便我可以在该年特定的几个月和几天内完成datepicker中的以下更改。
$('input').filter('.datepickerHoliday').datepicker({
changeMonth: true,
changeYear: false,
showYear: false,
dateFormat: 'mm/dd/' + yr,
});
我该怎么做?
你想在哪里显示下拉列表 - 在你的日期选择器内部或外部。 http://stackoverflow.com/questions/13865218/jquery-ui-datepicker-set-year-range-dropdown-to-100-years http://jqueryui.com/datepicker/#dropdown-month-year – Vinod 2015-03-31 05:51:19
下拉菜单是在外面显示。实际上,我从dropdownlist获得一年,并将其设置为datePicker(年)作为dateFormat,但我没有得到特定年份的月份和日期,我已经在dropdownlist中选择了这就是为什么我必须在datepicker中设置年份,落下。我怎样才能做到这一点? – 2015-03-31 05:56:52
@MahavirsinhPadhiyar你使用jQuery的ui datepicker吗? – malkam 2015-03-31 06:10:05