Skip to content

Commit

Permalink
feat(kit)!: delete deprecated separator for DateRange (use use `d…
Browse files Browse the repository at this point in the history
…ateSeparator` instead) (#790)
  • Loading branch information
nsbarsukov authored Dec 18, 2023
1 parent e919963 commit 17b0a62
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Use
<code>mode</code>
and
<code>separator</code>
<code>dateSeparator</code>
parameters to get a mask with a locale specific representation of dates.
</ng-template>
<date-range-mask-doc-example-1></date-range-mask-doc-example-1>
Expand Down Expand Up @@ -181,22 +181,6 @@
>
Maximal length of the range
</ng-template>

<ng-template
documentationPropertyMode="input"
documentationPropertyName="separator"
[documentationPropertyDeprecated]="true"
>
Use
<code>dateSeparator</code>
instead.

<p>
<strong>Default:</strong>
<code>.</code>
(dot).
</p>
</ng-template>
</tui-doc-documentation>
</ng-template>
</tui-doc-page>
8 changes: 1 addition & 7 deletions projects/kit/src/lib/masks/date-range/date-range-mask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<MaskitoDateSegments<number>>;
Expand Down

0 comments on commit 17b0a62

Please sign in to comment.