[Vuejs]-Laravel, Vue, and Momentjs Adding dates by fetching data in the modal and send to the database

0👍

Consider using computed properties:

computed: {
  dateEndRaise: {
    get: function() {
        return moment(this.form.date_start_raise).add(this.form.raising_days, 'days')
    }
  }
}

Then use that as your display value:

:value="dateEndRaise"

And re-use that technique for the other fields you need to calculate dates for.

Leave a comment