Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Asmaa.muhammed's avatar

15 minutes intervals for input time

I am looking at having a time picker What I want is minutes to only show 15 min intervals. So 00, 15, 30 and 45.

How I can do this?

<td>
 <input type="time" id="day_time_end" name="day_time_end[]" min="05:00" max="00:00" step="00:15" required >
    @if ($errors->has("day_time_end.*"))
     <span class="form-text text-danger">{{$errors->first('day_time_end.*')}}</span>
    @endif
</td>
0 likes
3 replies
wingly's avatar
wingly
Best Answer
Level 29

Your step attribute is the one that should do the job but the attribute accepts seconds as value so something like step="900"

1 like
Asmaa.muhammed's avatar

how can I validate this field to accept only hour with 00, 15, 30 and 45 minutes?

Snapey's avatar

different question. Did @wingly advice solve your issue? If so, mark it best answer

Please or to participate in this conversation.