Skip to content

Commit

Permalink
datefield with additional "-format" option to support Dates for Germa…
Browse files Browse the repository at this point in the history
…n and ISO including MouseWheel-binding. Ticket [fa7e485702]
  • Loading branch information
oehhar committed Sep 8, 2019
2 parents 0ca1277 + aa55819 commit 4bde79b
Show file tree
Hide file tree
Showing 3 changed files with 401 additions and 147 deletions.
31 changes: 24 additions & 7 deletions modules/datefield/datefield.man
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin datefield n 0.2]
[manpage_begin datefield n 0.3]
[see_also clock(n)]
[see_also entry(n)]
[keywords clock]
[keywords date]
[keywords dateentry]
[keywords entry]
[keywords widget]
[copyright {Keith Vetter <[email protected]>}]
[copyright {Keith Vetter <[email protected]>} and
{Thomas Wunderlich <[email protected]>}]
[moddesc {Tk datefield widget}]
[titledesc {Tk datefield widget}]
[category Widget]
[require Tk]
[require datefield [opt 0.2]]
[require datefield [opt 0.3]]
[description]

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

[para]

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

[section OPTIONS]

See the [cmd entry] manual entry for details on all available options.
[list_begin definitions]
[call [arg -format]]

One of "%m/%d/%Y" (English, default if option left), "%d.%m.%Y" (German),
or "%Y-%m-%d" (ISO).

[list_end]

[para]

See the [cmd entry] manual entry for details on all remaining/available
options.

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

::datefield::datefield .df -textvariable myDate
::datefield::datefield .df -textvariable myDate -format "%m/%d/%Y"
label .l1 -text "Enter a date:" -anchor e
label .l2 -text "That date is a:" -anchor e
label .l3 -textvariable myDate2 -relief sunken -width 12
Expand Down
Loading

0 comments on commit 4bde79b

Please sign in to comment.