将ngx-timepicker-field与输入关联

时间:2019-10-30 19:23:21

标签: angular timepicker

我想将输入与https://www.npmjs.com/package/ngx-material-timepicker中的ngx-timepicker-field关联。当我这样使用ngx-material-timepicker时,它起作用了:

<input
 matInput
 [ngxTimepicker]="picker"
 [format]="24"
/>
<ngx-material-timepicker #picker></ngx-material-timepicker>

但是当我只改变

<ngx-material-timepicker #picker></ngx-material-timepicker>

进入

<ngx-timepicker-field #picker></ngx-timepicker-field>

我收到错误消息:

SingularActionDesignComponent.html:13 ERROR TypeError: this._timepicker.registerInput is not a function
    at TimepickerDirective.registerTimepicker (ngx-material-timepicker.js:764)
    at TimepickerDirective.set timepicker [as timepicker] (ngx-material-timepicker.js:699)
    at updateProp (core.js:32189)
    at checkAndUpdateDirectiveInline (core.js:31871)
    at checkAndUpdateNodeInline (core.js:44367)
    at checkAndUpdateNode (core.js:44306)
    at debugCheckAndUpdateNode (core.js:45328)
    at debugCheckDirectivesFn (core.js:45271)
    at Object.eval [as updateDirectives] (SingularActionDesignComponent.html:34)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:45259)

最终还有其他一些不错的非引导程序库可供选择吗?

0 个答案:

没有答案