/

Plugins KIT

The page contains list of officially supported plugins by Maskito team. If you wish to develop your own plugin, read documentation page about plugins .

Selection Change Handler

#

Plugin maskitoSelectionChangeHandler accepts callback and invokes it on every change of caret position.

This examples demonstrates how dynamically switch native mobile keyboard to enter different parts of time string: numeric - to enter digit time segments, text – to enter meridiem part (AM / PM).

Use real mobile device to see how it works!

Caret Guard

#

Plugin maskitoCaretGuard is specific instance of maskitoSelectionChangeHandler - it also accepts callback which is triggered on every caret position change. It is used to limit the boundaries for caret position.

Callback should return array with 2 numbers: the first one – caret cannot be placed before this index, the last one – caret cannot be placed after this index.

It can be especially useful for textfields with non-editable affixes.

Event handlers

#

Add/remove non-editable prefix on focus/blur is so common task that we even created maskitoAddOnFocusPlugin / maskitoRemoveOnBlurPlugin plugins.

If you need more complex logic for these (or other) events – use maskitoEventHandler .

Visualize rejected characters

#

Plugin maskitoRejectEvent dispatches custom event maskitoReject when a character that the user has entered is rejected by the mask. You can use it to visualize rejection.