HeaderPane
Main
Hide
Share Link
Print

Today and Clear Buttons

Below its months, a calendar can show two buttons:

ButtonDescription
TodayShown when SftDate_SetShowTodayButton is set to TRUE (the default). It shows today's date. Clicking it switches to the month view (the smallest view the calendar allows) and selects today's date, or the nearest date within the calendar's limits. Its text is defined by SftDate_SetTodayText, by default "Today: {0}"; {0} stands for today's date in the culture's short date format, and a brace that is part of the text is written twice. In an SftCalendar control, the NM_SFTDATE_TODAYCLICKED notification is sent when it is clicked.
ClearShown when SftDate_SetCalendarClearButton is set to TRUE. Its text is defined by SftDate_SetCalendarClearText, by default "Clear". In the dropdown of a field it empties the field, or clears its check box (see Values and Empty Fields); in an SftCalendar control it removes the selection, so SftDate_GetValue returns FALSE, and the NM_SFTDATE_CLEARCLICKED notification is sent.

SftDate_SetTodayText(hwndCalendar, TEXT("Heute: {0}"));
SftDate_SetCalendarClearText(hwndCalendar, TEXT("Leeren"));
SftDate_SetCalendarClearButton(hwndCalendar, TRUE);

SftDate_SetTodayDate defines the date the calendar treats as today. With NULL (the default), the calendar follows the system date and updates after midnight; SftDate_GetTodayDate then returns FALSE. With SftDate_SetHighlightToday set to TRUE (the default), today's date is outlined in the SFTDATE_COLOR_TODAY color.


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.