ii

interval-input

jQuery plugin which allow make interval from input

Showing:

Popularity

Downloads/wk

4

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

2

Size (min+gzip)

1.6KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

intervalInput()

jQuery plugin which allow make interval from the input. Returns number of seconds calculated from the interval.

Usage

Base:

$('#selector').intervalInput();

Changed format:

$('#selector').intervalInput({
    format: 'h[-]i[-]s'
});

Event listener:

$('#selector').intervalInput();
$('#selector').on('intervalinputchange', function(e, data) {
    // do something on change event
});

See all examples.

API

Description of the API provided by the plugin.

Options

translations

Input tooltips texts.

Default:

{
    w: 'weeks',
    d: 'days',
    h: 'hours',
    i: 'minutes',
    s: 'seconds'
}

format

Format used to generate the inputs for interval.

Available options:

  • w - weeks
  • d - days
  • h - hours
  • i - minutes
  • s - seconds

Plugin allows to pass constant between options using braces ([, ]).

Syntax:

d[days]h[:]s

This example generate following structure: <input>days<input>:<input>

Default:

d[days]h[:]i[:]s

Methods

setEnabled(enabled)

  • enabled boolean

Set enabled or disabled plugin inputs.

refresh()

Recalcualte interval values.

Events

intervalinputchange

Event triggered on change value in the any input.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100