import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _DatePicker from "@alifd/next/es/date-picker2";
var _excluded = ["type", "style", "disabled", "placeholder", "defaultValue", "value", "size", "label", "hasClear", "followTrigger"];
import * as React from 'react';
import dayjs from 'dayjs';
var RangePicker = _DatePicker.RangePicker;

// const defaultVal = "2020-02-02";
var defaultRangeVal = ["2020-01-01", "2020-02-02"];
function customizeFormatter(v) {
  return "DATE: " + v.format("YYYY/MM/DD");
}
var RangePreset = {
  '今天': [dayjs(), dayjs()],
  '本月': [dayjs().startOf('month'), dayjs().endOf('month')]
};
var RangePickerName = function RangePickerName(_ref) {
  var type = _ref.type,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    disabled = _ref.disabled,
    placeholder = _ref.placeholder,
    defaultValue = _ref.defaultValue,
    value = _ref.value,
    size = _ref.size,
    label = _ref.label,
    hasClear = _ref.hasClear,
    followTrigger = _ref.followTrigger,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var _style = style || {};
  var _otherProps = otherProps || {};
  _otherProps.style = _style;
  return /*#__PURE__*/React.createElement(_DatePicker, _extends({
    className: style.DatePicker2,
    popupClassName: "datesty",
    label: label,
    disabled: disabled,
    placeholder: placeholder,
    hasClear: hasClear,
    value: value,
    showTime: true
  }, otherProps, {
    size: size,
    defaultValue: defaultValue,
    format: "YYYY/MM/DD HH:mm:ss"
  }));
};
RangePickerName.displayName = 'RangePickerName';
export default RangePickerName;