ngx-daterangepicker-material icon indicating copy to clipboard operation
ngx-daterangepicker-material copied to clipboard

Encounter error "ERROR Error: Uncaught (in promise): TypeError: pl.weekdaysMin is not a function TypeError: pl.weekdaysMin is not a function".

Open mianghuei opened this issue 3 years ago • 5 comments

Versions

  • Angular version: 9.1.5
  • component version: 5.0.1

Describe the bug

  1. Import ngx-daterangepicker-material into app.module.
  2. Build Angular application in prod mode.
  3. Load website.
  4. Encounter error "ERROR Error: Uncaught (in promise): TypeError: pl.weekdaysMin is not a function TypeError: pl.weekdaysMin is not a function".

To Reproduce Steps to reproduce the behavior:

  1. see bug description for more information

Expected behavior Error not encountered.

Screenshots

Stackblitz link

Additional context Error does not occur in development mode. Downgrading to 4.0.1 gives the "Could not resolve moment/ts3.1-typings/moment" error everytime we recompile the code.

mianghuei avatar Jul 19 '21 06:07 mianghuei

hello can you fix this bug ?

caohothang avatar Jul 28 '21 12:07 caohothang

Exact same issue here. For some reason dayjs is not getting loaded when the Angular app is bundled with --prod flag.

lluisnieto avatar Aug 11 '21 14:08 lluisnieto

Facing the same issue. Angular 10. component version: 5.0.1 st.weekdaysMin is not a function

nikhilgrag avatar Aug 15 '21 04:08 nikhilgrag

Having the same issue Angular 9 component version 5.0.0

msoex avatar Aug 17 '21 09:08 msoex

A workaround for now is to set showWeekNumbers and showISOWeekNumbers to false:

<ngx-daterangepicker-material
   ...
   [showWeekNumbers]="false"
   [showISOWeekNumbers]="false"
>
</ngx-daterangepicker-material>

dopoto avatar Aug 17 '21 11:08 dopoto