You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用@nivo/calendar无法展示单一年份问题求助

@nivo/calendar 单年份展示时区相关问题

我想用@nivo/calendar展示2016全年每一天的数据,所有日期均在有效范围内,但遇到了以下问题:

  • 将起始日期设为2016-01-01时,会同时显示2015和2016两个年份的日历
  • 设为2016-01-02时仅显示2016年,但会缺失1月1日的数据

我猜测这是时区相关的bug,请问有人遇到过该问题吗?

代码示例

from="2016-01-02" // setting from to 2016-01-01 causes bug where two years are shown instead of one
to="2016-12-31"

内容的提问来源于stack exchange,提问作者rsilva

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.01 17:01:15