title: Writing a non-date type in an <input /> date
body: <p>Using <strong>Datepicker for Bootstrap v1.9.0</strong></p>
  <p>I need to select week by year (in the format <strong>WW/YYYY</strong>), I have the following code:</p>
  <p><strong>html</strong></p>
  <pre><code>&lt;div class=&quot;form-group col-12&quot;&gt;
      &lt;label asp-for=&quot;EngineeringChange.FinishedGood.Week&quot;&gt;Semana&lt;/label&gt;
      &lt;input type=&quot;text&quot; id=&quot;weeklyDatePicker&quot; class=&quot;form-control&quot; placeholder=&quot;Select Week&quot; /&gt;
      &lt;input asp-for=&quot;EngineeringChange.FinishedGood.Week&quot; class=&quot;form-control weeklyDatePicker&quot; placeholder=&quot;Select Week&quot; type=&quot;hidden&quot; /&gt;
      &lt;span asp-validation-for=&quot;EngineeringChange.FinishedGood.Week&quot; class=&quot;text-danger&quot;&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>jquery</strong></p>
  <pre><code>$(document).ready(function () {
      moment.locale('en', {
          week: { dow: 0, doy: 0 }
          // Sunday is the first day of the week
      });
  
      //Initialize the datePicker(I have taken format as mm-dd-yyyy, you can     //have your own)
      $(&quot;#weeklyDatePicker&quot;).datepicker({
          format: 'MM-DD-YYYY'
      });
  
      //Get the value of Start and End of Week
      $('#weeklyDatePicker').on('changeDate', function (e) {
  
          var week = moment(e.date, &quot;MM-DD-YYYY&quot;).week();
          var year = moment(e.date, &quot;MM-DD-YYYY&quot;).year();
          var end = week + '/' + year;
          $(&quot;#weeklyDatePicker&quot;).val(end);
          console.log(end + &quot;AFTER: &quot; + $(&quot;#weeklyDatePicker&quot;).val());
      });
  });
  </code></pre>
  <p>I can get it working as such:
  <a href="https://i.stack.imgur.com/nGidD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nGidD.png" alt="enter image description here" /></a>
  But as soon as I close the picker, it automatically changes to this:
  <a href="https://i.stack.imgur.com/JGwBZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JGwBZ.png" alt="enter image description here" /></a></p>
  <p>I believe this is because <code>#weeklyDatePicker</code> is of the type date, but what is the workaround?</p>