ngbDateTimepicker,如何在angular2中获取更改事件

时间:2018-04-26 06:23:17

标签: angular2-forms

我在我的代码中使用ngbDateTimePicker并尝试获取更改的值,但我无法得到它。我正在尝试点击,ngmodelchange,但没有任何工作可以任何人建议我如何做到这一点,请。

以下是我的代码

<datastore-index source="manual" ancestor="true" kind="Task">
  <property direction="asc" name="appName"/>
  <property direction="desc" name="RequestTime"/>
</datastore-index>

<datastore-index source="manual" ancestor="true" kind="ServerLogFile">
    <property direction="desc" name="LastDate"/>
</datastore-index>

1 个答案:

答案 0 :(得分:0)

&#13;
&#13;
Men, your 'ngModelChange' works when you are simple using ngModel approach. When I want to use masked inputs to add "/", I need to implement my own ControlValueAccessor, that's fail at all.
Just a EventEmitter output property in ngb-datepicker, that can allow us to subscribe changes (like, 'valueChanges' of forms), it will help us a lot!
&#13;
&#13;
&#13;