Share via


MonthCalendar Class

Methods | This Package | All Packages

Encapsulates a Windows month calendar control, which provides a simple calendar interface from which the user can select a date.

Component
  |
  +--Control
    |
    +--MonthCalendar

package com.ms.wfc.ui

public class MonthCalendar
extends
Control****

Remarks

Use the getSelectionRange method to return the date range the user selected in the month calendar.

The following examples use the setBoldedDates method to set which dates appear bold in the month calendar, and use the removeBoldedDate and removeAllBoldedDates method to remove bold formatting from date. You use similar code to add and remove monthly and annually bolded dates.

private void btnBoldDates_click(Object source, Event e)
{
    Time time[] = new Time[3];
    time[0] = new Time();
    time[1] = time[0].addDays(2);
    time[2] = time[1].addDays(2);
    mcVacation.setBoldedDates(time);
}

private void btnUnboldToday_click(Object source, Event e)
{
    Time time1 = new Time();
    mcVacation.removeBoldedDate(time1);
    mcVacation.updateBoldedDates();
}

private void btnUnboldAllDates_click(Object source, Event e)
{
    mcVacation.removeAllBoldedDates();
    mcVacation.updateBoldedDates();
}