title: dd-MM-yyyy date format with moment.js
body: <p>Would like to get date format like <strong>12-September-2017</strong> after adding months with <code>moment.js</code>. 
  I'm using <code>datepicker</code> for date fields.</p>
  
  <p>current output is <strong>Th-10-yyyy</strong>.</p>
  
  <p>Also, getting warning </p>
  
  <blockquote>
    <p>moment.min.js:6 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to <a href="http://momentjs.com/guides/#/warnings/js-date/" rel="nofollow noreferrer">http://momentjs.com/guides/#/warnings/js-date/</a> for more info.</p>
  </blockquote>
  
  <pre><code>$(document).on("change", "#inputmonthadded", function (evt) {
  
      var input_value_inputstartdate = $('#inputstartdate').val();
      var input_value_inputmonthpurchased = $('#inputmonthpurchased').val();
      var input_value_inputmonthadded = $('#inputmonthadded').val();
  
      if (typeof input_value_inputstartdate != 'undefined' &amp;&amp; input_value_inputstartdate) {
  
          var inputstartdate = moment(input_value_inputstartdate);
  
          var portalexpdate = inputstartdate.add(input_value_inputmonthadded, 'months');
  
          var formatedportalexpdate = portalexpdate.format('dd-MM-yyyy');
  
          $('#inputportalexpirydate').val(formatedportalexpdate);
  
      }
      else {
  
          $('#inputportalexpirydate').val('');
      }
  
  });
  </code></pre>