Answer the question
In order to leave comments, you need to log in
How would you implement range for the DatePicker component?
I am making my own custom DatePicker, there was a need to make a range of dates so that I could select several dates on one calendar. How would you implement this? I have only this idea so far:
Create a range array that stores two values: startDate and endDate and an integer property step.
When the first date is selected, step is incremented by one, the startDate value is initialized, on the second click, step is incremented by one again and the endDate value is initialized. Is this a normal approach or is there another way?
How to store intermediate dates that are between startDate and endDate? (to be able to customize them)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question