#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::ChooseDate; #sets date thru the textvariable my $date = '2006/6/6'; my $mw = new MainWindow; $mw->geometry('200x50'); $mw->fontCreate('big', -family=>'courier', -weight=>'bold', -size=>int(-18*18/14)); my $cd = $mw->ChooseDate( -language =>'Italian', -font =>'big', # the label font -bg=>'lightsteelblue', #the label bg -textvariable=>\$date, -arrowcolor => 'black', -arrowactivecolor=>'yellow', -datecolor=> 'blue', -dateformat => 1, -orthodox => 0, -daysofweekcolor=>'lightgreen', -highlightcolor=> 'pink', -linecolor=> 'green', -yearcolor=> 'black', -command=>sub{print "$date\n"}, )->pack(-fill=>'x', -expand=>1); my $cdcan = $cd->Subwidget('canvas'); $cdcan->configure(-bg=>'black'); # bg of weekdays bar my $cdtop = $cd->Subwidget('toplevel'); $cdtop->configure(-bg=>'black'); # outline of popup # sets the date thru set $cd->set( y=>2005, m=>5, d=>5 ); MainLoop;