summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@sixmedia.com>2013-08-28 13:22:47 +0700
committerAnssi Kääriäinen <akaariai@gmail.com>2013-08-28 16:39:26 +0300
commitda800be6ddfdd4c88b48011ef264ea1ec6365725 (patch)
tree8fff30e7cdfe09cdaf0bc2cc3ba8b933c3e0e3a6 /docs/ref
parentb89c2a5d9eb70ca36629ef657c98e3371e9a5c4f (diff)
Fixed #20986 -- Enabled SelectDateWidget to use custom months
Reviewed by Trac alias MarkusH.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/forms/widgets.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
index 47e14043fc..efe947568e 100644
--- a/docs/ref/forms/widgets.txt
+++ b/docs/ref/forms/widgets.txt
@@ -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')
+ }