import React, { useState } from 'react';
import DatePicker from "react-datepicker";

const Datepickerhooks = () => {
    const [currentDate, setCurrentDate] = useState(new Date());

    return (
        <div>
            <DatePicker selected={currentDate} onChange={date => setCurrentDate(date)} />
	    current date: {currentDate.toString()}
        </div>
    );
};

export default Datepickerhooks;
