I have problem in MaskEditValidator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avanthika
    New Member
    • Nov 2007
    • 10

    I have problem in MaskEditValidator

    Hi,
    <form id="form1" runat="server">
    <asp:ScriptMana ger ID="ScriptManag er1" runat="server" />

    <asp:TextBox ID="txtDate" runat="server" Width="182Px" ></asp:TextBox>

    <asp:ImageButto n ID="Image1" runat="server" ImageUrl="~/images/popupimg.png" CausesValidatio n="False" />

    <cc1:MaskedEdit Extender ID="MaskedEditE xtender5" runat="server" TargetControlID ="TxtDate"
    Mask="99/99/9999" MessageValidato rTip="true" MaskType="Date" DisplayMoney="L eft" AcceptNegative= "Left" CultureName="zh-SG" ErrorTooltipEna bled="True" />

    <cc1:MaskedEdit Validator MinimumValue="0 1/01/1900" ID="MaskedEditV alidator5" runat="server" ControlExtender ="MaskedEditExt ender5" ControlToValida te="txtDate" EmptyValueMessa ge="Date is required" InvalidValueMes sage="Date is invalid" Display="Dynami c" TooltipMessage= "Input a date" EmptyValueBlurr edText="*" IsValidEmpty="f alse" MinimumValueMes sage="Enter Correct date" />&nbsp;

    <cc1:CalendarEx tender Format="dd/MM/yyyy" ID="CalendarExt ender1" CssClass="MyCal endar"
    runat="Server" PopupButtonID=" Image1" TargetControlID ="txtDate" OnClientDateSel ectionChanged=' hideCalendar' />

    When the page is loaded the first time the validation is OK but,after editing the values in the
    page.Everthing is fine. when i click the submit button.the 'date is invalid' error message will be displayed.event houghthe date is in correct format. give solution for this.very urgent...
    Thanks in advance.
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #2
    In your MaskedEditValid ator, you've got the minimum value set as 01/01/1900. The MaskedEditValid ator doesn't know that it's checking a date type, so it's checking 01 divided by 01 divided by 1900. I found that removing it should fix the problem.

    Comment

    Working...