The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IWL::Calendar - a calendar widget

INHERITANCE

IWL::Object -> IWL::Widget -> IWL::Table -> IWL::Calendar

DESCRIPTION

The calendar widget provides a graphical calendar. It inherits from IWL::Table(3pm)

CONSTRUCTOR

IWL::Calendar->new ([%ARGS])

Where %ARGS is an optional hash parameter with with key-values:

fromYear

Specifies the lower year boundary of the calendar. The year must include the century, e.g. 2007

fromMonth

Specifies the lower month boundary of the calendar. Months range from 0 to 11

toYear

Specifies the upper year boundary of the calendar. The year must include the century, e.g. 2007

toMonth

Specifies the upper month boundary of the calendar. Months range from 0 to 11

startDate

Sets the starting date of the calendar. Defaults to the current date. See IWL::Calendar::setDate(3pm)

showWeekNumbers

True, if the week numbers should be shown. Defaults to true. See IWL::Calendar::showWeekNumbers(3pm)

showHeading

True, if the heading should be shown. Defaults to true. See IWL::Calendar::showHeading(3pm)

showTime

True, if the time should be shown. Defaults to true. See IWL::Calendar::showTime(3pm)

showAdjacentMonths

True, if days from the adjacent months should be shown. Defaults to true

noMonthChange

True, if the user should be prevented from switching months/years. Defaults to false

startOnMonday

True, if the calendar week should start on monday. Defaults to true

markWeekends

True, if the weekends should differ visually from the week days. Defaults to true

astronomicalTime

True, if the displayed time should use astronomical notation (e.g. 15:00 instead of 3:00 pm). Defaults to true

markedDates

An array of dates that should be marked as special. See IWL::Calendar::markDate(3pm)

SIGNALS

change_month

Fires when the month has been changed. Receives a Date object as a parameter.

change_year

Fires when the year has been changed. Receives a Date object as a parameter.

change

Fires when the date has been changed. Receives a Date object and the current calendar date cell object as parameters.

load

Fires when the calendar has been loaded.

select_date

Fires when a date has been selected. Receives a Date object and the current calendar date cell object as parameters.

activate_date

Fires when a date has been activated, via double clicking. Receives a Date object and the current calendar date cell object as parameters.

METHODS

setDate (DATE)

Sets the starting date of the calendar.

Parameters: DATE - the starting date, can be in the following formats:

timestamp

In seconds, or in milliseconds

year, month, date, [hours, minutes, seconds, milliseconds]
getDate

Returns the starting date of the calendar

showWeekNumbers (BOOL)

Sets whether the week numbers should be shown.

Parameters: BOOL - true if the week numbers should be shown

showHeading (BOOL)

Sets whether the heading should be shown.

Parameters: BOOL - true if the heading should be shown

showTime (BOOL)

Sets whether the time should be shown.

Parameters: BOOL - true if the time should be shown

markDate (DATE)

Sets the given date as a marked date.

Parameters: DATE - a date to mark. Can be an array of dates. The date should have the following format:

  {year => 2007, month => 5, date => 11}

where year and month are optional.

unmarkDate (DATE)

Removes the given date from the list of marked dates.

Parameters: DATE - a date to unmark. See IWL::Calendar::markDate(3pm) for more information.

clearMarks

Clears all marked dates.

updateOnSignal (SIGNAL, ELEMENT, FORMAT)

Updates the given ELEMENT with data, formatted using FORMAT when SIGNAL has been emitted.

Parameters: SIGNAL - the signal to which to connect. ELEMENT - the element to update, it must have a valid id. FORMAT - the format, which will be used to format the date. See strftime(3)

LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Viktor Kojouharov. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 489:

You forgot a '=back' before '=head1'