Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个日历选择器,默认日期被选为周末日期(星期日)。在 jQuery 或 Angular JS 中需要它
初始化日期选择器的值时可以使用以下函数
function getSunday(d) { return new Date(d.getFullYear(), d.getMonth(), d.getDate() – d.getDay() + 7); }
来源:https ://dukelupus.wordpress.com/2010/02/02/javascript-dates-get-monday-get-sunday-get-last-day-of-a-month/
资源:
用jquery在datepicker中设置初始值?
在angularjs中使用ui-date时如何将初始值设置为ng-model