1datefield(n) Tk datefield widget datefield(n)
2
3
4
5______________________________________________________________________________
6
8 datefield - Tk datefield widget
9
11 package require Tk
12
13 package require datefield ?0.2?
14
15 ::datefield::datefield widgetpath ?options?
16
17______________________________________________________________________________
18
20 The datefield package provides the datefield widget which is an
21 enhanced text entry widget for the purpose of date entry. Only valid
22 dates of the form MM/DD/YYYY can be entered.
23
24 The datefield widget is, in fact, just an entry widget with specialized
25 bindings. This means all the command and options for an entry widget
26 apply equally here.
27
29 ::datefield::datefield widgetpath ?options?
30 Creates and configures a date field widget.
31
33 See the entry manual entry for details on all available options.
34
36 package require datefield
37
38 wm title . "Datefield example"
39 proc DayOfWeek {args} {
40 set now [clock scan $::myDate]
41 set ::myDate2 [clock format $now -format %A]
42 }
43 trace variable myDate w DayOfWeek
44
45 ::datefield::datefield .df -textvariable myDate
46 label .l1 -text "Enter a date:" -anchor e
47 label .l2 -text "That date is a:" -anchor e
48 label .l3 -textvariable myDate2 -relief sunken -width 12
49
50 grid .l1 .df -sticky ew
51 grid .l2 .l3 -sticky ew
52 focus .df
53
54
56 clock(n), entry(n)
57
59 clock, entry, widget
60
62 Copyright (c) Keith Vetter <keith@ebook.gemstar.com>
63
64
65
66
67datefield 0.2 datefield(n)