1 | "use client";
|
2 |
|
3 | import dayjsGenerateConfig from "rc-picker/es/generate/dayjs";
|
4 | import genPurePanel from '../_util/PurePanel';
|
5 | import generatePicker from './generatePicker';
|
6 | import { transPlacement2DropdownAlign } from './util';
|
7 | const DatePicker = generatePicker(dayjsGenerateConfig);
|
8 | function postPureProps(props) {
|
9 | const dropdownAlign = transPlacement2DropdownAlign(props.direction, props.placement);
|
10 | dropdownAlign.overflow.adjustY = false;
|
11 | dropdownAlign.overflow.adjustX = false;
|
12 | return Object.assign(Object.assign({}, props), {
|
13 | dropdownAlign
|
14 | });
|
15 | }
|
16 |
|
17 |
|
18 | const PurePanel = genPurePanel(DatePicker, 'picker', null, postPureProps);
|
19 | DatePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
20 | const PureRangePanel = genPurePanel(DatePicker.RangePicker, 'picker', null, postPureProps);
|
21 | DatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = PureRangePanel;
|
22 | DatePicker.generatePicker = generatePicker;
|
23 | export default DatePicker; |
\ | No newline at end of file |