This commit is contained in:
Archer
2026-03-25 18:49:55 +08:00
committed by GitHub
parent 0ce410d742
commit 064b2ce65d
2 changed files with 116 additions and 71 deletions
@@ -136,23 +136,45 @@ const DateTimePicker = ({
top={`${position.top}px`}
left={`${position.left}px`}
zIndex={1500}
css={{
'--rdp-background-color': '#d6e8ff',
'--rdp-accent-color': '#0000ff'
}}
p={3}
>
<DayPicker
locale={zhCN}
mode="single"
defaultMonth={selectedDate}
selected={selectedDate}
disabled={disabled}
onSelect={(date) => {
setSelectedDate(date);
onChange?.(date);
setShowSelected(false);
<Box
sx={{
'.rdp-day_button:hover:not(:disabled)': {
backgroundColor: '#E1EAFF'
},
'.rdp-selected .rdp-day_button': {
backgroundColor: '#3370FF',
color: 'white',
border: 'none'
},
'.rdp-selected .rdp-day_button:hover': {
backgroundColor: '#2860E0'
},
'.rdp-button_previous:hover, .rdp-button_next:hover': {
backgroundColor: '#F0F4FF',
borderRadius: '6px'
}
}}
/>
>
<DayPicker
locale={zhCN}
mode="single"
style={
{
'--rdp-accent-color': '#3370FF'
} as React.CSSProperties
}
defaultMonth={selectedDate}
selected={selectedDate}
disabled={disabled}
onSelect={(date) => {
setSelectedDate(date);
onChange?.(date);
setShowSelected(false);
}}
/>
</Box>
</Card>
</Portal>
)}