akveo / akveo/nebular

Default date adapter

未关闭
#2,252 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
enhancement needs triage
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

_Originally posted by @cwmrowe in https://github.com/akveo/nebular/issues/1056#issuecomment-565074447_

I have been having issues with the datepicker too but I think I undertstand it now.

Any time you import `NbDatepickerModule` and you want to use the format function you must include your format module (e.g. `NbMomentDateModule`) AFTER `NbDatepickerModule`. I believe this is because `NbDatepickerModule` provides `NbNativeDateService` (NatveDate) for use as the `NbDateService` by default, and in this case we want to override that with `NbMomentDateService` from `NbMomentDateModule`.

I think it would be simpler if Nebular made you choose the default `NbDateService`, rather than making `NbNativeDateService` default and forcing you to override it every time you include `NbDatepickerModule`.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。