title: React Select Use State to set two different values
body: <pre><code>    import React from 'react'
      import {useState} from 'react'
      
      const SlctForm = () =&gt; {
       const [empHrs, setEmpMonHrs] = useState({
           day: null,
           start: null,
           end: null
       })
      
       const onHrChange = (event) =&gt; {
           setEmpHrs({
               day: event.target.name,
               start: event.target.value,
               end: event.target.value
           })
      
       }
      
          return (
              &lt;div&gt;
                  &lt;form&gt;
                  &lt;select name='monday' onChange={onHrChange}&gt;
                      &lt;option value={7}&gt;7&lt;/option&gt;
                      &lt;option value={9}&gt;9&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;select name='monday' onChange={onHrChange}&gt;
                      &lt;option value={7}&gt;7&lt;/option&gt;
                      &lt;option value={9}&gt;9&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;select name='tuesday' onChange={onHrChange}&gt;
                      &lt;option value={7}&gt;7&lt;/option&gt;
                      &lt;option value={9}&gt;9&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;select name='tuesday' onChange={onHrChange}&gt;
                      &lt;option value={7}&gt;7&lt;/option&gt;
                      &lt;option value={9}&gt;9&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;/form&gt;
      
              &lt;/div&gt;
          )
      }
    
   export default SlctForm
  </code></pre>
  <p>I am trying to create an array with objects, those objects should contain the weekday, start, and end time of each day. I think it would be best to use select to accomplish this. I can't seem to find anything that shows me how to set two different values for the same object. Can someone give me some direction here?</p>