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

eagle_arg's avatar

input date best way to do it

Hi, Today I realize that only chrome supports the input type = date... What is the best way to make an input date? I know that can be achieved with jquery, but exists an easier way?

This is the way that I'm doing it, only works in chrome:

{!! Form::input('date','date_control', null,['class' => 'form-control']) !!}

Thanks =) 
0 likes
4 replies
deadlockgB's avatar
Level 3

1.) the <inut type="date" /> is much more ciompatible then just chrome: http://caniuse.com/#feat=input-datetime

2.) you could use a datepicker component that falls back to the <input type="date" /> when supported. There are plenty of them out there in the web (bootstrap, jQuery, etc.)

Please or to participate in this conversation.