moment 获取月初和月末

js yekong 120℃
      var vStartDate = new moment().add('month', 0).format('YYYY-MM') + '-01'
      var vEndM = moment(vStartDate).add('month', 1).add('days', -1)
      var vEndDate = moment(vEndM).format('YYYY-MM-DD')
      this.value[0] = vStartDate
      this.value[1] = vEndDate
      console.log(this.value)
喜欢 (0)