admin管理员组文章数量:1341411
After selecting date time from owl date time picker event is not firing.
<label style='margin-right:5px ;margin-left:210px'>
Date Time:
<input [owlDateTimeTrigger]="dt" [owlDateTime]="dt" class="form-control" placeholder="Date time Picker" (change)="getScheduledTime($event)">
<owl-date-time #dt ></owl-date-time>
</label>
After selecting date time from owl date time picker event is not firing.
<label style='margin-right:5px ;margin-left:210px'>
Date Time:
<input [owlDateTimeTrigger]="dt" [owlDateTime]="dt" class="form-control" placeholder="Date time Picker" (change)="getScheduledTime($event)">
<owl-date-time #dt ></owl-date-time>
</label>
Share
Improve this question
asked Oct 9, 2018 at 11:23
kanchan belekanchan bele
531 gold badge2 silver badges9 bronze badges
2
- I think ngModelChange will work – Asanka Commented Oct 9, 2018 at 11:51
- I have added one working solution please check and let me know if any error. – Karnan Muthukumar Commented Oct 9, 2018 at 12:27
2 Answers
Reset to default 10Let Try this once, It's working fine tested, Html File,
<input placeholder="Date Time:"
[(ngModel)]="dateTime"
[owlDateTimeTrigger]="dt" [owlDateTime]="dt"
(ngModelChange)="onChange($event)" <!--here added -->
>
Typescript,
onChange(data) {
alert("Triggered" + data);
console.log("Triggered", data);
}
Screenshot,
I hope its solve your problem.
Thanks,
Muthukumar
you can use ngModelChange for this
(ngModelChange)="getScheduledTime($event)"
本文标签: javascriptowldatetimeevent is not trigerring on date time selectStack Overflow
版权声明:本文标题:javascript - owl-date-time : event is not trigerring on date time select? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743660915a2517933.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论