Calendar Widget

The Economic Calendar Widget is the most important of our calendar widgets. It shows the calendar of events and indicators.

The widget has some quick filters for the date range, impact, country and category of the events. The user can change the timezone in which date and times are shown, download the calendar info, select a range of advanced filters and activate/deactivate the notification sound. These settings are saved on the user browser and are shared between sessions.

The widget is able to receive live updates of the calendar events' data. When the data for an event is released at their exact date and time, it is immediately updated on the widget, with no need to refresh the current page. When the live updates happen, the widget produces a notification sound to notify the user.

Each row of the calendar can show a link to the event dashboard (containing the other calendar widgets) in order to offer your users a whole insight view into the event information and data.

The Economic Calendar Widget has an adapted display for small devices using chips instead of rows. Note that this is changed using the User-Agent.

Parameters

To learn how to set widget parameters dynamically, please read this.

culture

Optional.

Sets the language in which the widget should be displayed. The language codes can be found here.

Default: en (English)

timezone-offset

Optional.

To be used to set the timezone in which the dates and times should be displayed, represented as the time zone difference (in minutes), from the desired timezone to UTC. Please see a list of all timezones, here.

Default: 0 (Coordinated Universal Time - UTC+00:00)

caution

The time-zone offset is the difference, in minutes, from the desired time to UTC. Note that this means that the offset is positive if the local timezone is behind UTC and negative if it is ahead.

For example, for time zone UTC+10:00 (Australian Eastern Standard Time, Vladivostok Time, Chamorro Standard Time), -600 will be the correct parameter value.

Usage

<!-- UTC+01:00 -- Central European Time -->
timezone-offset="-60"
<!-- UTC-05:00 -- Central Daylight Time (North America) -->
timezone-offset="300"
<!-- User browser timezone -->
timezone-offset="new Date().getTimezoneOffset()"

country-code

Optional.

Sets the list of codes of the countries that should be filtered by default, separated by commas. The language codes should be defined according to the ISO 3166-1 alpha-2 standard wit one exception for the code "EMU" which stands for European Monetary Union.

If the list is empty or the parameter is not used, then all countries are shown.

Default: all countries

Usage

<!-- United States, United Kingdom and Germany -->
country-code="US,UK,DE"
<!-- Sweden -->
country-code="SE"

notification-sound-url

Optional.

The URL of the MP3 sound file that should be played when an update notification happens. If not used, there is a default notification sound.

dashboard-url

Optional.

If defined, each calendar row has a link to a custom page to get more info about the event. The URL can be relative or absolute. It should contain the string {eventId} which will be replaced for the event ID.

Usage

<!-- /calendar/events/9cdf56fd-99e4-4026-aa99-2b6c0ca92811 -->
dashboard-url="/calendar/events/{eventId}"
<!-- /calendar/info?id=9cdf56fd-99e4-4026-aa99-2b6c0ca92811 -->
dashboard-url="/calendar/info?id={eventId}"
<!-- https://www.fxstreet.com/economic-calendar/event/9cdf56fd-99e4-4026-aa99-2b6c0ca92811 -->
dashboard-url="https://www.fxstreet.com/economic-calendar/event/{eventId}"

one-signal-app-id

Optional.

If defined, the calendar widget will be able to manage subscriptions to events using OneSignal as a push notification service provider.

Usage

one-signal-app-id="89e18100-8528-49a7-a852-0de06d35117c"

init-one-signal

Optional.

If defined as https calendar widget will use https protocol for OneSignal communication. If defined as subdomain name (Ex. "fxstreet") calendar widget will use http protocol.

Usage

init-one-signal="https"
init-one-signal="subdomainName"
### `safari-web-id`
*Optional.*
This parameter must be defined to allow OneSignal push notifications in Safari.
#### Usage
```html
safari-web-id="web.onesignal.auto.fe32841c-3f47-4e76-9162-fe68ccbd3858"

has-posts

Optional.

When the parameter is enabled, news related to an event in the economic calendar will be displayed. For this to work, you must have purchased our news' service. read this.

Usage

has-posts="true"

custom-post-url

Optional.

If it is defined, it is assumed that it provides a URL for the publications. By default, the one from FXStreet will be taken. In the case of using your own domain, you must have the defined format. read this.

Usage

custom-post-url="yourdomain.com/{postId}/stuff..."