Text Input formatter

Default behaviour

<input type="tel" class=" input-text" placeholder="YYYY-mm-dd" data-js="formatter">

Shortdate behaviour

<input type="tel" class=" input-text" placeholder="YY-mm" data-js="formatter" data-formatter-type="shortdate">

Introduction

The input formatter requires a data-js=formatter attribute to initialise.

The input formatter has a dependency on cleave. Remember to include a reference to external/cleave.min.js as well as the standard modules/jquery.pfInputFormatter.

Usage

Selector Effect Remarks
data-js="formatter" Added to the input elements to bind date behaviour. By default it will give YYYY-mm-dd. Required.
data-formatter-type="shortdate" To enforce "shortdate" behaviour, i.e. YY-mm. Optional.