4

When we click on timepicker input it opens timepicker, but when we select time the input is filled with invalid date.

Please help me to solve this issue.

The same issue exist in their officeal demo also. https://agranom.github.io/ngx-material-timepicker/

If we cant use ngx-material-timepicker in IE and edge then please suggest me any one great timepicker that i can use in my angular 8 project. I am using angular material for my design.

Thanks in advance.

Kiran Shetty
  • 844
  • 7
  • 10

2 Answers2

2

Just try the ng-bootstrap timepicker

https://ng-bootstrap.github.io/#/components/timepicker/examples

<ngb-timepicker [(ngModel)]="time"></ngb-timepicker>
<hr>
<pre>Selected time: {{time | json}}</pre>

Stackblitz Example ng-bootstrap timepicker


Another alternative could be the ngx-bootstrap timepicker

https://valor-software.com/ngx-bootstrap/#/timepicker

<timepicker [(ngModel)]="mytime"></timepicker>
<pre class="alert alert-info">Time is: {{mytime}}</pre>

Stackblitz Example ngx-bootstrap timepicker


You can also try to install/use older package versions of ngx-material-timepicker and check if your error is gone. E.g.:

npm install --save ngx-material-timepicker@4.0.2
npm install --save ngx-material-timepicker@5.0.0
npm install --save ngx-material-timepicker@5.1.0
zerocewl
  • 11,401
  • 6
  • 27
  • 53
  • 1
    Thanks. I downgraded the timepicker version to 4.0.2 now it work fine both in IE and Edge. You made my work simple. Thank a lot. – Kiran Shetty Sep 23 '19 at 07:29
  • 1
    Np, thats the default way with npm. If you get an error, try an older package version ;-) – zerocewl Sep 23 '19 at 07:30
1

After debugging I've figured out that there is an issue with luxon library and IE supporting. Timepicker works in Edge. Here is the link that might help you to resolve your issue. https://moment.github.io/luxon/docs/manual/matrix.html