I am not very good at handling Javascript Time.
Here's what I'm trying to do: I have a user interface that needs a drop-down list of the final time. Its final set of times is essentially from 7:00 to 22:00 in increments of 15 minutes. I use jQuery and want to create an “Select” field on the fly that looks like this:
<select>
<option value="420">7:00 AM</option>
<option value="435">7:15 AM</option>
<option value="450">7:30 AM</option>
etc...
</select>
Does anyone know how to do this in javascript / jQuery. I want to do something dynamic:
for(int i = 420; i<=1320; i+=15){
//use value of i to increment a date or something and create an option for the drop down... this is where I am stuck
}
source
share