fetrarij / ngx-daterangepicker-material

Pure Angular 2+ date range picker with material design theme, a demo here:
https://fetrarij.github.io/ngx-daterangepicker-material/
MIT License
246 stars 247 forks source link

The date selected in the UI should be localized #487

Open LucasBrazi06 opened 1 year ago

LucasBrazi06 commented 1 year ago

Versions

Describe the bug The date selected in the UI (localized) should not be equals to the ISO date: image

To Reproduce Steps to reproduce the behavior:

  1. Go to your demo site: https://fetrarij.github.io/ngx-daterangepicker-material/simple
  2. Check the time

Have you imported all locales in Dayjs? https://day.js.org/docs/en/i18n/changing-locale

Expected behavior I should have the ISO date taking into account the time zone. It worked with previous version I had (5.0.2)

LucasBrazi06 commented 1 year ago

I set the locale to 'fr' but the formatted date is still in 'en': image

rikg93 commented 1 year ago

Same problem, @LucasBrazi06 did you find the solution?

marten790 commented 1 year ago

Having same problem here.

rikg93 commented 1 year ago

@marten790 I used 5.0.2 version and it works

marten790 commented 1 year ago

Im using 6.0.4 and on date range my left date picker always shows max UTC time on the left and max Local time on the right when I set max date to anything. Not sure if the issue returned in a later version

FrancoisCamus commented 1 year ago

After comparing 5.0.2 and 6.0.4, I found out that I needed to use esm version of dayjs like so:

import dayjs from 'dayjs/esm';

Hope this helps.

pantonis commented 7 months ago

@fetrarij Any fix for this critical bug?