So, for the date example, you would like for the user to be able to
type "1/1/2006" with the slashes and it would fill 01/01/2006?  I want
to make sure I'm understanding correctly.

Thanks
Josh

On Jun 13, 6:57 am, David Duymelinck <[EMAIL PROTECTED]> wrote:
> 1 is only an example it can be 1-9 or a-z. The idea is by typing the
> next non validating character of the mask the validation should jump to
> the next validation character and fill the left of the previous
> validation part with a default character if necessary. It should only
> jump if at least one of the previous validated characters is present.
>
> --
> David Duymelinck
> ________________
> [EMAIL PROTECTED]
>
> Josh Bush schreef:
>
> > If the users types '1' how would you know if the user means "01", "11"
> > or "12"?
> > However, 2-9 could always be interpreted as 0+digit.  You
> > could always hook into the keypress event and detect a leading digit
> > that isn't a 1 with the following regex: /^[2-9]/  then just set the
> > input to be 0+digit.  The same thing could be said for the last 4
> > digits as well.  If a user types 2 digits, you could expand that out
> > to the full 4 digit year.
>
> > Just wanted to throw those ideas out there.  Thanks for the feedback!
>
> > Josh
>
> > On Jun 13, 3:56 am, David Duymelinck <[EMAIL PROTECTED]> wrote:
>
> >> Josh Bush schreef:
>
> >>> 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 tohttp://digitalbush.com/projects/masked-input-plugin
> >>> to check it out.
>
> >> Nice work on the plugin i already used it to present a site in
> >> developing stage to a client.
>
> >> One thing that still bothers me, especially inputing dates, is the fact
> >> you have to type the leading zero. Could it not be catched using a
> >> default value and the first not validated character? When you type  1/
> >> with the mask 99/ you get 01/ where 0 is of course the default value.
>
> >> --
> >> David Duymelinck
> >> ________________
> >> [EMAIL PROTECTED]

Reply via email to