npm @rehookify/datepicker 2.0.0
v2.0.0 Modular Design

latest releases: 6.6.8, 6.6.7, 6.6.6...
2 years ago

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.selectedDates now is a collection of raw dates
  • data.formattedDates is formatted dates according to locale configuration

🗓 calendars.days:

  • 🙅 deleted deprecated pops:
    • currentDisplayedMonth -> inCurrentMonth
    • isSelected -> selected
    • isActive -> active
    • inRange, isRangeStart, isRangeEnd, willBeInRange -> range

🗓 months and years:

  • 🙅 deleted deprecated pops:
    • isSelected -> selected
    • isActive -> 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

Don't miss a new datepicker release

NewReleases is sending notifications on new releases.