Skip to content

Commit

Permalink
chore(date-editor): fix lint errors #6271
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipata committed Apr 14, 2020
1 parent 06948b4 commit 4c10f6b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ export abstract class DatePickerUtil {
return mask.join('');
}
/**
* This method parses an input string base on date parts and returns a date and its validation state.
* @param dateFormatParts
* @param prevDateValue
* @param inputValue
* @returns object containing a date and its validation state
*/
* This method parses an input string base on date parts and returns a date and its validation state.
* @param dateFormatParts
* @param prevDateValue
* @param inputValue
* @returns object containing a date and its validation state
*/
public static parseDateArray(dateFormatParts: any[], prevDateValue: Date, inputValue: string): any {
const dayStr = DatePickerUtil.getDayValueFromInput(dateFormatParts, inputValue);
const monthStr = DatePickerUtil.getMonthValueFromInput(dateFormatParts, inputValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
/**
* An @Input property that allows you to set the locale settings used in `displayFormat`.
* @example
*```html
* ```html
* <input igxDateTimeEditor [locale]="'en'">
*```
* ```
*/
@Input()
public locale: string;

/**
* An @Input property that allows you to set the minimum possible value the editor will allow.
* @example
*```html
* ```html
* <input igxDateTimeEditor [minValue]="minDate">
*```
* ```
*/
public get minValue(): string | Date {
return this._minValue;
Expand All @@ -79,9 +79,9 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
/**
* An @Input property that allows you to set the maximum possible value the editor will allow.
* @example
*```html
* ```html
* <input igxDateTimeEditor [maxValue]="maxDate">
*```
* ```
*/
public get maxValue(): string | Date {
return this._maxValue;
Expand All @@ -96,9 +96,9 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
/**
* An @Input property that allows you to specify if the currently spun date segment should loop over.
* @example
*```html
* ```html
* <input igxDateTimeEditor [isSpinLoop]="false">
*```
* ```
*/
@Input()
public isSpinLoop = true;
Expand All @@ -107,9 +107,9 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
* An @Input property that allows you to set both pre-defined format options such as `shortDate` and `longDate`,
* as well as constructed format string using characters supported by `DatePipe`, e.g. `EE/MM/yyyy`.
* @example
*```html
* ```html
* <input igxDateTimeEditor [displayFormat]="'shortDate'">
*```
* ```
*/
@Input()
public displayFormat: string;
Expand All @@ -118,9 +118,9 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
* An @Input property that allows you to get/set the expected user input format(and placeholder).
* for the editor.
* @example
*```html
* ```html
* <input [igxDateTimeEditor]="'dd/MM/yyyy'">
*```
* ```
*/
@Input(`igxDateTimeEditor`)
public set inputFormat(value: string) {
Expand Down Expand Up @@ -216,7 +216,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
public ngOnChanges(changes: SimpleChanges) {
if (changes['inputFormat'] || changes['locale']) {
this._inputDateParts = DatePickerUtil.parseDateTimeFormat(this.inputFormat);
this.inputFormat = this._inputDateParts.map(p => p.format).join('');;
this.inputFormat = this._inputDateParts.map(p => p.format).join('');
if (!this.nativeElement.placeholder) {
this.renderer.setAttribute(this.nativeElement, 'placeholder', this.inputFormat);
}
Expand All @@ -233,9 +233,9 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
}

/**
* Increment specified DatePart.
* @param datePart The optional DatePart to increment. Defaults to Date or Hours(when Date is absent from the inputFormat - ex:'HH:mm').
*/
* Increment specified DatePart.
* @param datePart The optional DatePart to increment. Defaults to Date or Hours(when Date is absent from the inputFormat - ex:'HH:mm').
*/
public increment(datePart?: DatePart): void {
const targetDatePart = this.targetDatePart;
if (!targetDatePart) { return; }
Expand All @@ -247,10 +247,10 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
}

/**
* Decrement specified DatePart.
*
* @param datePart The optional DatePart to decrement. Defaults to Date or Hours(when Date is absent from the inputFormat - ex:'HH:mm').
*/
* Decrement specified DatePart.
*
* @param datePart The optional DatePart to decrement. Defaults to Date or Hours(when Date is absent from the inputFormat - ex:'HH:mm').
*/
public decrement(datePart?: DatePart): void {
const targetDatePart = this.targetDatePart;
if (!targetDatePart) { return; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class UIInteractions {
if (selectionStart > selectionEnd) {
return Error('Selection start should be less than selection end position');
}
//target.triggerEventHandler('focus', {});
// target.triggerEventHandler('focus', {});
const inputEl = target.nativeElement as HTMLInputElement;
inputEl.setSelectionRange(selectionStart, selectionEnd);
for (let i = 0; i < characters.length; i++) {
Expand Down

0 comments on commit 4c10f6b

Please sign in to comment.