diff --git a/packages/datepicker/package.json b/packages/datepicker/package.json index dc24783..d2cf816 100644 --- a/packages/datepicker/package.json +++ b/packages/datepicker/package.json @@ -1,6 +1,6 @@ { "name": "@rehookify/datepicker", - "version": "6.6.2", + "version": "6.6.3", "description": "The ultimate tool to create a date, range and time picker in your React applications.", "main": "dist/index.cjs.js", "module": "dist/index.esm.mjs", diff --git a/packages/datepicker/src/utils/create-months.ts b/packages/datepicker/src/utils/create-months.ts index 9bca68f..b851d91 100644 --- a/packages/datepicker/src/utils/create-months.ts +++ b/packages/datepicker/src/utils/create-months.ts @@ -14,13 +14,13 @@ export var createMonths = ( { minDate, maxDate }: DPDatesConfig, ): DPMonth[] => { // 12 is a number of months in the year - const { M, Y } = getDateParts(offsetDate); + const { M, Y, D } = getDateParts(offsetDate); const { Y: nY, M: nM } = getDateParts(newDate()); return Array(12) .fill(0) .map((_, i) => { - const $date = newDate(Y, i, 1); + const $date = newDate(Y, i, D); return { $date,