<input type="text" name="input-{{ include.name | default: 'mask' }}" class="form-control" data-mask="{{ include.mask | default: '00/00/0000' }}"{% if include.visible %} data-mask-visible="true"{% endif %}{% if include.placeholder %} placeholder="{{ include.placeholder }}"{% endif %} autocomplete="off"/>

{% capture_once scripts %}
<script>
(function () {
	/**
	 * Input mask
	 */
	var maskElementList = [].slice.call(document.querySelectorAll('[data-mask]'))
	maskElementList.map(function (maskEl) {
		return new IMask(maskEl, {
			mask: maskEl.dataset.mask,
			lazy: maskEl.dataset['mask-visible'] === 'true'
		})
	});
})();
</script>
{% endcapture_once %}
