katemihalikova / ion-datetime-picker

Date and/or time picker for awesome Ionic framework
MIT License
168 stars 101 forks source link

is there a way to get a callback when ok is pressed? #4

Closed pliablepixels closed 8 years ago

pliablepixels commented 8 years ago

Hi, is there a way to get a callback when ok is pressed?

I need to call a custom function to update a view. I can do a watch for the ng-model, but its more expensive

katemihalikova commented 8 years ago

Hi, you can use ng-change in the same way as with any other input element.

<ion-item ion-datetime-picker ng-model="datetimeValue" ng-change="datetimeChanged()">
pliablepixels commented 8 years ago

Ah yes of course. Thank you very much for this lovely library.

katemihalikova commented 8 years ago

Thanks for using it!