/maskitoTime to create a mask for time input. Use maskitoParseTime to get milliseconds from masked string.
Use maskitoStringifyTime to get the masked string from milliseconds.
import {maskitoParseTime, maskitoStringifyTime, MaskitoTimeParams} from '@maskito/kit';
const params: MaskitoTimeParams = {mode: 'HH:MM:SS.MSS'};
maskitoParseTime('23:59:59.999', params); // 86399999
maskitoParseTime('12:3', params); // 43380000 (parsed like '12:30:00.000')
maskitoStringifyTime(86399999, params); // '23:59:59.999'
mode property to set time format. See the full list of available mode on API page of the documentation. dayPeriod as a tuple of two locale-specific markers (e.g. ['AM', 'PM'] , ['上午', '下午'] ) to switch the mask to a 12-hour time format with a meridiem suffix. Pass ['', ''] (default) to keep the 24-hour format.
separators property to customize the character between time segments. Default is [':', ':', '.'] . locale parameter of maskitoDate to automatically derive dayPeriod and separators from Intl.DateTimeFormat for the given locale. step allows you to increment/decrement time segments by pressing ArrowUp / ArrowDown . Use step === 0 (default value) to disable this feature.
prefix / postfix parameters to set non-removable text before / after the time. timeSegmentMinValues / timeSegmentMaxValues allows you to set min/max value for every time segment. Time segments are units of the time which form time string. For example, HH:MM consists of two time segments: hours and minutes.