From 1d138df7e40927472e77a5456658157f96f81d3c Mon Sep 17 00:00:00 2001 From: RistiCore Date: Fri, 26 Oct 2018 15:53:55 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=9F=D1=80=D0=B8=20=D0=BD=D0=B0=D0=B6?= =?UTF-8?q?=D0=B0=D1=82=D0=B8=D0=B8=20=D1=81=D1=82=D1=80=D0=B5=D0=BB=D0=BA?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8=20=D0=B2=D0=B2=D0=B5=D1=80=D1=85-=D0=B2?= =?UTF-8?q?=D0=BD=D0=B8=D0=B7=20=D0=B2=D0=B8=D0=B4=D0=BD=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=BA=20=D0=BA=D1=83=D1=80=D1=81=D0=BE=D1=80=20=D0=BA?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D0=BA=D0=BE=D0=B2=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=D0=BA=D0=B8=D0=B2=D0=B0=D0=B5=D1=82=20=D0=B2=20=D0=BD=D0=B0?= =?UTF-8?q?=D1=87=D0=B0=D0=BB=D0=BE/=D0=BA=D0=BE=D0=BD=D0=B5=D1=86=20?= =?UTF-8?q?=D0=B8=D0=BD=D0=BF=D1=83=D1=82=D0=B0=20(#163476)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/timepicker/timepicker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/timepicker/timepicker.ts b/src/lib/timepicker/timepicker.ts index 88b17e4e1..318dc6702 100644 --- a/src/lib/timepicker/timepicker.ts +++ b/src/lib/timepicker/timepicker.ts @@ -421,10 +421,14 @@ export class McTimepicker extends McTimepickerMixinBase this._currentDTimeInput = timeToApply; if (doTimestringReformat && timeToApply !== undefined) { + const selectionStart: number = this._elementRef.nativeElement.selectionStart; + const selectionEnd: number = this._elementRef.nativeElement.selectionEnd; this._renderer.setProperty( this._elementRef.nativeElement, 'value', this._getTimeStringFromDate(timeToApply, this.timeFormat)); + this._elementRef.nativeElement.selectionStart = selectionStart; + this._elementRef.nativeElement.selectionEnd = selectionEnd; } ( this.ngControl.control).updateValueAndValidity();