Slide 27
Slide 27 text
Week Form Type
Contributed by dFayet in #32061
$builder->add('startDateTime', WeekType::class, [
// use this if you store week numbers as strings ('2011-W17')
'input' => 'string',
// use this if you store week numbers as arrays (e.g. [2011, 17])
'input' => 'array',
// renders two to select the year and week number
'widget' => 'choice',
// renders two to write the year and week number
'widget' => 'text',
// renders a which is properly rendered by most browsers
'widget' => 'single_text',
]);
Form