更新时间:2023-02-15 15:41:04
你应该使用 格式选项,它接受HTML5 DateTime 格式.
You should use the format option which accepts HTML5 DateTime format.
$builder->add(
'beginDate',
'datetime',
array(
'widget' => 'single_text',
'format' => 'yyyy-MM-dd HH:mm'
)
)
当使用 widget = single_text
时,应该使用 format
选项而不是 date_format
.
The format
option should be used instead of date_format
when using widget = single_text
.