CalendarSection - FE14-Part4-Team5/reser-on-do GitHub Wiki

CalendarSection

μ˜ˆμ•½ κ°€λŠ₯ν•œ λ‚ μ§œλ₯Ό ν‘œμ‹œν•˜κ³ , μ‚¬μš©μžκ°€ λ‚ μ§œλ₯Ό 선택할 수 μžˆλ„λ‘ λ„μ™€μ£ΌλŠ” μΊ˜λ¦°λ” UI μ»΄ν¬λ„ŒνŠΈμž…λ‹ˆλ‹€.
react-calendar 라이브러리λ₯Ό 기반으둜 ν•˜λ©°, μ˜ˆμ•½ κ°€λŠ₯ν•œ λ‚ μ§œμ—λŠ” μŠ€νƒ€μΌμ΄ λ³„λ„λ‘œ μ μš©λ©λ‹ˆλ‹€.


βœ… Props

이름 νƒ€μž… ν•„μˆ˜ μ„€λͺ…
selectedDate Date | null βœ… ν˜„μž¬ μ„ νƒλœ λ‚ μ§œ
onChange (date: Date) => void βœ… λ‚ μ§œ 선택 μ‹œ ν˜ΈμΆœλ˜λŠ” 콜백 ν•¨μˆ˜
scheduledDates Set<string> βœ… μ˜ˆμ•½ κ°€λŠ₯ν•œ λ‚ μ§œ λͺ©λ‘ (YYYY-MM-DD ν˜•μ‹ λ¬Έμžμ—΄)

πŸ”„ λ™μž‘ 방식

  • react-calendar 라이브러리λ₯Ό μ‚¬μš©ν•˜μ—¬ 달λ ₯을 ν‘œμ‹œν•©λ‹ˆλ‹€.
  • selectedDate 값에 따라 ν˜„μž¬ μ„ νƒλœ λ‚ μ§œκ°€ κ°•μ‘°λ©λ‹ˆλ‹€.
  • scheduledDates에 ν¬ν•¨λœ λ‚ μ§œλŠ” .scheduledDate 클래슀λ₯Ό 톡해 κ°•μ‘°λ©λ‹ˆλ‹€.
  • μš”μΌ 라벨은 "S", "M", "T", "W", "T", "F", "S" ν˜•μ‹μœΌλ‘œ ν‘œμ‹œλ©λ‹ˆλ‹€.

🎨 μŠ€νƒ€μΌ

  • λ°˜μ‘ν˜• μŠ€νƒ€μΌ
    768px, 1200px κΈ°μ€€μœΌλ‘œ λ―Έλ””μ–΄ 쿼리λ₯Ό μ μš©ν•˜μ—¬ UI ꡬ쑰 및 μ—¬λ°± 등이 λ‹¬λΌμ§‘λ‹ˆλ‹€.

🧾 μ‚¬μš© μ˜ˆμ‹œ

<CalendarSection
  selectedDate={new Date('2025-06-08')}
  onChange={handleDateChange}}
  scheduledDates={new Set(['2025-06-08', '2025-06-11', '2025-06-20'])}
/>
⚠️ **GitHub.com Fallback** ⚠️