feat(ui): DatePicker - #323
Open
seong-hui wants to merge 5 commits into
Open
Conversation
- Discriminated Union 패턴으로 Single/Range Props 타입 분리 - DatepickerMode 타입을 상수 기반으로 정의 - 공통 상수(DAYS_OF_WEEK, MONTHS, DATEPICKER_MODE) 추가 - 날짜 유틸리티 함수(generateCalendarDates, isSameDate, formatDate, parseDateInput) 구현
- DatepickerContext로 전역 상태 관리 - useDatepickerState Hook으로 단일/범위 모드 상태 로직 분리 - 입력 텍스트 파싱 및 유효성 검증 처리 - Portal 위치 계산 및 관리 로직 구현
- DatepickerInput: 단일/범위 입력 필드 및 아이콘 처리 - DatepickerModal: Portal 기반 모달 및 뷰 전환 로직 - DatepickerDayView: 일별 캘린더 그리드 및 범위 선택 UI - DatepickerMonthView: 월 선택 그리드 뷰 - DatepickerHeader: 네비게이션 헤더 컴포넌트
- Datepicker 메인 컴포넌트 통합 - Public API export(DatePicker, DatepickerProps, SingleDatepickerProps, RangeDatepickerProps, DatepickerMode) - Storybook 스토리 추가
|
j-nary
reviewed
Dec 28, 2025
Comment on lines
+124
to
+127
| useEffect(() => { | ||
| if ('startDate' in args) setStartDate(toDateOrNull(args.startDate)); | ||
| if ('endDate' in args) setEndDate(toDateOrNull(args.endDate)); | ||
| }, [args]); |
Member
There was a problem hiding this comment.
useEffect 없이 동작할 수 있어야할 것 같아요! startDate, endDate prop 만으로!
namdaeun
approved these changes
Dec 28, 2025
| export function useDatepickerContext() { | ||
| const context = useContext(DatepickerContext); | ||
| if (!context) { | ||
| throw new Error('useDatepickerContext must be used within DatepickerContext.Provider'); |
Member
There was a problem hiding this comment.
다른 컴포넌트 에러 메시지에 맞게 문구 수정해주시면 좋을 것 같습니다!
Comment on lines
+14
to
+24
| function DatepickerHeader({ | ||
| title, | ||
| onTitleClick, | ||
| onPrevClick, | ||
| onNextClick, | ||
| isPrevDisabled = false, | ||
| isNextDisabled = false, | ||
| showTitleIcon = false, | ||
| }: DatepickerHeaderProps): JSX.Element { | ||
| return ( | ||
| <div className={S.navigation}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경사항
단일/범위 날짜 선택을 지원하는 Datepicker 컴포넌트를 구현했습니다.
주요 기능
링크
시급한 정도
🏃♂️ 보통 : 최대한 빠르게 리뷰 부탁드립니다.
기타 사항