date from => to 1

date from => to

flatpickr({
    "plugins": [new rangePlugin({ input: "#secondRangeInput"})]
});

Here is what the above code is Doing:
1. We’re importing the rangePlugin from the flatpickr package.
2. We’re creating a new instance of the rangePlugin and passing in the id of the second input field.
3. We’re initializing the first input field with the rangePlugin.
4. We’re initializing the second input field with the rangePlugin.

Now, if you run the application and select a date range in the first input field, the second input field will automatically update with the same date range.

Similar Posts