@uxf/datepicker 11.92.0 → 11.93.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -319,4 +319,3 @@ export const DateRangePickerDay: FC<{ day: string; date: Date }> = ({ day, date
319
319
 
320
320
  - keyboard navigation doesn't work for year and decade view
321
321
  - the demo needs a little more love!
322
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/datepicker",
3
- "version": "11.92.0",
3
+ "version": "11.93.3",
4
4
  "description": "A set of React hooks to create an awesome datepicker.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,11 +14,12 @@ function getNextActiveMonth(activeMonth, numberOfMonths, counter, step) {
14
14
  let prevMonthDate = activeMonth[prevMonth].date;
15
15
  return Array.from(Array(numberOfMonths).keys()).reduce((m) => {
16
16
  if (m.length === 0) {
17
- prevMonthDate = (0, dayjs_en_1.dayjsEn)(prevMonthDate).add(counter, "month").toDate();
17
+ prevMonthDate = (0, dayjs_en_1.dayjsEn)(prevMonthDate).add(counter, "month").startOf("month").toDate();
18
18
  }
19
19
  else {
20
20
  prevMonthDate = (0, dayjs_en_1.dayjsEn)(prevMonthDate)
21
21
  .add(counter >= 0 ? 1 : -1, "month")
22
+ .startOf("month")
22
23
  .toDate();
23
24
  }
24
25
  return counter > 0
@@ -5,6 +5,9 @@ test("getNextActiveMonth", () => {
5
5
  expect((0, get_next_active_month_1.getNextActiveMonth)([{ year: 2021, month: 0, date: new Date("2021-01-01") }], 1, 1)).toStrictEqual([
6
6
  { year: 2021, month: 1, date: new Date("2021-02-01T00:00:00+01:00") },
7
7
  ]);
8
+ expect((0, get_next_active_month_1.getNextActiveMonth)([{ year: 2021, month: 9, date: new Date("2021-10-01") }], 1, 1)).toStrictEqual([
9
+ { year: 2021, month: 10, date: new Date("2021-11-01T00:00:00+01:00") },
10
+ ]);
8
11
  });
9
12
  test("getNextActiveMonth with 2 months", () => {
10
13
  expect((0, get_next_active_month_1.getNextActiveMonth)([