Merge pull request #6644 from hy993658052/feature-Calendar-fix

fix: 修复日历样式和排序bug
This commit is contained in:
qkiroc 2023-04-20 10:57:57 +08:00 committed by GitHub
commit f6c8140f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

View File

@ -41,6 +41,7 @@
background: transparent;
color: var(--Calendar-color);
> span {
color: var(--Calendar-color) !important;
background: transparent !important;
}
}

View File

@ -779,7 +779,9 @@ td.rdtQuarter {
.#{$ns}DateCalendar {
display: inline-block;
border: var(--DatePicker-borderWidth) solid var(--DatePicker-borderColor);
border-width: var(--DatePicker-borderWidth);
border-style: var(--DatePicker-borderStyle);
border-color: var(--DatePicker-borderColor);
background: var(--DatePicker-bg);
border-radius: var(--DatePicker-borderRadius);
}

View File

@ -451,7 +451,7 @@ export class CustomDaysView extends React.Component<CustomDaysViewProps> {
(item: any) => item.height === undefined
);
}
if (tempIndex > -1 && tempIndex !== i) {
if (tempIndex > -1 && tempIndex !== i && showSchedule[i]) {
let temp = showSchedule[i];
showSchedule[i] = showSchedule[tempIndex];
showSchedule[tempIndex] = temp;
@ -518,13 +518,13 @@ export class CustomDaysView extends React.Component<CustomDaysViewProps> {
// 正常模式
const ScheduleIcon = (
<span
<div
className={cx('ScheduleCalendar-icon', schedule[0].className)}
onClick={() =>
this.props.onScheduleClick &&
this.props.onScheduleClick(scheduleData)
}
></span>
></div>
);
return (
<td {...injectedProps}>

View File

@ -241,7 +241,7 @@ exports[`Renderer:calendar 1`] = `
>
<span>
11
<span
<div
class="cxd-ScheduleCalendar-icon bg-warning"
/>
</span>
@ -328,7 +328,7 @@ exports[`Renderer:calendar 1`] = `
>
<span>
21
<span
<div
class="cxd-ScheduleCalendar-icon bg-danger"
/>
</span>
@ -339,7 +339,7 @@ exports[`Renderer:calendar 1`] = `
>
<span>
22
<span
<div
class="cxd-ScheduleCalendar-icon bg-danger"
/>
</span>
@ -1407,7 +1407,7 @@ exports[`Renderer:calendar scheduleAction 1`] = `
>
<span>
11
<span
<div
class="cxd-ScheduleCalendar-icon bg-warning"
/>
</span>
@ -1494,7 +1494,7 @@ exports[`Renderer:calendar scheduleAction 1`] = `
>
<span>
21
<span
<div
class="cxd-ScheduleCalendar-icon bg-danger"
/>
</span>
@ -1505,7 +1505,7 @@ exports[`Renderer:calendar scheduleAction 1`] = `
>
<span>
22
<span
<div
class="cxd-ScheduleCalendar-icon bg-danger"
/>
</span>