locked
Mask edit dd/mm/yyyy format RRS feed

  • Question

  • User-60290905 posted

     friends,

    I am using muskedit control but in case of date i can not configur it "dd/mm/yyyy" , please help me

    thanks 

    Tuesday, November 27, 2007 1:44 AM

Answers

  • User-60290905 posted

     ok thanks for ur reply.

    Actually  UserDateFormat="MonthDayYear" is ok.

    But if i change it to UserDateFormat="DayMonthYear"  to display "dd/mm/yyyy" format. it causes problem.

    solve it, and make a practical test.

    Thanks.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 27, 2007 11:57 PM

All replies

  • User-1247908627 posted

    What happens when you try using the dd/mm/yyyy format?  Without seeing your code, I can only make assumptions

    Are you trying to set the mask using mask="mm/dd/yyyy" or UserDateFormat="DateMonthYear"

    You should be using UserDateFormat="DateMonthYear"  Also, earlier versions of the ajax framework do not have a property for UserDateFormat so make sure you are using the latest one.

    Full tag:

    <cc1:maskededitextender ID="Maskededitextender2" runat="server" UserDateFormat="DayMonthYear" TargetControlID="txtDate"></cc1:maskededitextender>

     

    Tuesday, November 27, 2007 2:18 AM
  • User-222101960 posted

    You should use the MaskedEdit control with this property and values: Mask="99/99/9999"

    Tuesday, November 27, 2007 3:13 AM
  • User-60290905 posted

     OK, I have used the same thing UserDateFormat="DayMonthYear" and the validator  shows invalid date format.

     

    Tuesday, November 27, 2007 3:41 AM
  • User-1247908627 posted

    Hey, sorry forgot to tell you to include the mask, mask type and century="2000"  I think the century part may be what is causing the problem. See below:  (Some properites may not be necessary for you, I just copied it from code that works)

     

    <cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtCheckDateReceived" Century="2000" UserDateFormat="MonthDayYear" MaskType="Date" Mask="99/99/9999" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""  CultureTimePlaceholder="" Enabled="True" ></cc1:MaskedEditExtender

    Tuesday, November 27, 2007 9:30 AM
  • User-60290905 posted

     ok thanks for ur reply.

    Actually  UserDateFormat="MonthDayYear" is ok.

    But if i change it to UserDateFormat="DayMonthYear"  to display "dd/mm/yyyy" format. it causes problem.

    solve it, and make a practical test.

    Thanks.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 27, 2007 11:57 PM
  • User-1247908627 posted

    I still have been unable to reproduce the problem using the MaskedEdit and validator.  Could you paste your code here so we can all look at it and then try to reproduce it?

    thanks,
    John

    Wednesday, November 28, 2007 1:18 AM
  • User-545039502 posted

    Hi,

    I have had the same problem:

    you should take a look at http://forums.asp.net/p/1177191/1985450.aspx




    Tuesday, July 21, 2009 7:47 AM
  • User-1028641493 posted

    Hi Jquil ,

    i m using this code but giving me problem

    <cc11:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="Txtfrom"  Mask="99/99/9999"
     MaskType="Date" UserDateFormat="DayMonthYear" CultureDateFormat="" CultureDatePlaceholder="" Century="2000"
      Enabled="true" PromptCharacter="_"    />
      
    <cc1:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1" 
    ControlToValidate="Txtfrom" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" 
    IsValidEmpty="False" TooltipMessage="Input a Date"></cc1:MaskedEditValidator>

    <cc11:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="Txtfrom"  Mask="99/99/9999"

     MaskType="Date" UserDateFormat="DayMonthYear" CultureDateFormat="" CultureDatePlaceholder="" Century="2000"

      Enabled="true" PromptCharacter="_"    />

      

    <cc1:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1" 

    ControlToValidate="Txtfrom" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" 

    IsValidEmpty="False" TooltipMessage="Input a Date"></cc1:MaskedEditValidator>


    <asp:TextBox ID="Txtfrom" runat="server" CausesValidation="True" 

                            CssClass="dataField" Height="17px" Width="122px"></asp:TextBox>

                        <cc1:CalendarExtender ID="Txtfrom_CalendarExtender" runat="server" 

                            ClearTime="True" Enabled="True" Format="dd/MM/yyyy" TargetControlID="Txtfrom">

                        </cc1:CalendarExtender>

    Saturday, July 17, 2010 3:49 AM