2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00

Update docs about usage with vanilla js

This commit is contained in:
Alexander Shabunevich
2020-07-03 17:38:55 +03:00
parent 1363ee314f
commit b0f8bc769d
+14
View File
@@ -67,6 +67,20 @@ Just load script `maska.js` and init it, passing element(s) or `document.querySe
var mask = Maska.create('.masked');
```
Mask could be set as `data-mask` attribute on element:
``` html
<input data-mask='##/##/####'>
```
or can be set by `mask` option on initialization:
``` javascript
var mask = Maska.create('.masked', {
mask: '##/##/####'
});
```
You can pass custom tokens while initialization:
``` javascript