date and time picker react code example
Example 1: date time react component
import React, { useState } from 'react';
import DateTimePicker from 'react-datetime-picker';
function MyApp() {
const [value, onChange] = useState(new Date());
return (
<div>
<DateTimePicker
onChange={onChange}
value={value}
/>
</div>
);
}
Example 2: react time picker
npm i react-time-picker