Current Record: calendar #100

Back to widget:type Table of Contents Synopsis Usage Configuration Options Examples Setting the time to use 24 hour format See Also ...

Current Record: calendar #100

Back to widget:type Table of Contents Synopsis Usage Configuration Options Examples Setting the time to use 24 hour format See Also ...

Calendar Widget

[Permalink]

Back to widget:type

Synopsis

The calendar widget is the default widget for editing date and datetime fields. It is javascript pop-up calendar that allows users to select date and time visually. It can be configured to allow different date and time formats, themes, starting days of the week, and more.

http://media.weblite.ca/files/photos/calendar_widget.png?max_width=400

Usage

For DATE and DATETIME fields, the calendar widget is the default widget used, so you need not specify it explicitly in the fields.ini file. For other types of fields you may designate them to use the calendar widget in the fields.ini file as follows:

[my_field]
    widget:type=calendar

Configuration Options

The calendar widget supports some configuration options that can be set in the fields.ini file. These options are as follows:

Name Description Default Version
widget:lang? The language to use for the calendar. This is a 2-digit ISO language code. en 0.5.3
widget:theme? The theme to use for the calendar. It only ships with one theme at present. calendar-win2k-2 0.5.3
widget:firstDay? The first day of the week (e.g. Monday=1) 1 0.5.3
widget:showsTime? Boolean value indicating whether the calendar should show the time as well. 0 for DATE fields, 1 for DATETIME fields. 0.5.3
widget:ifFormat? The input format of the date. This takes a formatting string as supported by the strftime function. %Y-%m-%d %I:%M %P 0.5.3
widget:timeFormat? Whether to use 12 hour or 24 hour time format. 12 0.5.3

Examples

Setting the time to use 24 hour format

In your fields.ini file:

[my_field]
    wiget:type=calendar
    widget:timeFormat = 24

See Also

  • date? Widget - A widget for editing date and time using select drop-down lists.
  • time? Widget - A widget for selecting time from a set of possibilities in a single select list.
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved