Skip to content

Commit

Permalink
Disable day <button> if isEmpty, reset pointer CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Apr 29, 2024
1 parent efbcf60 commit 6bb039a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/date-picker/src/MonthCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default function MonthCalendar({
},
)}
data-date={date?.toISOString()}
disabled={isEmpty}
key={`MonthDayItem-${dayNumber}`}
onClick={handleClickDay}
onMouseEnter={handleMouseEnterDay}
Expand Down
4 changes: 4 additions & 0 deletions packages/date-picker/src/styles/month-calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ h3.${ROOT_CLASS_NAME}-month-title-text {
background-color: transparent;
}
.${ROOT_CLASS_NAME}-month-day-item:disabled {
cursor: auto;
}
.${ROOT_CLASS_NAME}-month-day-item.is-selected {
background-color: #f8f8f8;
}
Expand Down

0 comments on commit 6bb039a

Please sign in to comment.