Fixed #20986 -- Enabled SelectDateWidget to use custom months

Reviewed by Trac alias MarkusH.
This commit is contained in:
Loic Bistuer 2013-08-28 13:22:47 +07:00 committed by Anssi Kääriäinen
parent b89c2a5d9e
commit da800be6dd
4 changed files with 98 additions and 6 deletions

View file

@ -763,3 +763,20 @@ Composite widgets
An optional list/tuple of years to use in the "year" select box.
The default is a list containing the current year and the next 9 years.
.. attribute:: SelectDateWidget.months
.. versionadded:: 1.7
An optional dict of months to use in the "months" select box.
The keys of the dict correspond to the month number (1-indexed) and
the values are the displayed months.
.. code-block:: python
MONTHS = {
1:_('jan'), 2:_('feb'), 3:_('mar'), 4:_('apr'),
5:_('may'), 6:_('jun'), 7:_('jul'), 8:_('aug'),
9:_('sep'), 10:_('oct'), 11:_('nov'), 12:_('dec')
}