Closed TreyOverton closed 6 years ago
@AaronOverton
you should use date function like this
date('Y-m-d', time())
Reference: http://php.net/manual/en/function.date.php
$tab->createOption([
'name' => 'Report Date',
'id' => 'hidden-report-date',
'type' => 'date',
'default' => date('Y-m-d', time())
]);
This pull request has the support for that date format default input with a couple of other update. https://github.com/gambitph/Titan-Framework/pull/410
@tojibon Can you resubmit the PR for the date issue only?
This works:
This does not:
Documentation example is
'default' => '2010-12-20',
, found here: http://www.titanframework.net/docs/date/Using the documented technique for a default always produces a date of 1970-01-01 (timestamp 0).