Skip to content

Commit

Permalink
fix: add preprocessor to date-range and datetime mask
Browse files Browse the repository at this point in the history
  • Loading branch information
rikusen0335 committed Jan 16, 2024
1 parent c494603 commit 363aca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/kit/src/lib/masks/date-range/date-range-mask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -39,6 +40,7 @@ export function maskitoDateRangeOptionsGenerator({
overwriteMode: 'replace',
preprocessors: [
createZeroPlaceholdersPreprocessor(),
createFullWidthToHalfWidthPreprocessor(),
normalizeDatePreprocessor({
dateModeTemplate,
rangeSeparator,
Expand Down
2 changes: 2 additions & 0 deletions projects/kit/src/lib/masks/date-time/date-time-mask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {MASKITO_DEFAULT_OPTIONS, MaskitoOptions} from '@maskito/core';

import {TIME_FIXED_CHARACTERS} from '../../constants';
import {
createFullWidthToHalfWidthPreprocessor,
createZeroPlaceholdersPreprocessor,
normalizeDatePreprocessor,
} from '../../processors';
Expand Down Expand Up @@ -39,6 +40,7 @@ export function maskitoDateTimeOptionsGenerator({
overwriteMode: 'replace',
preprocessors: [
createZeroPlaceholdersPreprocessor(),
createFullWidthToHalfWidthPreprocessor(),
normalizeDatePreprocessor({
dateModeTemplate,
dateSegmentsSeparator: dateSeparator,
Expand Down

0 comments on commit 363aca6

Please sign in to comment.