ComponentOne Tabs for ASP.NET WebForms
C1.Web.Wijmo.Controls.45 Assembly / C1.Web.Wijmo.Controls.C1Input Namespace / C1InputDate Class / ForceMonth Property

In This Topic
    ForceMonth Property
    In This Topic
    Gets or sets whether to force the month not be changed on typing the year and month, if the day exceeds the max days of current month.
    Syntax
    'Declaration
     
    Public Property ForceMonth As System.Boolean
    public System.bool ForceMonth {get; set;}
    Remarks
    When typing the year and month field, the day may exceeds the max days in current month. The default behavior is as following:
    1) If the original day is the last day of the original month, set the day to the last day of the new month.
    2) Otherwise, keep the origina day. If the day exceeds last day of the current month, increase the month. (it's done by the standard JavaScript.)
    Set this property to true will change to the following behavior:
    1) Keep the day if it's valid for the new month.
    2) Set the day to the latest day of the new month, if the original day exceeds the last day.

    For example, for current date 1997-01-29, set the month to 2.
    1) ForceMonth=false, the new date will be 1997-03-01;
    2) ForceMonth=true, the new date will be 1997-02-28.

    See Also