[CLOSED] Input mask

  1. #1

    [CLOSED] Input mask

    Hi, can you please help me to convert the following in razor format -

    <ext:TextField runat="server" FieldLabel="Custom placeholders" Note="Input a date">
                        <Plugins>
                            <ext:InputMask runat="server" Mask="dt/mn/yzzz">
                                <MaskSymbols>
                                    <ext:MaskSymbol Name="d" Regex="[0123]" Placeholder="d" />
                                    <ext:MaskSymbol Name="t" Regex="[0-9]" Placeholder="d" />
                                    <ext:MaskSymbol Name="m" Regex="[01]" Placeholder="m" />
                                    <ext:MaskSymbol Name="n" Regex="[0-9]" Placeholder="m" />
                                    <ext:MaskSymbol Name="y" Regex="[12]" Placeholder="y" />
                                    <ext:MaskSymbol Name="z" Regex="[0-9]" Placeholder="y" />
                                </MaskSymbols>
                            </ext:InputMask>
                        </Plugins>
                    </ext:TextField>
    Last edited by Daniil; Dec 14, 2015 at 10:32 AM. Reason: [CLOSED]
  2. #2
    Hi @barnali,

    We are happy to help.

    Example
    @{
        var X = Html.X();
    }
    
    <!DOCTYPE html>
    <html>
    <head>
        <title>Ext.Net.MVC v3 Example</title>
    </head>
    <body>
        @X.ResourceManager()
    
        @(X.TextField()
            .FieldLabel("Custom placeholders")
            .Note("Input a date")
            .Plugins(X.InputMask()
                .Mask("dt/mn/yzzz")
                .MaskSymbols(items =>
                {
                    items.Add(new MaskSymbol
                    {
                        Name = "d",
                        Regex = "[0123]",
                        Placeholder = 'd'
                    });
                    
                    items.Add(new MaskSymbol
                    {
                        Name = "t",
                        Regex = "[0-9]",
                        Placeholder = 'd'
                    });
                    
                    // Please add the rest symbols
                })
            )
        )
    </body>
    </html>
  3. #3
    Thanks.. that helps.

    - Barnali

Similar Threads

  1. [CLOSED] readonly property with input mask
    By metci in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 19, 2015, 3:09 PM
  2. Input Mask in a text box
    By SeshuKumar in forum 2.x Help
    Replies: 0
    Last Post: Jun 09, 2014, 10:48 AM
  3. Input mask by code behind
    By ermanni.info in forum 2.x Help
    Replies: 3
    Last Post: Jan 13, 2013, 2:40 PM
  4. input text mask with L literal char
    By Wirianto Widjaya in forum 1.x Help
    Replies: 4
    Last Post: Mar 30, 2012, 6:35 AM
  5. [CLOSED] Input Mask for textfield
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 20, 2010, 10:20 AM

Posting Permissions