title: why in my methods the methods are being calculated only after the second digits is placed in the input values
body: <p>error:-The specified value "NaN" is not a valid number. The value must match to the following regular expression: -?(\d+|\d+.\d+|.\d+)([eE][-+]?\d+)?</p>
  
  <p>when i place the values in input values the in quantity and in rate, then expected result of input likes should be 4*5 = 20 but it doesn't do so instead 4*5a where a is the variable where any value of integer is placed then it only gives the expected result 20</p>
  
  <pre><code>&lt;table&gt;
   &lt;tr v-for="(pro,index,k) in pr`enter code here`oduct" :key="k"&gt;
  &lt;td&gt;{{index+1}}&lt;/td&gt;
  &lt;td&gt;&lt;input type="number" v-model="pro.qnt" @keypress="calculatetotal(index)" style="width:110px;"&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input type="number" v-model="pro.rate" @keypress="calculatetotal(index)" style="width:110px;"&gt;&lt;/td&gt;
  &lt;input type="number" v-model="pro.totalamount" class="form-control"&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input type="number" v-model="pro.Amount" style="width:110px;" @keypress="discountamount(index)"&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;input type="number" v-model="pro.discount" style="width:110px;"  @keypress="discountamount(index)" :disabled = "selected===1"&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;input type="number" v-model="pro.totalamount" class="form-control"&gt;&lt;/td&gt;
    &lt;/table&gt;
  
  
  methods:{
    calculatetotal: function(index)
              {
                  var total;
                  total=this.product[index].qnt * this.product[index].rate;
                  this.product[index].Amount=total
              },
  
   discountamount: function(index)
              {
  
                  //check whether the discoun is disabled or not
                  if( this.selected===1)
                  {
                    this.product[index].totalamount=this.product[index].Amount
                  }
                  else{
                  var dsa;
                  dsa=this.product[index].Amount - this.product[index].discount;
                  this.product[index].totalamount = dsa
                  }
              }
  
    }
  </code></pre>
  
  <p>the output should be 2*4=8 but it gives 2*4=0 and gives correct answer when  2*4a where a is integer varaible then only gives expected result 8</p>