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

jbowman99's avatar

Having browser issues with Date input

I have a form with a date input:

|| {!! Form::label('published_at', 'Publish On:') !!} {!! Form::input('date', 'published_at', date('m/d/Y'), ['class' => 'form-control']) !!} ||

in Firefox when i go to Update/Edit an Article the Publish On date is pre-populated with whatever was entered during the create phase.

Chrome inserts a datepicker function which is neat, but the date field does not have the Publish On date pre-populated?

how would i go about having this field pre-populated with the created Publish On date?

set and getAttribute functions?

0 likes
1 reply
ohffs's avatar

I gave up on using the date input type for now - there seem to be a lot of cross-browser issues. I just went back to a javascript picker :-/

Please or to participate in this conversation.