From 17b0a6224ab7408d2084523dd5e890712acec1a2 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Mon, 18 Dec 2023 12:54:52 +0300 Subject: [PATCH] feat(kit)!: delete deprecated `separator` for `DateRange` (use use `dateSeparator` instead) (#790) --- .../date-range-mask-doc.component.ts | 2 -- .../date-range-mask-doc.template.html | 18 +----------------- .../lib/masks/date-range/date-range-mask.ts | 8 +------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/projects/demo/src/pages/kit/date-range/date-range-mask-doc.component.ts b/projects/demo/src/pages/kit/date-range/date-range-mask-doc.component.ts index 696517b94..dc37e63c8 100644 --- a/projects/demo/src/pages/kit/date-range/date-range-mask-doc.component.ts +++ b/projects/demo/src/pages/kit/date-range/date-range-mask-doc.component.ts @@ -67,8 +67,6 @@ export class DateRangeMaskDocComponent implements GeneratorOptions { ]; mode: MaskitoDateMode = this.modeOptions[0]; - // TODO: drop in v2.0 - separator = '.'; minStr = this.minMaxOptions[0]; maxStr = this.minMaxOptions[1]; min = new Date(this.minStr); diff --git a/projects/demo/src/pages/kit/date-range/date-range-mask-doc.template.html b/projects/demo/src/pages/kit/date-range/date-range-mask-doc.template.html index 62ffdf935..a4203f1ec 100644 --- a/projects/demo/src/pages/kit/date-range/date-range-mask-doc.template.html +++ b/projects/demo/src/pages/kit/date-range/date-range-mask-doc.template.html @@ -17,7 +17,7 @@ Use mode and - separator + dateSeparator parameters to get a mask with a locale specific representation of dates. @@ -181,22 +181,6 @@ > Maximal length of the range - - - Use - dateSeparator - instead. - -

- Default: - . - (dot). -

-
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 6c5d4bb7a..531104715 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 @@ -13,20 +13,14 @@ import {createSwapDatesPostprocessor} from './processors/swap-dates-postprocesso export function maskitoDateRangeOptionsGenerator({ mode, - separator = '.', min, max, minLength, maxLength, - dateSeparator = separator, + dateSeparator = '.', rangeSeparator = `${CHAR_NO_BREAK_SPACE}${CHAR_EN_DASH}${CHAR_NO_BREAK_SPACE}`, }: { mode: MaskitoDateMode; - /** - * @deprecated use `dateSeparator` instead - * TODO: drop in v2.0 - */ - separator?: string; min?: Date; max?: Date; minLength?: Partial>;