-
react-day-picker 에서 한글화 시키기 (feat. date-fns)FrontEnd/React.js 2024. 9. 4. 17:00
react-day-picker/DayPicker는 위 사진처럼 디폴트가 영어
이것에 대해 각 나라별 언어를 호환할려면 date-fns/locale을 사용하면 됨 (https://daypicker.dev/docs/translation#aria-labels)
import { DayPicker } from "react-day-picker"; import { ko } from "date-fns/locale"; <DayPicker locale={ko} .... />
간단한 옵션 추가로 아래와 같이 한글화로 매핑됨
'FrontEnd > React.js' 카테고리의 다른 글
[React] 카카오 api를 통해 주소를 좌표로 변환해보기 (undefinded Geocorder) (1) 2024.09.06 custom Infinite Scrolling hooks (with tanstack Query in Next.js) (3) 2024.09.03 webpack과 babel (feat. CRA) (1) 2024.01.11 [React] 기술 면접 대비 리액트 용어 모음 (0) 2023.11.06 아임포트 결제 로직 (0) 2023.08.23