Skip to content

Commit 4bde79b

Browse files
committed
datefield with additional "-format" option to support Dates for German and ISO including MouseWheel-binding. Ticket [fa7e485702]
2 parents 0ca1277 + aa55819 commit 4bde79b

File tree

3 files changed

+401
-147
lines changed

3 files changed

+401
-147
lines changed

modules/datefield/datefield.man

100644100755
+24-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
[comment {-*- tcl -*- doctools manpage}]
2-
[manpage_begin datefield n 0.2]
2+
[manpage_begin datefield n 0.3]
33
[see_also clock(n)]
44
[see_also entry(n)]
55
[keywords clock]
66
[keywords date]
77
[keywords dateentry]
88
[keywords entry]
99
[keywords widget]
10-
[copyright {Keith Vetter <[email protected]>}]
10+
[copyright {Keith Vetter <[email protected]>} and
11+
{Thomas Wunderlich <[email protected]>}]
1112
[moddesc {Tk datefield widget}]
1213
[titledesc {Tk datefield widget}]
1314
[category Widget]
1415
[require Tk]
15-
[require datefield [opt 0.2]]
16+
[require datefield [opt 0.3]]
1617
[description]
1718

1819
The [package datefield] package provides the datefield widget which
19-
is an enhanced text entry widget for the purpose of date entry. Only
20-
valid dates of the form MM/DD/YYYY can be entered.
20+
is an enhanced text entry widget for the purpose of date entry. There
21+
are three valid formats for the dates which can be entered:
22+
[list_begin [enum]]
23+
[enum] English form MM/DD/YYYY using [arg {-format "%m/%d/%Y"}] (default)
24+
[enum] German form DD.MM.YYYY using [arg {-format "%d.%m.%Y"}]
25+
[enum] ISO form YYYY-MM-DD using [arg {-format "%Y-%m-%d"}]
26+
[list_end]
2127

2228
[para]
2329

@@ -36,7 +42,18 @@ Creates and configures a date field widget.
3642

3743
[section OPTIONS]
3844

39-
See the [cmd entry] manual entry for details on all available options.
45+
[list_begin definitions]
46+
[call [arg -format]]
47+
48+
One of "%m/%d/%Y" (English, default if option left), "%d.%m.%Y" (German),
49+
or "%Y-%m-%d" (ISO).
50+
51+
[list_end]
52+
53+
[para]
54+
55+
See the [cmd entry] manual entry for details on all remaining/available
56+
options.
4057

4158
[section EXAMPLE]
4259
[example {
@@ -49,7 +66,7 @@ See the [cmd entry] manual entry for details on all available options.
4966
}
5067
trace variable myDate w DayOfWeek
5168

52-
::datefield::datefield .df -textvariable myDate
69+
::datefield::datefield .df -textvariable myDate -format "%m/%d/%Y"
5370
label .l1 -text "Enter a date:" -anchor e
5471
label .l2 -text "That date is a:" -anchor e
5572
label .l3 -textvariable myDate2 -relief sunken -width 12

0 commit comments

Comments
 (0)