jsbeans

jsbeans  1.0.0

jsbeans > jsbeans > jsbeans.SmartInsert
Search:
 
Filters

static Class jsbeans.SmartInsert

A collection of utilities for inputs autocompletion

Methods

currency

void currency ( event , input , [options] )
Autocompletion for currency, optionally indicating precision.
It uses dots for thousands and commas for decimals.
Parameters:
event <event>
input <DOM> an input of type text
[options] <JSON>
precision: string // precision, optional with default "9999999999999999999999999.2"
Returns: void

date

void date ( event , input , [pattern] )
Autocompletion for date.
Parameters:
event <event>
input <DOM> an input of type text
[pattern] <String> one among "dd/MM/yyyy", "dd-MM-yyyy", "MM/dd/yyyy" and "MM-dd-yyyy". Default "MM/dd/yyyy".
Returns: void

float

void float ( event , input , [options] )
Avoids entering characters other than floats, optionally indicating precision.
Parameters:
event <event>
input <DOM> an input of type text
[options] <JSON>
precision: string // precision, optional with default "99999999999999999999.9999999999"
Returns: void

int

void int ( event , input )
Avoids entering characters other than integers
Parameters:
event <event>
input <DOM> an input of type text
Returns: void

ip

void ip ( event , input )
Autocompletion for IP addresses.
Parameters:
event <event>
input <DOM> an input of type text
Returns: void

mask

void mask ( event , input , re )
Allows entering only characters matching given {@param} re.
Parameters:
event <event>
input <DOM> an input of type text
re <RegEx>
Returns: void

noQuote

void noQuote ( event , input )
Avoids entering character single or double quotes (" or ').
Parameters:
event <event>
input <DOM> an input of type text
Returns: void

noReturn

void noReturn ( event , input )
Prevents the 'enter', useful in you don't want an accindental enter over an {@param} input
Parameters:
event <event>
input <DOM> an input of type text or password
Returns: void

time

void time ( event , input , [pattern] )
Autocompletion for time.
Parameters:
event <event>
input <DOM> an input of type text
[pattern] <String> one among "hh:mm", "hh.mm", "hh:mm:ss" and "hh.mm.ss". Default "hh:mm".
Returns: void

unmask

void unmask ( event , input , re )
Allows entering only characters DON'T matching given {@param} re.
Parameters:
event <event>
input <DOM> an input of type text
re <RegEx>
Returns: void


Copyright © 2016 Francesco Mele. All rights reserved.