import _extends from "@babel/runtime-corejs3/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import { DateTimePicker } from '@material-ui/pickers';

const DateField = (_ref) => {
  let {
    value,
    onChange
  } = _ref,
      otherProps = _objectWithoutPropertiesLoose(_ref, ["value", "onChange"]);

  return /*#__PURE__*/React.createElement(DateTimePicker, _extends({
    fullWidth: true,
    variant: "inline",
    inputVariant: "outlined",
    margin: "normal",
    value: value,
    onChange: date => date === undefined ? onChange() : onChange(date.toISOString())
  }, otherProps));
};

export default DateField;
//# sourceMappingURL=DateTimeField.js.map