For an explanation of these standard options, see
Curses::UI::Widget.
Remark: -width and -height can be set, but this widget
really want to have its content space at a minimum size. If your
-width or -height is not large enough, the widget will
automatically fix its value.
WIDGET-SPECIFIC OPTIONS
* -date < DATE >
This option sets the date to start with.
If you do not specify a date, today's
date will be used automatically. The format that
you can use for this date is one of:
* YYYY-M-D (e.g. 2002-1-10 or 2002-01-10)
* YYYY/M/D (e.g. 2002/1/10 or 2002/01/10))
* YYYYMMDD (e.g. 20020110)
* D-M-YYYY (e.g. 10-1-2002 or 10/01/2002)
* D/M/YYYY (e.g. 10/1/2002 or 10/01/2002)
* -onchange < CODEREF >
This sets the onChange event handler for the calendar widget.
If a new date is selected, the code in CODEREF will be executed.
It will get the widget reference as its argument.
* -drawline < CODEREF >
This option specifies whether or not a line should be drawn under
the calendar.
METHODS
* new ( OPTIONS )
* layout ( )
* draw ( BOOLEAN )
* focus ( )
* onFocus ( CODEREF )
* onBlur ( CODEREF )
* intellidraw ( )
These are standard methods. See Curses::UI::Widget
for an explanation of these.
* get ( )
This method will return the currently selected date in the
format 'YYYY-MM-DD'.
* setdate ( DATE, [BOOLEAN] )
Set the selected date of the widget to DATE. See -date above for
the possible formats. The widget will redraw itself, unless BOOLEAN
has a true value.
* onChange ( CODEREF )
This method can be used to set the -onchange event handler
(see above) after initialization of the calendar.
DEFAULT BINDINGS
* <tab>
Call the 'loose-focus' routine. This will have the menubar
loose its focus and return the value 'LOOSE_FOCUS' to
the calling routine.
* <enter>, <space>
Call the 'date-select' routine. This will select the date on
which the cursor is.
* <cursor-left>, <h>
Call the 'date-prevday' routine. This will have the date
cursor go back one day.
* <cursor-right, <l>
Call the 'date-nextday' routine. This will have the
date cursor go forward one day.
* <cursor-down>, <j>
Call the 'date-nextweek' routine. This will have the
date cursor go forward one week.
* <cursor-up>, <k>
Call the 'date-prevweek' routine. This will have the
date cursor go back one week.
* <page-up>, <SHIFT+K>
Call the 'date-prevmonth' routine. This will have the
date cursor go back one month.
* <page-down>, <SHIFT+J>
Call the 'date-nextmonth' routine. This will have the
date cursor go forward one month.
* <p>, <SHIFT+H>
Call the 'date-prevyear' routine. This will have the
date cursor go back one year.
* <n>, <SHIFT+L>
Call the 'date-nextyear' routine. This will have the
date cursor go forward one year.
* <home>, <CTRL+A>, <c>
Call the 'date-selected' routine. This will have the
date cursor go to the current selected date.
* <t>
Call the 'date-today' routine. This will have the date cursor
go to today's date.
This package is free software and is provided ``as is'' without express
or implied warranty. It may be used, redistributed and/or modified
under the same terms as perl itself.