maskedinput

jquery masked input on loaded content

廉价感情. 提交于 2019-12-01 22:24:52
问题 So I have a joomla! page that is partly generated by functions based on the user. So parts of the forms that I need to use the 'masked input plug-in' on are loaded via functions on page load. The issue I have is, on the fields that are standard HTML on the page, the plugin works fine but on the fields that are generated by my php functions, the fields lock up and don't allow any input. My guess is that it's an issue with the php functions pulling in the forms after the jquery plugin has fired

Angular 2 multiple custom value accessor

时间秒杀一切 提交于 2019-11-30 04:43:49
问题 I am creating an application using angular2. I need to get a Date from user input using a calendar popover, but I need to put a mask on user input to stay in this format dd-mm-YYYY when he is typing. I am using two different modules that I got from web ng-bootstrap and angular2-text-mark <input [textMask]="{mask: mask}" type="text" class="form-control" placeholder="yyyy-mm-dd" name="dp" [(ngModel)]="date" ngbDatepicker #d="ngbDatepicker"> When I use textMask and ngbDatepicker on same tag I

Remove literals from input mask after form submit?

邮差的信 提交于 2019-11-29 11:37:08
问题 this question has already been asked but the solutions where not clear. Im using Josh Bush's MaskedInput plugin for jQuery What im trying to achieve is: E.g: a phone input with the mask $("#txtPhone").mask("(99)9999-9999"); EQUALS: (00)9398-8373 i want it to submit : 0093988373 ------ Is it possible to remove the .mask on submit but keep the value? 回答1: I think you want to use unmask $("#myForm").submit(function() { $("#txtPhone").unmask(); }); 回答2: Set removeMaskOnSubmit as true when you

Masked input for currency jQuery

旧城冷巷雨未停 提交于 2019-11-27 17:44:33
问题 In my web application I have an input field called "Budget" where users enter the proposed budget for a project. I need to create a masked input to automatically bring the entered amount to the following format while the user is typing into the input field: 1 000 10 000 100 000 I've searched throughout the Internet but don't seem to find the necessary one. Could anybody point me to a suitable plugin or maybe suggest a custom solution? Thanks in advance. 回答1: Try any of these: http://plugins

Conflict between jQuery Validate and Masked Input

◇◆丶佛笑我妖孽 提交于 2019-11-27 01:05:05
问题 I've got a form that's using both jQuery Validate and Masked Input for phone number and US zip code fields. For example, for a US zip code, Masked Input allows only numbers to be entered, and forces either the format "99999" or "99999-9999" (where 9 can be any number). The Validate rule requires the same. But in some cases, Validate marks a field as invalid when it should actually be valid. Code Specifics The regex that jQuery Validate is using on the zip code field is ^\d{5}$|^\d{5}\-\d{4}$

Phone mask with jQuery and Masked Input Plugin

让人想犯罪 __ 提交于 2019-11-27 00:39:13
I have a problem masking a phone input with jQuery and Masked Input Plugin . There are 2 possible formats: (XX)XXXX-XXXX (XX)XXXXX-XXXX Is there any way to mask it accepting both cases? EDIT: I tried: $("#phone").mask("(99) 9999-9999"); $("#telf1").mask("(99) 9999*-9999"); $("#telf1").mask("(99) 9999?-9999"); But it doesn't works as I would like. The closest one was (xx)xxxx-xxxxx. I would like to get (xx)xxxx-xxxx when I type the 10th number, and (xx)xxxxx-xxxx when I type the 11th. Is it posible? Try this - http://jsfiddle.net/dKRGE/3/ $("#phone").mask("(99) 9999?9-9999"); $("#phone").on(

Phone mask with jQuery and Masked Input Plugin

拟墨画扇 提交于 2019-11-26 09:27:20
问题 I have a problem masking a phone input with jQuery and Masked Input Plugin. There are 2 possible formats: (XX)XXXX-XXXX (XX)XXXXX-XXXX Is there any way to mask it accepting both cases? EDIT: I tried: $(\"#phone\").mask(\"(99) 9999-9999\"); $(\"#telf1\").mask(\"(99) 9999*-9999\"); $(\"#telf1\").mask(\"(99) 9999?-9999\"); But it doesn\'t works as I would like. The closest one was (xx)xxxx-xxxxx. I would like to get (xx)xxxx-xxxx when I type the 10th number, and (xx)xxxxx-xxxx when I type the