mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
feat: update demo about cell-render in date-picker (#43597)
This commit is contained in:
parent
e825e781de
commit
9ddad8662a
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user