Add suppor for Date object as default for date field
I'm trying to set the DateTime object as param as default for the Form::date() helper, without success.
$date = new \DateTime('tomorrow');
{!! Form::date('date', 'Matches for date:', $date) !!}
Should we add suport for that?
Current workardound is $date->format('Y-m-d'), but should not.
Hi @str , is a good idea. But the package doesn't know the desired format to be applied to "stringify it". Do you have some suggestion?
The required format for the input[type=date] is 'Y-m-d'. The format to be shown to the user is selected by the browser depending on the user's locale.
Cool, thanks! I will implement this. I'm working in a new version (just refactoring the FormBuilder class) and I will add this (maybe available in 5 days.)
BTW, great project. I don't understand why aren't there any projects like this.