UNPKG

date-input-control

Version:

Capture dates using day, month and year components

9 lines (8 loc) 456 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isSelectionEmpty = exports.isSelectionEnd = exports.isSelectionStart = void 0; exports.isSelectionStart = (el) => (el.selectionStart === 0 && el.selectionEnd === 0); exports.isSelectionEnd = (el) => (el.selectionStart === el.value.length && el.selectionEnd === el.value.length); exports.isSelectionEmpty = (el) => (el.selectionStart === el.selectionEnd);