Search code examples
angularangular-materialtimepicker

ngx-material-timepicker not working on IE and Edge


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.


Solution

  • 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 [email protected]
    npm install --save [email protected]
    npm install --save [email protected]