Tk Library Source Code

Artifact [321dac7605]
Login

Artifact 321dac7605962060cbba9a124b1316dd2d6ea80b:

Attachment "dateentry.tcl.diff" to ticket [3607261fff] added by yyamasak 2013-03-08 08:01:21.
--- C:/src/tklib/widget/dateentry.1.7.tcl	Tue Dec 13 21:28:00 2011
+++ C:/src/tklib/widget/dateentry.tcl	Fri Mar 08 09:42:52 2013
@@ -184,11 +184,12 @@
 	bind $dropbox <Return> [list $win DateAccepted]
 	bind $dropbox <space>  [list $win DateAccepted]
 	bind $dropbox <ButtonPress> [subst -nocommands {
-	    if {[string first "$dropbox" [winfo containing %X %Y]] != 0} {
-		$win unpost
-	    } else {
-                $win DateAccepted
-            }
+		set tags [$dropbox.calendar gettags [$dropbox.calendar find closest %x %y]]
+		if {[string first "$dropbox" [winfo containing %X %Y]] != 0} {
+			$win unpost
+		} elseif {"cbutton" ni \$tags} {
+			$win DateAccepted
+		}
 	}]
 	bindtags $dropbox [linsert [bindtags $dropbox] 1 TDateEntryPopdown]