33 lines
No EOL
843 B
TypeScript
33 lines
No EOL
843 B
TypeScript
import React from 'react';
|
|
import { format } from "@formkit/tempo";
|
|
import styles from "./TimeEvent.module.css";
|
|
|
|
|
|
interface TimeEventProps {
|
|
title: string;
|
|
|
|
}
|
|
|
|
const TimeEvent: React.FC<TimeEventProps> = ({title}) => {
|
|
const date = new Date();
|
|
|
|
return (
|
|
<div className={styles.timeEvent}>
|
|
<h2 className={styles.title}>{title}</h2>
|
|
<div className={styles.datetime}>
|
|
<input
|
|
className={styles.inputDate}
|
|
type='date'
|
|
placeholder={format(date, "MM/DD/YYYY")}
|
|
/>
|
|
<input
|
|
className={styles.inputTime}
|
|
type='time'
|
|
placeholder={format(date, "HH:mm")}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default TimeEvent; |