我需要禁用到下一个月。请帮助我
$(".input-monthpicker-freezelastyear").datepicker({ format: "mm-yyyy", viewMode: "months", minViewMode: "months", startDate: new Date(), autoclose: true });
我代码如下所示
cdmah0mi1#
要将日期推迟整整一个月,您可以执行以下操作:
// Get Date now const date = new Date() // Set the month exactly one more from now date.setMonth(date.getMonth()+1) console.log(date);
或者将其 Package 到一个函数中,以使用elswhere,如this answer(答案的源代码)
1条答案
按热度按时间cdmah0mi1#
要将日期推迟整整一个月,您可以执行以下操作:
或者将其 Package 到一个函数中,以使用elswhere,如this answer(答案的源代码)