I have no idea how to set, or if it is even possible to set default value on text (type date).
Here is my FormFactory:
$form->addText('category_priority', 'Prioritizovať do')
->setHtmlType('date')
->setDefaultValue( $date ) // select from db in format Y-m-d ('2020-12-01')
->setHtmlAttribute('class', 'add');
I tried changing formats, because meaby it wont take the original one with this, but no luck:
use Nette\Utils\DateTime;
$original = DateTime::from($priority);
$priority = $original->format('d. m. Y');
Did somebody encountered same problem?
Have you tried this: