Return to the menu   Select another DES Module

Demonstrates the MessageCenter

The Message Center tells the user how to edit the selections. It appears in the footer, below command buttons and the Current Date Label.

The MultiSelectionCalendar.MessageCenter property hosts these properties to customize the Message Center:

  • Activate – When true, the Message Center is shown in the footer.
  • EncloseInFieldSet – When true, the Message Center uses the <fieldset> tag, to provide a title (from MessageCenterTitle).
  • HorizontalAlignContent – The horizontal alignment of the descriptive text that assists the user.
  • Title – A string that provides a title to the message center to assist the user in understanding the context of the messages it shows.
  • NoSelectionText – The descriptive text shown when there is no selection. It supports HTML.
  • OneSelectionText – The descriptive text shown when one Day Cell is selected. It supports HTML.
  • MultipleSelectionsText – The descriptive text shown when multiple Day Cells are selected. It supports HTML.
  • ExplainShiftKeyText – The descriptive text that explains the use of the SHIFT key. It appears when at least one date is selected and is positioned after the text of OneSelectionText and MultipleSelectionsText. It is not used when RangeMode is true or ShiftKeyForRange is false.
  • MaximumSelectionsExceededText – An error message shown in the descriptive text when the user attempts to exceed the number of selected dates allowed by MaximumSelectedDates. It appears first in the Message Center.
  • NextUnselectionText – Describes what will happen when the user clicks on a cell. Used when the cell will be unselected, and there are no others to be unselected.
  • NextMultipleSelectionsText – Describes what will happen when the user clicks on a cell. Used when a range of cells will be selected, including selecting a week, month, or any range. Does not handle selecting by day of the week.
  • NextMultipleUnselectionsText – Describes what will happen when the user clicks on a cell. Used when a range of cells will be unselected, including unselecting a week, month, or any range. Does not handle unselecting by day of the week.
  • DOWNextSelectionText – Describes what happens when the user clicks on the day of week column header to toggle a day of the week.

Tokens supported by various textual properties:

  • The token "{CLEAR}" is replaced by a LinkButton that is the same as the Clear command.
  • The token "{DATE}" is replaced by the current date using the format DateFormat.
  • The token “{FIRSTDATE}” shows the first date about to be unselected, using the format defined in DateFormatWithMultipleSelections.
  • The token “{LASTDATE}” shows the last date about to be unselected, using the format defined in DateFormatWithMultipleSelections.
  • The token "{COUNT}" is replaced by the number of dates selected.
  • The token “{DOW}” shows the day of week name.

If you want to change the default style sheets, the styles are defined in the [web app]\DES\Appearance\Date And Time\Calendar.css file.


Controls

Example 1

DateFormat=AbbreviatedNoYear

Previous Month
Next Month
November 2024 Select a Different Month
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
Click on dates to toggle their selection.


Example 2

DateFormat=Short. Many text properties have been customized.

Previous Month
Next Month
November 2024 Select a Different Month
+Sun
v
Mon
v
Tue
v
Wed
v
Thu
v
Fri
v
Sat
v
>272829303112
>3456789
>10111213141516
>17181920212223
>24252627282930
>1234567
CLICK on dates to toggle their selection

Example 3

Activate=false The Message Center is hidden.

Previous Month
Next Month
November 2024 Select a Different Month
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Source Code (C#)

<h2>Example 1</h2>
<span class="PropertyName">DateFormat</span>=AbbreviatedNoYear<br/><br/>
<des:MultiSelectionCalendar ID="MultiSelectionCalendar1" runat="server">
   <MessageCenter DateFormat="AbbreviatedNoYear"  />
</des:MultiSelectionCalendar>
<br/><br/>
<h2>Example 2</h2>
<span class="PropertyName">DateFormat</span>=Short. Many text properties have been customized.<br/><br/>
<des:MultiSelectionCalendar ID="MultiSelectionCalendar2" runat="server" SelectDOW="True"
   SelectMonth="True" SelectWeeks="True" ShiftKeyForRange="False">
   <MessageCenter DOWNextSelectionText="CLICK to toggle {DOW}" 
      ExplainShiftKeyText="SHIFT+CLICK to extend the selection from the last date clicked" 
      MultipleSelectionsText="CLICK on dates to toggle their selection. CLICK {CLEAR} to clear all selections" 
      NextMultipleSelectionsText="CLICK to select from {FIRSTDATE} to {LASTDATE}" 
      NextSelectionText="CLICK to select {DATE}" 
      NextUnselectionText="CLICK to unselect {DATE}" 
      NoSelectionText="CLICK on dates to toggle their selection" 
      OneSelectionText="CLICK on dates to toggle their selection" />
</des:MultiSelectionCalendar>
<br/>
<h2>Example 3</h2>
<span class="PropertyName">Activate</span>=false The Message Center is hidden.<br/><br/>
<des:MultiSelectionCalendar ID="MultiSelectionCalendar3" runat="server">
   <MessageCenter Activate="false" />
</des:MultiSelectionCalendar>

Return to the menu   Select another DES Module