title: Time and Date picker (Javascript/PHP)
body: <p>I'm desperately in need of a way to implement a day and time picker using either PHP or Javascript or both.</p>
  
  <p>The first HTML Select Input will have Today and Tomorrow (with Today selected as default on page load).
  The second HTML Select Input will have time listed with interval of 30mins.
  The time displayed should be relative to the current time i.e if current time is 15:00 then don't display anything before that e.g 14:00.
  If user selects tomorrow, then all the times should be shown.</p>
  
  <p>This is my code so far:</p>
  
  <pre><code>&lt;div class="select-wrapper"&gt;
      &lt;select class="form-control" id="" name="" required&gt;
          &lt;option value="0" selected&gt;ASAP&lt;/option&gt;
          &lt;?php
          for($hours=$new_time; $hours&lt;23; $hours++) // the interval for hours is '1'
              for($mins=0; $mins&lt;60; $mins+=30) // the interval for mins is '30'
                  echo '&lt;option 
               value='.$hours.$mins.'&gt;'.str_pad($hours,2,'0',STR_PAD_LEFT).':'
                  .str_pad($mins,2,'0',STR_PAD_LEFT).'&lt;/option&gt;';
          ?&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My code loops through time from 10:00 to 23:00 and lists them as options.
  Any help will be greatly appreciated.</p>
  
  <p>Example = <a href="https://deliveroo.co.uk/" rel="nofollow noreferrer">https://deliveroo.co.uk/</a></p>