Files
operationSystem-front/src/components/common/Date/DateRangePicker.js
bcjang 4407fdc6b6 컴포넌트 관련 변경
이미지 업로드 한글명칭 불가 처리
유저 조회 부분 수정
2025-09-15 16:37:46 +09:00

29 lines
588 B
JavaScript

import { DatePicker } from 'antd';
import dayjs from 'dayjs';
const { RangePicker } = DatePicker;
const DateRangePicker = ({
value,
onChange,
format,
showTime = true,
size = 'middle',
...props
}) => {
return (
<RangePicker
showTime={showTime}
value={value ? [dayjs(value[0]), dayjs(value[1])] : [null, null]}
format={format || 'YYYY-MM-DD HH:mm:ss'}
onChange={onChange}
placeholder={['시작 일시', '종료 일시']}
size={size}
allowClear={false}
{...props}
/>
);
};
export default DateRangePicker;