24 hour notation for TimePicker in Android using NS with Angular 2


#1

The TimePicker component does not show 24 hour notation when locales / timezone is set within Android device. This works fine for iOS.

I wanted to use this bit of code to make it work:

if (application.android) {
    tPicker.nativeElement.android.setIs24HourView(java.lang.Boolean.TRUE);
}

When i try to access the android property on the nativeElement is gives me null. For iOS i can access the ios property of the nativeElement. tPicker is an ElementRef.

Could anyone help me in the right direction?


#2

What about accessing the tPicker’s underlying native component like tPicker.android. Not even sure where nativeElement came from.


#3

Hello Peter,

Thank you for your reply. The nativeElement comes from Angular and is the only property accessible on the ElementRef. There is no android property on the ElementRef.