import { createElement } from "react";
import { toISOString, toDatetimeString, DateTimeInput } from "@contember/ui";
import { useFieldControl } from "./useFieldControl.js";
import { SimpleRelativeSingleField } from "../auxiliary/SimpleRelativeSingleField/SimpleRelativeSingleField.js";
const DateTimeField = SimpleRelativeSingleField((fieldMetadata, props) => {
  const inputProps = useFieldControl({
    ...props,
    fieldMetadata,
    parse: toISOString,
    format: toDatetimeString
  });
  return /* @__PURE__ */ createElement(DateTimeInput, {
    ...inputProps
  });
}, "DateTimeField");
export { DateTimeField };
//# sourceMappingURL=DateTimeField.js.map
