feat: update demo about cell-render in date-picker (#43597)

This commit is contained in:
kiner-tang(文辉) 2023-07-17 12:18:41 +08:00 committed by GitHub
parent e825e781de
commit 9ddad8662a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,8 @@ const { RangePicker } = DatePicker;
const App: React.FC = () => (
<Space direction="vertical" size={12}>
<DatePicker
cellRender={(current) => {
cellRender={(current, info) => {
if (info.type !== 'date') return info.originNode;
const style: React.CSSProperties = {};
if (current.date() === 1) {
style.border = '1px solid #1677ff';
@ -20,7 +21,8 @@ const App: React.FC = () => (
}}
/>
<RangePicker
cellRender={(current) => {
cellRender={(current, info) => {
if (info.type !== 'date') return info.originNode;
const style: React.CSSProperties = {};
if (current.date() === 1) {
style.border = '1px solid #1677ff';