-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
DateField should support formats that don't contain the letters "y", "M" or "d" in order to select partial dates (e.g. months). The default values of the fields, when left away, should be the corresponding parts of the UNIX base timestamp 1970-01-01.
Example:
$builder->add('expires_at', 'date', array(
'format' => 'MMyyyy',
));
A date submitted here will always have day "1", e.g. "2013-02-01".
Further related work:
TimeType currently supports the "with__" options for achieving this functionality (including or excluding single parts of the time). We should think about deprecating the "with__" options and supporting a "format" option instead, if this improves consistency.