v2.0.0 release 🎊 🎉🚀
Added Modular concept with hooks or context.
Now you can optimise your app bundle size by using only the needed logic.
⚠️ BREAKING CHANGES
useDatePicker:
data.selectedDatesnow is a collection of raw datesdata.formattedDatesis formatted dates according to locale configuration
🗓 calendars.days:
- 🙅 deleted deprecated pops:
currentDisplayedMonth->inCurrentMonthisSelected->selectedisActive->activeinRange,isRangeStart,isRangeEnd,willBeInRange->range
🗓 months and years:
- 🙅 deleted deprecated pops:
isSelected->selectedisActive->active
🆕🔥 Modular hooks
Now date-picker logic is divided between multiple hooks.
The main aim is to give you the possibility to use only parts that are needed for your app.
But at the same time, you still could use all-in-one logic with useDatePicker and DatePickerContext.
The heart of the date-picker is a state-reducer which holds all needed data and actions to manipulate these data.
All hooks are consuming state or dispatch from the state-reducer or both of them.
The whole list of modular hooks you could get here 👉 Modular hooks