Categories

.uiSpinner()

Categories: UI

.uiSpinner( [ options ] )

Subclass: ep

Inherit: (Subclass: ep) .uiValidate()

Plugin: ep.ui.spinner

Description: Add spinner handling for input elements.

  • .uiSpinner( [ options ] )

    version added: 6.11.0

    options   A map of additional options pass to the method.

The .uiSpinner() method add spinner handling to an input elements.

The .uiSpinner() method is a validation input also and using the validation types date and number from the ep.validate module. Have a look at the additional options, some options are only available for a special validation types.

  • Apply .uiSpinner() to input element named percent.

    HTML:
    <form>
      <input type="text" name="percent" />
    </form>
    
    Code:
    ep(':input[name=percent]')
        .uiSpinner({
            required:   true,
            type:       'number',
            format:     'p',
            min:        10,
            max:        50,
            step:       10
        });
    
    
  • type

    version added: 6.11.0

    A value respectively validation type: 'number' or 'date'.

    Default: number

  • unit

    version added: 6.11.0

    A unit for example 'GByte', es this option only for type 'number' an format 'n*'

  • step

    version added: 6.11.0

    A difference to next/previous step.

    Default: 1

  • stepType

    version added: 6.11.0

    One of the supported types: 'fullYear', 'month', 'date', 'hours', 'minutes' or 'seconds'. For spinner type date only.

    Default: hours