<select id="event"></select>
<select id="dates"></select>
const events = [
{ name: '...', dates: [ ... ] },
{ name: '...', dates: [ ... ] },
...
];
const eventEl = document.querySelector('#event');
const datesEl = document.querySelector('#dates');
eventEl.innerHTML = events
.map((n, i) => `<option value="${i}">${n.name}</option>`)
.join('');
eventEl.addEventListener('change', function() {
datesEl.innerHTML = events[this.value].dates
.map(n => `<option>${n}</option>`)
.join('');
});
eventEl.dispatchEvent(new Event('change'));