且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Bootstrap Datepicker选择月份日期范围和月份

更新时间:2023-01-29 09:57:58

您需要修改click事件的prevnext计算.检查此小提琴(检查控制台以查看值).

You need to modify prev and next calculations on click events. Check this fiddle (Check the console to see the values).

使用setMonth()getMonth()代替setDate()getDate().另外,您可能需要调整/设置天"值才能获得准确的结果.

use setMonth() and getMonth() instead of setDate() and getDate(). Also you may need to adjust/set the Day value to get accurate results.

更新:这是更新的小提琴