63 lines
1.8 KiB
JavaScript
63 lines
1.8 KiB
JavaScript
|
|
import {DatePicProd as DatePicProdLibrary}from"../../../ownLib/my-ui-lib"
|
|
export const DatePicProd = DatePicProdLibrary
|
|
|
|
// import { DatePicker, Space } from 'antd';
|
|
// import dayjs from 'dayjs';
|
|
// import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
|
|
// dayjs.extend(customParseFormat);
|
|
|
|
// export const DatePicProd = ({
|
|
// onChange,
|
|
// canSelectPast,
|
|
// valueData,
|
|
// disabled,
|
|
// cancelFuture,
|
|
// minDate,
|
|
// dontallowfeature,
|
|
// }) => {
|
|
// const disabledDate = (current) => {
|
|
// var date = new Date();
|
|
// date.setDate(date.getDate() + 1);
|
|
// return current.valueOf() <= date.setDate(date.getDate() - 2);
|
|
// };
|
|
|
|
// const disabledFutureDate = (current) => {
|
|
// // Can not select days before today and today
|
|
// return current && current > dayjs().endOf('day');
|
|
// };
|
|
// const disabledMinDate = (current) => {
|
|
// if (minDate) {
|
|
// return (
|
|
// current &&
|
|
// current < dayjs(minDate, 'YYYY-MM-DDTHH:mm:ss').startOf('day')
|
|
// );
|
|
// }
|
|
// return false;
|
|
// };
|
|
|
|
// return (
|
|
// <Space direction="vertical">
|
|
// <DatePicker
|
|
// format="DD-MM-YYYY"
|
|
// value={valueData ? dayjs(valueData, 'YYYY-MM-DDTHH:mm:ss') : ''}
|
|
// disabledDate={(current) => {
|
|
// if (dontallowfeature) {
|
|
// return current && current > dayjs().endOf('day');
|
|
// } else if (canSelectPast) {
|
|
// if (cancelFuture) {
|
|
// return disabledFutureDate(current) || disabledMinDate(current);
|
|
// }
|
|
// return disabledMinDate(current);
|
|
// }
|
|
// return disabledDate(current) || disabledMinDate(current);
|
|
// }}
|
|
// disabled={disabled}
|
|
// onChange={onChange}
|
|
// inputReadOnly={true}
|
|
// />
|
|
// </Space>
|
|
// );
|
|
// };
|