Table of Contents

Class DateMask

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class DateMask : PatternMask, IMask
Inheritance
DateMask
Implements
Inherited Members
Extension Methods

Constructors

DateMask(string, char, char, char)

public DateMask(string mask, char year = 'y', char month = 'M', char day = 'd')

Parameters

mask string
year char
month char
day char

Methods

ModifyFinalText(string)

Note: this is required for special cases where the date becomes invalid after the last character has been input For instance: MM/dd/yyyy from 02/29/000| to 02/29/0001| The year 0001 is not a leap year so the day needs to be corrected to 28 Or this 0[3]/31/2000 input "4" => 04/31/2000 But we do this only for a complete date!

protected override string ModifyFinalText(string text)

Parameters

text string

Returns

string

ModifyPartiallyAlignedMask(string, string, int, ref int, ref int, ref string)

protected override void ModifyPartiallyAlignedMask(string mask, string text, int maskOffset, ref int textIndex, ref int maskIndex, ref string alignedText)

Parameters

mask string
text string
maskOffset int
textIndex int
maskIndex int
alignedText string

UpdateFrom(IMask)

public override void UpdateFrom(IMask other)

Parameters

other IMask