JSFiddle - React, Tailwind, and code Playground
HTML
<form id="foo">
<input name="bar" />
<input type="month" name="foo" />
<input type="month" name="two" />
</form>
JavaScript
let form = document.getElementById('foo');
form.addEventListener('submit', e => {
e.preventDefault();
console.log('submitted')
});