Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
I can't get $event from a js function - React Date Picker

im using this library https://github.com/hypeserver/react-date-range

I want that when I click on a single day, it captures this event. I tried this but throws a DatePicker error. If I change the order of the parameters, the errors don't appear, but the console.log throws "undefined"

 const handleDatesChange = (e, date) => {
        console.log(e);  // here i'm getting "undefined"
        ...
      };



         <DateRangePicker
            preventSnapRefocus
            showPreview
            showSelectionPreview
            direction="horizontal"
            minDate={new Date()}
            monthDisplayFormat="MMMM yyyy"
            months={2}
            ranges={calendarDates}
            retainEndDateOnFirstSelection={false}
            showDateDisplay={false}
            showMonthAndYearPickers={false}
            weekdayDisplayFormat="EEEEEE"
            onChange={($event, item) => handleDatesChange($event, [item.selection])}
          />
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!