Jump to content

filter that takes into account the day of departure and time


SimRacer

Recommended Posts

Good morning!

I ask for your help to create a filter that takes into account the day of departure and time!

In the form will state:

1. day (Monday to Sunday)

2. time (from 00:00 to 23:00 at an interval of 1 hour)

Time search is desired to produce a range of + / - 3 hours

Please help.

I add some html code into schedule_searchform.tpl:

<li><a href="#nearest"><span>By date and time</span></a></li>

and

<div id="nearest">
<p>Choose day:</p>
<select id="nearestday" name="nearestday">
<option value="">Выбрать</option>
<option value="nearestday0">Mon</option>
<option value="nearestday1">Tue</option>
<option value="nearestday2">Wed</option>
<option value="nearestday3">Thu</option>
<option value="nearestday4">Fri</option>
<option value="nearestday5">Sun</option>
<option value="nearestday6">Sut</option>
</select>
<p>Choose time:</p>
<select id="nearesttime" name="nearesttime">
<option value="nearesttime00">00:00</option>
<option value="nearesttime01">01:00</option>
<option value="nearesttime02">02:00</option>
<option value="nearesttime03">03:00</option>
<option value="nearesttime04">04:00</option>
<option value="nearesttime05">05:00</option>
<option value="nearesttime06">06:00</option>
<option value="nearesttime07">07:00</option>
<option value="nearesttime08">08:00</option>
<option value="nearesttime09">09:00</option>
<option value="nearesttime10">10:00</option>
<option value="nearesttime11">11:00</option>
<option value="nearesttime12">12:00</option>
<option value="nearesttime13">13:00</option>
<option value="nearesttime14">14:00</option>
<option value="nearesttime15">15:00</option>
<option value="nearesttime16">16:00</option>
<option value="nearesttime17">17:00</option>
<option value="nearesttime18">18:00</option>
<option value="nearesttime19">19:00</option>
<option value="nearesttime20">20:00</option>
<option value="nearesttime21">21:00</option>
<option value="nearesttime22">22:00</option>
<option value="nearesttime23">23:00</option>
</select>
<br><br>
<input type="submit" name="submit" value="Find" /></div>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...