Please enable JavaScript to view this site.

 

Navigation: Tokens > MiniCalendar Tokens

Using Ordinary Tokens in MiniCalendars

Scroll Prev Up Next More

You can add any token within a textbox that contains a minicalendar, even a macro token.

 

The only aspect of tokens placed inside minicalendars which can be a cause of error is whether you place a token before or after the minicalendar marker token, where text and tokens in a textbox are read from left to right and top to bottom:

 

Any token placed before the minicalendar marker token is evaluated exactly as if it were in a separate textbox anywhere else in the GridTemplate.

Any token placed after the minicalendar marker token is evaluated as if the DayValue 1 of that token corresponded to the 1st day of the month of the minicalendar (click here for more details).

 

In the example, on the right, we put 2 series of tokens, each series the same [d]/[m]/[yyyy], but one series (in red) before the [3mc-01] marker, and the other (in black) after the marker.

 

In the generated output, below, the red series of tokens, was converted exactly as one would expect it to be for a DayValue of 1, based on the first date of the spread, January 6th 2003.

 

However, the second series of tokens (in black), is based on the internal date of the minicalendar. With the minicalendar marker [3mc-01] this means that the internal date is based on the month just before the date of DayValue 3 (January 8th 2003). Therefore the internal date of the minicalendar is December 1st, 2002 and the second series of tokens is converted to 1/12/2002.

 

What happens if one wants to place a token below the minicalendar marker, for example at the bottom of the minicalendar, but not have it based on the internal date of the minicalendar ? In that case you should place that token in a separate textbox and use superimposition to make it look like that token is inside the minicalendar (for example, at the bottom).

 

Finally, there are some cases when you want a token to be evaluated using the internal date, but some formatting to be applied based on the relationship between the internal date and the GridTemplate's date. In those cases you would use a macro token which lets you relate both dates and display using one or both dates, as described in the detailed example of the topic s_ParentMinicalToken.

 

See also: embedded tokens weekstart, embedded tokens dayvalue, allow embedded tokens hiding and use date of markers for embedded tokens.

 


Topic 171850, last updated on 06-Sep-2022