[jQuery] Masked Input plugin, changing values
I have a user request that a month entry (99/) allow the user to input just a single-digit month (9/) and the page will auto-pad. Thus if I type "1/1999" I should get "01/1999". In general, I'm trying to use the masked input plugin all around. I thought I'd just place a keydown event to trigger on the "/" and modify the input value to insert the preceeding zero, and let the plugin run as normal. Unfortunately the plugin events maintain an internal idea of the state of the field, so this doesn't work. Removing and reapplying the mask wipes the existing value of the field. I can tweak the plugin to do what I want, but now I'm running a fork. Has anyone else dealt with this? Am I missing an obvious way of doing this? -- Brett Ritter / SwiftOne swift...@swiftone.org
[jQuery] Masked Input Plugin 1.2.2 Released
There is now a new version of my Masked Input Plugin (http:// digitalbush.com/projects/masked-input-plugin/) for jQuery. This is primarily a bugfix release which addresses some edge cases. Additionaly, I made a few changes that I feel make the plugin behave more natural so that the user experience isn't affected too much by using the plugin. A few other things worth noting: This is my first build for this plugin that uses a build script. No longer am I compressing the javascript by hand. I'm hoping to extend the script further so that future releases are easier. Also, I'm now compressing the script with YUI Compressor. This release has been tested with jQuery 1.3.2 and 1.2.6. Bugfixes Fixed bug which blocked apple meta key. This was keeping copy and paste via keyboard shortcut from working on Mac. Fixed bug that caused mask literals to be pushed into the mask placeholder positions when verifying the data. Fixed bug that prevented user input from completing when mask ended in mask literal. Changes Changed behavior on focus to select all text if focusing on a completed mask. No more masking on readonly inputs. Changed escape behavior to put the input back to the original value instead of just blanking the text. Increased range of accepted characters for input. Josh Bush digitalbush.com
[jQuery] Masked Input Plugin
I need a customization in my mask. The mask does not have a fixed format. As the user types in the it can be changed. The year(after the bar) can be with 2 or 4 digits. Initial mask "9.99/99-99" If the user type another character mask must change to "9.99/-99" versions: Masked Input Plugin 1.2.1 Richfaces 3.2.1.GA Tks, Joel Lobo blogdojoellobo.blogspot.com Fortaleza - Brazil
[jQuery] Masked Input Plugin 1.2.1 Released
There is now a new version of my Masked Input Plugin ( http://digitalbush.com/projects/masked-input-plugin/ ) for jQuery. Version 1.2.1 moves one step closer to my bigger picture for the plugin. I had to make a few breaking changes to do so, but I feel that the end result is worth it. This release adds a lot more polish to the 1.2 release. Here's what we've got. * BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method. Use the "$.mask.definitions['']="";" syntax instead. I said I was going to do this on the last release and now seems just as good a time as any. * BREAKING CHANGE: Removed "allowPartial" option in favor of new mask syntax I'll describe below. A discussion and code exchange with Michael Bray inspired this change. I hate that it's a breaking change, but the new way makes a lot more sense. * New mask syntax option '?'. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension. The new syntax will look like this: "(999) 999-? x9" * I got rid of the awkward input behavior where users typed over top of existing input. The plugin acted like a word processor Insert mode. This has always agrivated me, so now the input shifts on input and backspace/delete. * Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally. * Pasting incomplete test no longer wipes the input. Instead, the cursor is just placed where the input leaves off. * Fixed backspace detection for iPhone. Plugin is now iPhone compatible. * Fixed pasting bug when mask starts with a literal and caret position is on the literal character. I feel really good about this release. I made some changes that I feel are good for the direction of the plugin. Iif you don't like some of the changes please let me know and I'll look at adding them back in as options. I'm trying hard not to bloat things up, but I don't want to remove features that are needed. Merry Christmas! Josh digitalbush.com
[jQuery] Masked Input Plugin 1.2
There is now a new version of my Masked Input Plugin for jQuery(http:// digitalbush.com/projects/masked-input-plugin/). After a long absence with this project, I finally decided to tackle some of the more requested features that have been sent to me. I also did some big reorganization to make room for some future enhancements. With all the changes, it seemed appropriate to bump this version from the 1.1 series. *Paste support for more browsers. It should now work in IE7, Firefox 3, Safari, Chrome, and Opera. *Fixed backspace bug in Opera. I had originally put in special handling for Opera to get past a bug that appears to be fixed in current releases. This code is now removed. *Calling .mask() with no arguments will now return the value of the input without the literals. *Added option "allowPartial" that will allow partial input to remain when focus is lost. *Exposed the hash table of the mask definitions directly to replace the $.mask.addPlaceholder() method. The old method remains for now, but will be removed in a future relase. You should now add custom mask definitions by "$.mask.definitions[char]=regex;" *Code refactoring and house cleaning. I made things more jQuery like and removed some crufty code in the process. The end result is better organization to build on for future enhancements. Please let me know if you have any troubles with this release. I'm excited about the changes and I am looking forward to a few future enhancements after this release gets stabilized. I think the biggest request has been to allow for incomplete input into the masks, so hopefully a lot of you will be happy. Enjoy! Josh digitalbush.com
[jQuery] Masked Input Plugin 1.1.3
Hello everyone, I've been away from the mailing list for a bit. I just released an updated version of the masked input plugin to take care of a bug that several people pointed out. The buffer was not being cleared properly, and when a character got shifted, it would appear twice (once in the old position and once in the new). You can download the latest version at: http://digitalbush.com/projects/masked-input-plugin or from the jQuery plugins repository. Thank You Josh Bush digitalbush.com
[jQuery] Masked input plugin for hour
How accept only the minutes 00, 15, 30, 45 using the masked input plugin for hour?thanks.
[jQuery] Masked input plugin for hour
How accept only the minutes 00, 15, 30, 45 using the masked input plugin for hour? thanks -- View this message in context: http://www.nabble.com/Masked-input-plugin-for-hour-tp14997181s27240p14997181.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Masked Input Plugin 1.1.2
I just released version 1.1.2 of my Masked Input Plugin for jQuery. Felix Geisendörfer helped me mash out a few things with this release. He fixed the bug for Mac/Firefox with the backspace key and got me to open up the caret positioning functions. Thanks Felix! Here are the changes for this release * Fixed a bug in Mac Firefox with backspacing. * Fixed a bug where delete at end of mask produced an extra placeholder character. * Exposed the caret positioning and retrieval methods as a jQuery function extension. You can now call $().caret() to get a caret position and $().caret(start [,end]) to set a caret position. Please go check out the latest version at http://digitalbush.com/projects/masked-input-plugin
[jQuery] Masked Input Plugin Direction
A lot of people seem to need dynamic width number masking. Where currency symbols, decimal separators, and thousands separators are applied automatically. I'm thinking about taking this on, but I have a few questions. 1.Should is be a part of the masked input plugin or a separate new plugin? *It seems like the only similarities between the two would be the caret positioning stuff. 2.Regardless of separation, should I modify the namespacing to accomodate both? a. $(selector).mask.fixed(mask,options); //current behavior b. $(selector).mask.variable(mask,options); //new proposed behavior Also, the biggest thing that's running through my head is this. What's the easiest way to denote this? Ideally I'd like to say mask.variable("-$9.99") or something similar, but that doesn't really give me any kind of idea on how to do this for other nationalities. Should I leave all of the i18n stuff as options? {decimalSeparator:",",thousandsSeparator:"."} This seems clunky to me. Is there any good way to read internationalization and globalization stuff from the browser?My head is swimming with ideas here, I just need some direction. Josh digitalbush.com
[jQuery] Masked Input Plugin 1.1.1
Okay, I had to make a quick fix on this today because I basically broke the plugin for IE. I made the mistake of using $.each() on a string and each character was showing as undefined. Does anyone know if $.each is supposed to work on strings? It seems to work just fine in every other browser except IE. Regardless, bug or not, the fix is lise on the plugin page at http://digitalbush.com/projects/masked-input-plugin Thanks Josh digitalbush.com
[jQuery] Masked Input Plugin 1.1
I just released version 1.1 of my Masked Input Plugin for jQuery. I have more features in the pipeline to add to 1.2, but I wanted to get a few fixes out the door before doing so. The only thing new this time is an unmask method. In addition to code changes, I've made a few more enhancements. I've added a packed version for those who want the smallest possible footprint. I've also given the project page a face lift to make things easier to find. Below is a list of changes this time: * NEW FEATURE: unmask() method to remove masking for a previously masked input. * Safari cursor position fix. * Cursor position behavior change: Cursor goes to the end of the input on a completed input. Cursor goes to the first placeholder position on a blank input. * Fixed improper escaping of certain mask characters. * Code refactoring to reduce size and complexity. Please check it out at: http://digitalbush.com/projects/masked-input-plugin Thank You Josh digitalbush.com
[jQuery] Masked Input Plugin RC3
I keep coming across a few bugs here and there that need fixing. I've released the 3rd RC for my masked input plugin. This one has breaking changes, so if anyone is using it, please proceed carefully. Here's what I managed to get into this release. * BREAKING CHANGE: The mask function has been changed to more closely match the style of the jQuery library. Instead of calling .maskedinput(), you will need to call .mask(). Additionally the .AddMaskDefinition() has been moved to a namespace and renamed. Instead, you should make a call to .mask.addPlaceholder(). * Fixed a bug where the buffer was wiped when text was selected and a non-typeable character was pressed. * Fixed a bug where the buffer was not cleared, but the text was when pressing the escape key. * More code cleanup. Please check it out at http://digitalbush.com/projects/masked-input-plugin Thank You Josh
[jQuery] Masked Input Plugin RC2
Hey there, I'm back at it trying to push to a 1.0 release. I made some code changes, so I would like some verification that all is well before I move this to a v1.0 status. The following is a list of changes for this release. * Now supports user defined placeholder characters by calling "$.AddMaskDefinition(char,regex)" . There is an example on my site. * Fixed a bug where backspace from the first character position deleted the mask. * General code cleanup. Please check it out at: http://digitalbush.com/projects/masked-input-plugin or http://jquery.com/plugins/project/maskedinput
[jQuery] Masked Input Plugin RC1a
Hey guys and gals. I learned about the .call() functionality today and decided to modify the behavior of the optional mask completed function. Now you don't need to specify an parameter when you define your function; you can simply use "this". Before: $("#product").maskedinput("99/99/",{completed:function(input) {alert("You typed the following: "+input.val());}}); Now: $("#product").maskedinput("99/99/",{completed:function() {alert("You typed the following: "+this.val());}}); It's not a necessary change, I just wasn't happy with forcing the user to add a param to their functions. It seemed a bit kludgey to me. The new version is up at: http://digitalbush.com/projects/masked-input-plugin and also at the official jQuery plugin repository: http://jquery.com/plugins/project/maskedinput Thank You Josh
[jQuery] Masked Input Plugin RC1
I'm getting there. I've released another revision to my Masked Input Plugin for jQuery. I'm calling this release candidate 1 because this is the feature set I wish to implement for v1.0 and I don't anticipate any breaking API changes. The following is a list of changes for this release. * Fixed a Safari issue where backspace deleted wrong characters and messed up cursor position. * Fixed an issue where pre-filled input (value="something") was deleted on focus. Please check it out at: http://digitalbush.com/projects/masked-input-plugin or on the new jQuery plugin repository at: http://jquery.com/plugins/project/maskedinput Thanks Josh
[jQuery] Masked Input Plugin Beta 2a
I've released a minor update to the second beta of my Masked Input Plugin for jQuery. This release fixes a small bug where the mask disappears on focus when the input box has no data. Please check it out at: http://digitalbush.com/projects/masked-input-plugin/
[jQuery] Masked Input Plugin Beta 2
I'm proud to announce the second beta of my Masked Input Plugin for jQuery. This release fixes a few bugs from Beta 1 and adds a few features. The following is a list of changes for this release. * BREAKING CHANGE: If you were using the optional placeholder argument, you will need to change it to a hashmap syntax. Please see the example above for reference. * Fixed an issue with pasted values not persisting after a blur/focus. * Added an optional user defined function to execute when the mask has been completed. I'm using this for my personal projects to advance focus to another area of the form, but this could also be used to validate the value inside the input box. Please see example above. * Fixed the naming convention to conform to the jQuery standard of jquery.pluginname.js * Moved the project files to a more logical location on the web server. Please head on over to http://digitalbush.com/projects/masked-input-plugin to check it out.