Sergey Rusakov > ePortal-4.5 > ePortal::HTML::Calendar

Download:
ePortal-4.5.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 4.5   Source  

NAME ^

ePortal::HTML::Calendar - Calendar dialog box.

SYNOPSIS ^

This module is used to make a dialog with a monthly calendar.

 % $Calendar = new ePortal::HTML::Calendar( m => $m );
 % $Calendar->url_all('self');
 ...
 <% $Calendar->draw %>

METHODS ^

new(date)

Object contructor. date is passed to set_date. Calendar's date may be initialized from URL. The actual date source may be checked with date_source() member function.

self_url(cal_param, value)

Constructs self referencing URL removing all myself specific parameters. New parameters should be passed to this function to make them added to URL.

Returns URL with parameters.

url($day_number,$url)

Sets an URL for particular day in the current month view. If $url eq 'self' than self-refence URL will be contructed without parameters loss.

url_all($url)

Sets an url for each day in calendar. $url parameter is passed to url() method. See it for details

date_source()

Returns a sting which points to a source of the date

self - self initialized date (today)

set_date - set_date() was called

url - adjusted from URL

draw()

Draws the calendar. Returns an HTML in array context and outputs HTML via $m in scalar context.

date()

Returns a date selected. It returns an array (YYYY,MM,DD) in array context and nicely formatted date 'DD.MM.YYYY' in scalar context.

set_date(date)

Adjust the calendar to the date. Parameter may be:

'now' or 'today' - set the date to today

'cal_nmon','next' or 'cal_pmon','prev' - adjust to next or prev month

[YYYY,MM,DD] - array ref to (YYYY,MM,DD)

(YYYY,MM,DD) - array of (YYYY,MM,DD)

'DD.MM.YYYY' - date as string

AUTHOR ^

Sergey Rusakov, <rusakov_sa@users.sourceforge.net>

syntax highlighting: