From 363aca6d8e06fc8831015c4172dbba4e394b4638 Mon Sep 17 00:00:00 2001 From: Soshi Homma Date: Wed, 17 Jan 2024 08:26:55 +0900 Subject: [PATCH] fix: add preprocessor to date-range and datetime mask --- projects/kit/src/lib/masks/date-range/date-range-mask.ts | 2 ++ projects/kit/src/lib/masks/date-time/date-time-mask.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/projects/kit/src/lib/masks/date-range/date-range-mask.ts b/projects/kit/src/lib/masks/date-range/date-range-mask.ts index 531104715..1c4b1774b 100644 --- a/projects/kit/src/lib/masks/date-range/date-range-mask.ts +++ b/projects/kit/src/lib/masks/date-range/date-range-mask.ts @@ -2,6 +2,7 @@ import {MASKITO_DEFAULT_OPTIONS, MaskitoOptions} from '@maskito/core'; import {CHAR_EN_DASH, CHAR_NO_BREAK_SPACE} from '../../constants'; import { + createFullWidthToHalfWidthPreprocessor, createMinMaxDatePostprocessor, createValidDatePreprocessor, createZeroPlaceholdersPreprocessor, @@ -39,6 +40,7 @@ export function maskitoDateRangeOptionsGenerator({ overwriteMode: 'replace', preprocessors: [ createZeroPlaceholdersPreprocessor(), + createFullWidthToHalfWidthPreprocessor(), normalizeDatePreprocessor({ dateModeTemplate, rangeSeparator, diff --git a/projects/kit/src/lib/masks/date-time/date-time-mask.ts b/projects/kit/src/lib/masks/date-time/date-time-mask.ts index d36f51a64..89ad43a4b 100644 --- a/projects/kit/src/lib/masks/date-time/date-time-mask.ts +++ b/projects/kit/src/lib/masks/date-time/date-time-mask.ts @@ -2,6 +2,7 @@ import {MASKITO_DEFAULT_OPTIONS, MaskitoOptions} from '@maskito/core'; import {TIME_FIXED_CHARACTERS} from '../../constants'; import { + createFullWidthToHalfWidthPreprocessor, createZeroPlaceholdersPreprocessor, normalizeDatePreprocessor, } from '../../processors'; @@ -39,6 +40,7 @@ export function maskitoDateTimeOptionsGenerator({ overwriteMode: 'replace', preprocessors: [ createZeroPlaceholdersPreprocessor(), + createFullWidthToHalfWidthPreprocessor(), normalizeDatePreprocessor({ dateModeTemplate, dateSegmentsSeparator: dateSeparator,