i have several input fields initialized as flatpickr inoout fields using a class in a single page and im trying to set the current value of the each input field onChnage (selecting the date) with the dateStr value but after few tries i got no luck. any idea how to do it? here is the code im using:
flatpickr.localize(flatpickr.l10ns.fa);
flatpickr.l10ns.default.firstDayOfWeek = 6;
flatpickr(".datePicker", {
onChange: function(selectedDates, dateStr, instance) {
this.value = dateStr;
},
});