@@ -18,7 +18,7 @@ import {
1818 AfterViewInit ,
1919 Injector ,
2020 PipeTransform ,
21- LOCALE_ID , Optional , ContentChildren , QueryList , OnChanges , SimpleChanges , HostListener
21+ LOCALE_ID , Optional , ContentChildren , QueryList , HostListener
2222} from '@angular/core' ;
2323import {
2424 ControlValueAccessor ,
@@ -112,7 +112,6 @@ export class IgxTimePickerComponent extends PickerBaseDirective
112112 IgxTimePickerBase ,
113113 ControlValueAccessor ,
114114 OnInit ,
115- OnChanges ,
116115 OnDestroy ,
117116 AfterViewInit ,
118117 Validator {
@@ -628,6 +627,22 @@ export class IgxTimePickerComponent extends PickerBaseDirective
628627 }
629628 }
630629
630+ /** @hidden @internal */
631+ public getPartValue ( value : Date , type : string ) : string {
632+ const inputDateParts = DateTimeUtil . parseDateTimeFormat ( this . inputFormat ) ;
633+ const part = inputDateParts . find ( element => element . type === type ) ;
634+ return DateTimeUtil . getPartValue ( value , part , part . format . length ) ;
635+ }
636+
637+ /** @hidden @internal */
638+ public toISOString ( value : Date ) : string {
639+ return value . toLocaleTimeString ( 'en-GB' , {
640+ hour : '2-digit' ,
641+ minute : '2-digit' ,
642+ second : '2-digit' ,
643+ } ) ;
644+ }
645+
631646 // #region ControlValueAccessor
632647
633648 /** @hidden @internal */
@@ -690,13 +705,6 @@ export class IgxTimePickerComponent extends PickerBaseDirective
690705 }
691706 }
692707
693- /** @hidden @internal */
694- public ngOnChanges ( changes : SimpleChanges ) : void {
695- if ( changes [ 'minValue' ] || changes [ 'maxValue' ] ) {
696- // this.setContainer();
697- }
698- }
699-
700708 /** @hidden */
701709 public ngOnDestroy ( ) : void {
702710 this . _destroy$ . next ( ) ;
@@ -1008,12 +1016,6 @@ export class IgxTimePickerComponent extends PickerBaseDirective
10081016 } ) ;
10091017 }
10101018
1011- public getPartValue ( value : Date , type : string ) : string {
1012- const inputDateParts = DateTimeUtil . parseDateTimeFormat ( this . inputFormat ) ;
1013- const part = inputDateParts . find ( element => element . type === type ) ;
1014- return DateTimeUtil . getPartValue ( value , part , part . format . length ) ;
1015- }
1016-
10171019 private validateDropdownValue ( date : Date , isAmPm = false ) : Date {
10181020 if ( date > this . maxDropdownValue ) {
10191021 if ( isAmPm && date . getHours ( ) !== this . maxDropdownValue . getHours ( ) ) {
@@ -1108,14 +1110,6 @@ export class IgxTimePickerComponent extends PickerBaseDirective
11081110 return DateTimeUtil . isValidDate ( value ) ? value : DateTimeUtil . parseIsoDate ( value ) ;
11091111 }
11101112
1111- public toISOString ( value : Date ) : string {
1112- return value . toLocaleTimeString ( 'en-GB' , {
1113- hour : '2-digit' ,
1114- minute : '2-digit' ,
1115- second : '2-digit' ,
1116- } ) ;
1117- }
1118-
11191113 private toTwentyFourHourFormat ( hour : number , ampm : string ) : number {
11201114 if ( ampm === 'PM' && hour < 12 ) {
11211115 hour += 12 ;
0 commit comments