I'm using this js-datepicker plugin (https://www.npmjs.com/package/js-datepicker). The problem is I have a lot of fields I want to apply the same type of date picker so presumed I could just give them all a class of say 'year', however it only assigns it to the first input field with that class. Is there a way to apply to all inputs with that class?
my code:
const year = datepicker('.year', {
/* formatter: (input, date, instance) => {
const value = date.toLocaleDateString()
input.value = value // => '1/1/2099'
}*/
});