/maskitoDateTime to create a mask to input both date and time. Use maskitoParseDateTime to get date from masked string.
Use maskitoStringifyDateTime to get the masked string from date.
import {maskitoParseDateTime, maskitoStringifyDateTime, MaskitoDateTimeParams} from '@maskito/kit';
const params: MaskitoDateTimeParams = {
dateMode: 'dd/mm/yyyy',
timeMode: 'HH:MM',
dateSeparator: ', ',
};
maskitoParseDateTime('07.11.2022, 13:17', params); // returns Date object
maskitoStringifyDateTime(new Date(2022, 10, 7, 13, 17), params); // '07.11.2022, 13:17'
dateMode , timeMode and dateSeparator parameters to get a mask with a locale specific representation of dates. 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.
locale parameter to automatically derive dateMode , dateSeparator and dayPeriod (12/24-hour format) from Intl.DateTimeFormat for the given locale. Any explicitly passed parameter still takes precedence over the locale-derived one. dateTimeSeparator parameter to configure separator between date and time strings. min and max allow to set the earliest and the latest available dates. They accept native Date . Property timeStep allows you to increment / decrement time segments by pressing ArrowUp / ArrowDown .
Use step === 0 (default value) to disable this feature.