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

169
Views
How to use mulitple date time pickers in a form react native functional approach. I'm using three datetime picker to get input

** I'm react learning react native when I'm selecting start time it shows booking time like that the time is not matching In three pickers two only working**

And the values are mismatching when selecting another picker component I cant find where the error occurs i've tried consolling step by step but got nothing

const handleConfirm = (date, event) => {
    hideDatePicker();
    console.log("event-------------->", event);
    console.log("date-------------->", date);

    event == 'startBid' ? startHandler(date) : event == 'endBid' ? endHandler(date) : event == 'bookingDate' ? BookingHandler(date) : null;
  }; 

 
  const showDatePicker = () => {
    clearImmediate();
    setDatePickerVisibility(true);
  };

  const hideDatePicker = () => {
    setDatePickerVisibility(false);
  };

const startHandler = (date) => {
    console.log("startDate has been picked: ", date);
  };  
 const endHandler = (date) => {
    console.log("endDate has been picked: ", date);
  };

  const BookingHandler = (date) => {
    console.log("bookingDate has been picked: ", date);
  };
      <Button title='akljfdhaskj' onPress={showDatePicker} />
      
<Button title='akljfdhaskj' onPress={showDatePicker} />
<DateTimePickerModal
                      key={1}
                      isVisible={isDatePickerVisible}
                      mode="datetime"
                      onChange={nyfyn}
                      onConfirm={date => {
                        handleConfirm(date, 'startBid')
                        console.log('startdate------>')
                      }}
                      onCancel={hideDatePicker}
                    />

      <Button title='124124124214' onPress={showDatePicker} />
    <DateTimePickerModal
                      key={2}
                      isVisible={isDatePickerVisible}
                      mode="datetime"
                      onConfirm={date => {
                        handleConfirm(date, 'endBid')
                        console.log('endBid----------->')
                      }}
                      onCancel={hideDatePicker}
                    />
  <Button title='^o!!!@@@@@@!!!!!!!!!!!' onPress={showDatePicker}/>
    <DateTimePickerModal
                      key={3}
                      isVisible={isDatePickerVisible}
                      mode="datetime"
                      onConfirm={date => {
                        handleConfirm(date, 'bookingDate')
                        console.log('bookingdate----------->')
                      }}
                      onCancel={hideDatePicker}
                    />

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!