mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
16 lines
No EOL
474 B
TypeScript
16 lines
No EOL
474 B
TypeScript
import { HTMLProps } from "react";
|
|
import { HumanDate } from "../HumanDate";
|
|
import { Editable } from "./Editable";
|
|
|
|
export function EditableDateTimeLocal(props: HTMLProps<HTMLInputElement> & { value: Date }) {
|
|
return (
|
|
<Editable
|
|
editing={
|
|
<input type="datetime-local" {...props} value={props.value.toISOString()} />
|
|
}
|
|
preview={
|
|
<HumanDate date={props.value} />
|
|
}
|
|
/>
|
|
)
|
|
} |