UNPKG

993 BJavaScriptView Raw
1"use client";
2
3import dayjsGenerateConfig from "rc-picker/es/generate/dayjs";
4import genPurePanel from '../_util/PurePanel';
5import generatePicker from './generatePicker';
6import { transPlacement2DropdownAlign } from './util';
7const DatePicker = generatePicker(dayjsGenerateConfig);
8function 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// We don't care debug panel
17/* istanbul ignore next */
18const PurePanel = genPurePanel(DatePicker, 'picker', null, postPureProps);
19DatePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
20const PureRangePanel = genPurePanel(DatePicker.RangePicker, 'picker', null, postPureProps);
21DatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = PureRangePanel;
22DatePicker.generatePicker = generatePicker;
23export default DatePicker;
\No newline at end of file