Timepicker change listener not working



I upgraded to 3.x.x and I noticed that propertyChange event is no longer working on my Timepicker
<TimePicker hour="{{ testTime.getHour() }}" minute="{{ testTime.getMinute() }}" propertyChange="onTimeChange"></TimePicker>
I realize theres a timeChange even and I’m using that instead:
<TimePicker hour="{{ testTime.getHour() }}" minute="{{ testTime.getMinute() }}" timeChange="onTimeChange" id="timepicker"></TimePicker>
Also, I have tried attaching an on listener on the js side with timepicker.on('timeChange', ...)
But it still doesnt work. ANy ideas? (I’m using JS)


I ran into the same problem, but I use angular. I implemented the timeChange event like you, and then set the time to my codebehind member. like so:

<TimePicker time="{{testTime}}" timeChange="onTimeChange($event)" 


Thanks @shawn-pavel, this still doesnt work for JS though.


What doesn’t work exactly? Does the onTimeChange event not get fired? Or does the time not get set?


The time gets set (when I use a date type), but the onTimeChange doesn’t fire.


Perhaps without the ($event) ? I’ve never uses plain nativescript, but the examples I see are formatted without the parameters. So I’m guessing here.


Tried that also. And a lot more variations but it wouldn’t work.


I noticed now that after setting the time, getting the element by id and attaching the listener works.
e.g timepicker .on('timeChange', ...) , I wonder why it doesn’t work from xml though.