Skip to content

Commit 512bb83

Browse files
authored
[Refector Style] 마감일 달력 팝업 CSS 커스텀
[Refector Style] 마감일 달력 팝업 CSS 커스텀
2 parents 91d007c + a11a801 commit 512bb83

File tree

2 files changed

+47
-5
lines changed

2 files changed

+47
-5
lines changed

src/components/modalInput/ModalInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export default function ModalInput({
163163
dateFormat="yyyy-MM-dd HH:mm"
164164
placeholderText="날짜를 입력해 주세요"
165165
className="w-full h-full text-black3 text-[14px] sm:text-[16px] font:normal outline-none bg-transparent"
166+
calendarClassName="text-[14px]"
166167
popperPlacement="bottom-start"
167168
popperContainer={({ children }) => <div>{children}</div>}
168169
popperClassName="custom-datepicker-popper"

src/styles/globals.css

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,6 @@
319319
font-display: swap;
320320
}
321321

322-
.custom-datepicker-popper {
323-
transform: translateX(-10px) !important;
324-
transform: translateY(50px) !important;
325-
}
326-
327322
/* 스크롤바 숨기기용 유틸리티 */
328323
.scrollbar-hidden {
329324
-ms-overflow-style: none; /* IE & Edge */
@@ -332,3 +327,49 @@
332327
.scrollbar-hidden::-webkit-scrollbar {
333328
display: none; /* Chrome, Safari */
334329
}
330+
331+
.custom-datepicker-popper {
332+
transform: translateX(-10px) !important;
333+
transform: translateY(50px) !important;
334+
}
335+
336+
@media (max-width: 640px) {
337+
.custom-datepicker-popper {
338+
font-size: 8px !important;
339+
}
340+
341+
/*시간 선택 컨테이너 폭 조절 */
342+
.custom-datepicker-popper .react-datepicker__time-container {
343+
width: 45px !important;
344+
}
345+
346+
/* 시간 리스트 영역 크기와 정렬 보정 */
347+
.custom-datepicker-popper .react-datepicker__time {
348+
width: 50px !important;
349+
}
350+
351+
.custom-datepicker-popper .react-datepicker__time-box {
352+
width: 100% !important;
353+
}
354+
355+
.custom-datepicker-popper .react-datepicker__time-list {
356+
padding: 2px !important;
357+
line-height: 1.2 !important;
358+
width: 100% !important;
359+
text-align: left !important;
360+
}
361+
362+
.custom-datepicker-popper .react-datepicker__time-list-item {
363+
font-size: 10px !important;
364+
padding: 2px 4px !important;
365+
height: auto !important;
366+
word-break: keep-all !important;
367+
}
368+
369+
/*선택된 항목도 작게 & 잘림 방지 */
370+
.custom-datepicker-popper .react-datepicker__time-list-item--selected {
371+
font-size: 8px !important;
372+
padding: 2px 4px !important;
373+
border-radius: 4px !important;
374+
}
375+
}

0 commit comments

Comments
 (0)