You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
974 B
39 lines
974 B
import { DatePicker, Space } from 'antd';
|
|
import React from 'react';
|
|
|
|
const { RangePicker } = DatePicker;
|
|
|
|
const App: React.FC = () => (
|
|
<Space direction="vertical" size={12}>
|
|
<DatePicker
|
|
cellRender={(current) => {
|
|
const style: React.CSSProperties = {};
|
|
if (current.date() === 1) {
|
|
style.border = '1px solid #1677ff';
|
|
style.borderRadius = '50%';
|
|
}
|
|
return (
|
|
<div className="ant-picker-cell-inner" style={style}>
|
|
{current.date()}
|
|
</div>
|
|
);
|
|
}}
|
|
/>
|
|
<RangePicker
|
|
cellRender={(current) => {
|
|
const style: React.CSSProperties = {};
|
|
if (current.date() === 1) {
|
|
style.border = '1px solid #1677ff';
|
|
style.borderRadius = '50%';
|
|
}
|
|
return (
|
|
<div className="ant-picker-cell-inner" style={style}>
|
|
{current.date()}
|
|
</div>
|
|
);
|
|
}}
|
|
/>
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|
|
|