question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'minutesGap' of undefined

See original GitHub issue

Hello,

I’m having the following issue after upgrading to Angular 9 and v5.4.0 of ngx-material-timepicker.

core.js:3866 ERROR TypeError: Cannot read property 'minutesGap' of undefined
    at TimepickerDirective.set [as value] (ngx-material-timepicker.js:1350)
    at Object.ngOnChangesSetInput [as setInput] (core.js:19023)
    at setInputsForProperty (core.js:8846)
    at elementPropertyInternal (core.js:7933)
    at Module.ɵɵproperty (core.js:14184)
    at DatetimePickerRangeComponent_Template (datetime-picker-range.component.html:51)
    at executeTemplate (core.js:7562)
    at refreshView (core.js:7439)
    at refreshComponent (core.js:8569)
    at refreshChildComponents (core.js:7242)
    at refreshView (core.js:7485)
    at refreshDynamicEmbeddedViews (core.js:8505)
    at refreshView (core.js:7459)
    at refreshDynamicEmbeddedViews (core.js:8505)
    at refreshView (core.js:7459)
    at refreshComponent (core.js:8569)

Timepicker is used as follow.

<input
  matInput
  placeholder="start time"
  aria-label="start time"
  [ngxTimepicker]="startTime"
  [format]="24"
  [value]="startTimeValue"
/>
<ngx-material-timepicker-toggle
  class="svg-color"
  [for]="startTime"
></ngx-material-timepicker-toggle>
<ngx-material-timepicker
  #startTime
  [defaultTime]="startTimeValue"
  [minutesGap]="5"
  (timeSet)="onChangeHourStartTime($event)"
></ngx-material-timepicker>

But [minutesGap] is defined on <ngx-material-timepicker>. Am I missing something ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Agranomcommented, May 12, 2020

Try to bind [value] after [ngxTimepicker]. It seems that order is matter.

0reactions
ti4lucianocommented, May 12, 2020

Thank you very much, it worked here. I put the value directly on the form and it worked. Thanks again for everyone’s help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting minutesGap issue in ngx-timepicker after updated ...
core.js:5967 ERROR TypeError: Cannot read property 'minutesGap' of undefined at TimepickerDirective.set (ngx-timepicker.directive.ts:94).
Read more >
ERROR TypeError: Cannot read property 'minutesGap' of ...
Hi I have updated Angular to Version 10 and also took latest version of ngx-material-timepicker which is 5.5.3 but I am getting issues...
Read more >
ngx-material-timepicker - npm package - Snyk
minutesGap : number, To define a gap between minutes. Set 1 by default. @Input(). defaultTime: string, Set default time for a timepicker. 12:00...
Read more >
ngx-material-timepicker - npm
Handy material design timepicker for angular. Latest version: 5.5.3, last published: 3 years ago. Start using ngx-material-timepicker in ...
Read more >
Untitled
Uncaught TypeError: Cannot read property 'timepicker' of undefined means that $.ui. ... ERROR TypeError: Cannot read property 'minutesGap' of undefined at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found