Skip to content

Commit

Permalink
🐛 Fikset tastaturnavigasjon i monthpicker (#2374)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Oct 16, 2023
1 parent 6b2547c commit 4bc4dea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-ways-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@navikt/ds-react": patch
---

MonthPicker: Fikset tastaturnavigasjon
4 changes: 2 additions & 2 deletions @navikt/core/react/src/date/monthpicker/MonthButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import cl from "clsx";
import format from "date-fns/format";
import isSameMonth from "date-fns/isSameMonth";
import compareAsc from "date-fns/compareAsc";
import compareDesc from "date-fns/compareDesc";
import format from "date-fns/format";
import isSameMonth from "date-fns/isSameMonth";
import setYear from "date-fns/setYear";
import React, { useEffect, useRef } from "react";
import { useDayPicker } from "react-day-picker";
Expand Down
4 changes: 2 additions & 2 deletions @navikt/core/react/src/date/monthpicker/MonthSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export const MonthSelector = () => {
return (
<BodyShort as="table" className="rdp-table">
<tbody className="rdp-tbody">
{tableMonths.map((months, i) => (
{tableMonths.map((tableRow, i) => (
<tr className="rdp-row" key={i}>
{months.map((month: Date) => {
{tableRow.map((month: Date) => {
return (
<td key={month.toDateString()} className="rdp-cell">
<MonthButton
Expand Down

0 comments on commit 4bc4dea

Please sign in to comment.