Fix DateTimeType by adding missing default options

This commit is contained in:
Michel Weimerskirch 2011-04-26 14:21:00 +02:00
parent b80bb9c7ab
commit 87c609b4a4

View File

@ -110,6 +110,15 @@ class DateTimeType extends AbstractType
'time_pattern' => null,
'time_widget' => null,
'time_format' => null,
/* Defaults for date field */
'years' => range(date('Y') - 5, date('Y') + 5),
'months' => range(1, 12),
'days' => range(1, 31),
/* Defaults for time field */
'hours' => range(0, 23),
'minutes' => range(0, 59),
'seconds' => range(0, 59),
'with_seconds' => false,
);
}
@ -117,4 +126,4 @@ class DateTimeType extends AbstractType
{
return 'datetime';
}
}
}