akveo / akveo/nebular

nb-datepicker issue with NbDateFnsDateModule

Đang mở
#1,360 4 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug module:components quality
Ngôn ngữ chính
TypeScript
Star
8.1k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Issue type

**I'm submitting a ...** (check one with "x")

* [X] bug report
* [ ] feature request

### Issue description

**Current behavior:**
After installing `@nebular/date-fns` and importing `NbDateFnsDateModule` from `app.module.ts` I still get this error printed in the console:

> ERROR Error: Can't format native date. To use custom formatting you have to install @nebular/moment or @nebular/date-fns package and import NbMomentDateModule or NbDateFnsDateModule accordingly.More information at "Formatting issue" https://akveo.github.io/nebular/docs/components/datepicker/overview#nbdatepickercomponent

**Expected behavior:**
I don't know if the component is parsing correctly the date, but when I select a date I can see it displayed correctly in the format I've set.

**Related code:**
My nb-datepicker code:

```


Birthday





```

PLEASE NOTE: this might be related to #1088 (now closed) but it is still there.

EDIT: I've also noticed that the format is wrong: If I choose "April 8, 2019" (today) I get "2019-04-08" in the input field, but fetching from TS I get: ""2019-04-07T22:00:00.000Z" that is 1 day backward and contains "T22:00:00.000Z" that cause problem server-side.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.