jQuery UI Widgets Forums Editors MaskedInput specials characters initialize values

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  logs 3 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • logs
    Participant

    Hello,
    I have to masked inputs:
    – First one should be like this : ‘06########
    – second must looks like this: ‘####-A-36
    The problem is for the first one the Zero disappears and for the second ‘A’ disappears too. I know they are specials characters but how i can insert them.
    Regards.


    Peter Stoev
    Keymaster

    Hey logs,

    You can use regular expressions as we do in the MaskedInput’s first sample for IP address mask. Each char in the mask can be defined as regular expression.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    logs
    Participant

    Hi sir can you provide an example please.
    Regards.

    specials characters initialize values #85631

    logs
    Participant

    Hi to everyone who facing same problem how to initial value of the input.
    For my example above i want the first input to show an initial value ’06########’ so what i did just like this:
    $("#myNumber").jqxMaskedInput({ width: 250, height: 25, mask: '[0][6]########' ,value:'06'});
    Same thing for the second:
    $("#matricule").jqxMaskedInput({ width: 250, height: 25, mask: '#####-[a]-36',value:'A-36'});

    The solution is you must set the value in the options.
    Regards.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.