发现:当日期小于31时,就会自动到下一个月份。
解决方法:将月份和天数一起设置。this.date.setMonth(this.month,1);
而不是先.setMonth(1); 再 this.date.setDate(1);这样的方法时错误的。
发现:当日期小于31时,就会自动到下一个月份。
解决方法:将月份和天数一起设置。this.date.setMonth(this.month,1);
而不是先.setMonth(1); 再 this.date.setDate(1);这样的方法时错误的。