JSFiddle - React, Tailwind, and code Playground

by brigand

HTML

<input type="date" name="" id="thing">

JavaScript

for (const event of ['click', 'mousedown', 'mouseup']) {
  thing.addEventListener(event, () => {
    console.log(event)
  })
}