JSFiddle - React, Tailwind, and code Playground

HTML

<h2>Week, month and datetime-local inputs</h2>

<p>Select a value to see how it appears in JavaScript.</p>

<section>
  <div>
    <label>Week</label>
    <input type="week" onchange="showValue('week', event.target.value)">
    <span id="week"></span>
  </div>

  <div>
    <label>Month</label>
    <input type="month" onchange="showValue('month', event.target.value)"> 
    <span id="month"></span>
  </div>

  <div>
    <label>Datetime local</label>
    <input type="datetime-local" onchange="showValue('datetime-local', event.target.value)">
    <span id="datetime-local"></span>
  </div>
</section>