Open Siminn-teiturg opened 3 weeks ago
Hi @Siminn-teiturg , I couldn't recreate the issue you mentioned. Can you please try it in the official website playground - https://reactdatepicker.com/#example-input-time
I tried with the code you shared, but it's working as expected
() => {
const [startDate, setStartDate] = useState(new Date());
return (
<DatePicker
selected={startDate}
onChange={(date) => {
setStartDate(date);
}}
showTimeInput={true}
dateFormat="dd/MM/yyyy - HH:mm"
/>
);
};
If you still have the issue, please share the code
I already have a date and time selected. When I open the picker and start typing into the time input, the date will refresh and display the current date. I have a screen recording below to demonstrate.
https://github.com/Hacker0x01/react-datepicker/assets/84858035/9571ce7e-8723-4db8-8f81-4fc55d28353b