I have a Kendo MaskedTextBox that is shown below.
@(Html.Kendo().MaskedTextBox()
.Name("kendoMaskedTextBox1")
.Rules(rules =>
{
rules.Add('0', "/[0]{1}[1]{1}/");
})
.Mask("00/00/0000")
)
My question is how can I add rules so that it has the format of: MM/DD/YYYY but at the same time does not allow 00. Basically, for the MM/DD part I want it to see if for MM if the first value is 0 if so the next value can only be 1-9 for DD if the first value is 0 the next value can only be 1-9, etc. but for YYYY I want to allow 000 but not 0000.
Can someone help me get started with this, maybe just the MM part so I can try the others myself?
Here is what I need in more clear terms:
MM should only be values of either: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12