title: How to use mulitple date time pickers in a form react native functional approach. I'm using three datetime picker to get input
body: <p>** 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**</p>
  <p>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</p>
  <pre><code>const handleConfirm = (date, event) =&gt; {
      hideDatePicker();
      console.log(&quot;event--------------&gt;&quot;, event);
      console.log(&quot;date--------------&gt;&quot;, date);
  
      event == 'startBid' ? startHandler(date) : event == 'endBid' ? endHandler(date) : event == 'bookingDate' ? BookingHandler(date) : null;
    }; 
  
   
    const showDatePicker = () =&gt; {
      clearImmediate();
      setDatePickerVisibility(true);
    };
  
    const hideDatePicker = () =&gt; {
      setDatePickerVisibility(false);
    };
  
  const startHandler = (date) =&gt; {
      console.log(&quot;startDate has been picked: &quot;, date);
    };  
   const endHandler = (date) =&gt; {
      console.log(&quot;endDate has been picked: &quot;, date);
    };
  
    const BookingHandler = (date) =&gt; {
      console.log(&quot;bookingDate has been picked: &quot;, date);
    };
        &lt;Button title='akljfdhaskj' onPress={showDatePicker} /&gt;
        
  &lt;Button title='akljfdhaskj' onPress={showDatePicker} /&gt;
  &lt;DateTimePickerModal
                        key={1}
                        isVisible={isDatePickerVisible}
                        mode=&quot;datetime&quot;
                        onChange={nyfyn}
                        onConfirm={date =&gt; {
                          handleConfirm(date, 'startBid')
                          console.log('startdate------&gt;')
                        }}
                        onCancel={hideDatePicker}
                      /&gt;
  
        &lt;Button title='124124124214' onPress={showDatePicker} /&gt;
      &lt;DateTimePickerModal
                        key={2}
                        isVisible={isDatePickerVisible}
                        mode=&quot;datetime&quot;
                        onConfirm={date =&gt; {
                          handleConfirm(date, 'endBid')
                          console.log('endBid-----------&gt;')
                        }}
                        onCancel={hideDatePicker}
                      /&gt;
    &lt;Button title='^o!!!@@@@@@!!!!!!!!!!!' onPress={showDatePicker}/&gt;
      &lt;DateTimePickerModal
                        key={3}
                        isVisible={isDatePickerVisible}
                        mode=&quot;datetime&quot;
                        onConfirm={date =&gt; {
                          handleConfirm(date, 'bookingDate')
                          console.log('bookingdate-----------&gt;')
                        }}
                        onCancel={hideDatePicker}
                      /&gt;
  
  </code></pre>