init_calendar
Tag {init_calendar} allows developers to add the calendar box to the template. It prints a calendar box where predefined dates are selected.
Parameters
- name - variable name where the returned data is saved. Default value is "cal".
- start_date - defines default start date of the selected days' range. If start_date is undefined, today's date is used.
- end_date - defines default end date of the selected days' range. If end_date is undefined, today's date is used.
- parent - section ID of current calendar. If parent is undefined current page's ID is used. 3.3.10 4.0.14
- hide_weeknumbers - hide the weeknumbers in the calendar. Possible values 0 or 1, default value is 0. 3.3.10 4.0.14
- hide_month_link - hide the month link in the calendar. Possible values 0 or 1, default value is 0. 3.3.10 4.0.14
- hide_today_link - hide the today link in the calendar. Possible values 0 or 1, default value is 0. 3.3.10 4.0.14
- send_variables - add all variables found in GET/POST array to the target links
Attributes
- html - prints HTML-code of the calendar.
- start_date - start date of the selected days' range
- end_date - end date of the selected days' range
Styles
You can can overwrite all calendar styles using your own custom CSS. Following styles are used in the calendar HTML:
- .cal_off
- .cal
- .cal_actual
- .cal_nottoday
- .today_nolink
- .caltext
- .cal_maintable - 3.3.10 4.0.14
- .cal_selectbox_tr - 3.3.10 4.0.14
- .cal_weekday_tr - 3.3.10 4.0.14
- .cal_spacer_tr- 3.3.10 4.0.14
Examples
{* Print calendar where default selected dates are from 01.01.2003 until 01.01.2003.*}{init_calendar name="cal" start_date="01.01.2003" end_date="01.01.2003"}
Calendar: <br>
{$cal_html} <br>
Currently selected dates in the calendar are:
{$cal_start_date} - {$cal_end_date}
RSS