Just $49.00 per license
Compatibility: | EE2, EE3, EE4, EE5 |
---|---|
Latest release: | 2.1.0 (released 2017-12-05) |
Licensing: | Commercial License Agreement |
Low Events Fieldtype
The Low Events fieldtype consists of 5 elements: start date & time, end date & time,
and an “all day” checkbox. The date fields make use of the native datepicker
and the time fields make use of the
timepicker plugin,
which is inspired by the Google Calendar timepicker. The date is always shown
in a YYYY-MM-DD
format. The time is shown in either a 12-hour
or 24-hour clock, depending on the site’s default time formatting setting.
Custom settings are:
Setting | Description |
---|---|
Datepicker week starts with | Select the day that the datepicker uses as the first day of the week. |
Time interval | Select a time interval for the timepicker dropdown. Either 15, 30 or 60 minutes. |
Default duration | Select a default duration for an event. Either 0, 30, 60 or 120 minutes. |
Check “All Day” by default | Set to Yes to have the All Day checkbox checked by default. |
Hide “All Day” checkbox | Set to Yes to hide All Day checkbox. The default (as per the above setting) will be used for each event. |
Hide end date | Set to Yes to hide the end date and time fields. The default duration will be used for each event. |
Overwrite entry date | Set to Yes to automatically set the entry’s entry date to the event start date. |
Overwrite expiration date | Set to Yes to automatically set the entry’s expiration date to the event end date. |
Fieldtype Variables
- :start_date
- :end_date
- :start_time
- :end_time
- :start_stamp
- :end_stamp
- :all_day
- :one_day
- :duration
- :relative_start_date
- :relative_end_date
- :passed
- :active
- :upcoming
- :first
- :starts_this
- :ends_this
:start_date
Returns the start date of the event.
Parameters
Parameters | Description |
---|---|
format |
The date format. Defaults to %Y-%m-%d . |
lang |
The language pack used for the date format. Defaults to the default site or member language. |
{my_events_field:start_date format="%j %F %Y"}
:end_date
Returns the end date of the event.
Parameters
Parameters | Description |
---|---|
format |
The date format. Defaults to %Y-%m-%d . |
lang |
The language pack used for the date format. Defaults to the default site or member language. |
{my_events_field:end_date format="%j %F %Y"}
:start_time
Returns the start time of the event or an empty string if it’s an all day event.
Parameters
Parameters | Description |
---|---|
format |
The time format. Defaults to %H:%i . |
lang |
The language pack used for the time format. Defaults to the default site or member language. |
{my_events_field:start_time format="%H:%i"}
:end_time
Returns the end time of the event or an empty string if it’s an all day event.
Parameters
Parameters | Description |
---|---|
format |
The time format. Defaults to %H:%i . |
lang |
The language pack used for the time format. Defaults to the default site or member language. |
{my_events_field:end_time format="%H:%i"}
:start_stamp
Returns the UNIX timestamp for the start date/time.
{my_events_field:start_stamp}
:end_stamp
Returns the UNIX timestamp for the end date/time.
{my_events_field:end_stamp}
:all_day
Returns y
if it’s an all day event.
{if my_events_field:all_day} This event is all day {/if}
:one_day
Returns y
the start date and end date are on the same day.
{if my_events_field:one_day} This event is on a single day {/if}
:duration
Returns a human readable duration of the event, or time until the event’s start/end date, e.g. 2 hours
or 5 days
.
Parameters
Parameters | Description |
---|---|
until |
Set to start or end to return duration from now until start date or end date. |
This event lasts {my_events_field:duration}.
Only {my_events_field:duration until="start"} until this event starts!
:relative_start_date
Returns a string indicating the difference between the start date and now. Uses the relative dates feature available in EE 2.8+. All native parameters are available.
{my_events_field:relative_start_date units="years|months"}
:relative_end_date
Returns a string indicating the difference between the end date and now. Uses the relative dates feature available in EE 2.8+. All native parameters are available.
{my_events_field:relative_end_date units="years|months"}
:passed
Returns y
if the event has passed.
{if my_events_field:passed} This event is history now. {/if}
:active
Returns y
if the event is active.
{if my_events_field:active} This event is happening right now! {/if}
:upcoming
Returns y
if the event has not yet begun.
{if my_events_field:upcoming} This is an upcoming event. {/if}
:first
Returns y
if the start date of the event is the first in given unit
.
Parameters
Parameters | Description |
---|---|
unit |
Either year , month , week or day . |
{if '{my_events_field:first unit="month"}' == 'y'} First event of the month. {/if}
:starts_this
Returns y
if event starts this (today’s) unit
.
Parameters
Parameters | Description |
---|---|
unit |
Either year , month , week or day . |
Note: for each unit, you can use the alias {my_events_field:starts_this_unit}
.
{if '{my_events_field:starts_this unit="month"}' == 'y'} This event will start this month. {/if}
{if my_events_field:starts_this_year}of this year{/if}
:ends_this
Returns y
if event ends this (today’s) unit
.
Parameters
Parameters | Description |
---|---|
unit |
Either year , month , week or day . |
Note: for each unit, you can use the alias {my_events_field:ends_this_unit}
.
{if '{my_events_field:ends_this unit="month"}' == 'y'} This event will end this month. {/if}
{if my_events_field:ends_this_year}of this year{/if}
Example
<p class="meta{if my_events_field:active} active{/if}">
{my_events_field:start_date format="%j %F %Y"}{my_events_field:start_time format=", %H:%i"}
{if my_events_field:one_day == 'y'}
{my_events_field:end_time format="– %H:%i"}
{if:else}
—
{my_events_field:end_date format="%j %F %Y"}{my_events_field:end_time format=", %H:%i"}
{/if}
({my_events_field:duration})
</p>