Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]甘特图按月份展示时slider展示位置不正确 #53

Closed
GeassAthena opened this issue Jul 4, 2023 · 5 comments
Closed

[BUG]甘特图按月份展示时slider展示位置不正确 #53

GeassAthena opened this issue Jul 4, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@GeassAthena
Copy link

GeassAthena commented Jul 4, 2023

Describe the bug
如图所示起始日期为4月28日,但是展示时出现在5月的位置,选择按天和按周展示时所属月份是正常显示的

Expected behavior
在正确的月份显示

Screenshots
image

Versions

  • Version 2.0.4
  • Browser edge
@GeassAthena GeassAthena added the bug Something isn't working label Jul 4, 2023
@GeassAthena
Copy link
Author

此外,表格头部的日、周展示格式是否可更改或者配置,2.04版本日的显示是纯数字,但是2.1.0版本变成类似于 1th 的展示形式,尝试过dayjs国际化,但是没有发生变化
image

@jeremyjone
Copy link
Collaborator

日期位置问题,给我复现代码

表头内容问题,你可以看一下当前是什么语言:

dayjs.locale('zh-cn');

console.log('main', dayjs.locale());

@GeassAthena
Copy link
Author

GeassAthena commented Jul 5, 2023

日期位置问题,给我复现代码

表头内容问题,你可以看一下当前是什么语言:

dayjs.locale('zh-cn');

console.log('main', dayjs.locale());

关于表头内容问题

image

image

版本号 => "@xpyjs/gantt": "^2.1.0"

@Lee-shung
Copy link

image
我也一样 但是demo确实没问题

@GeassAthena
Copy link
Author

日期位置问题,给我复现代码

表头内容问题,你可以看一下当前是什么语言:

dayjs.locale('zh-cn');

console.log('main', dayjs.locale());

关于日期位置

我将demo代码复制到项目中执行效果如下:

按月展示:image

按天展示image

甘特图配置和demo中的一致,使用的数据为

const ganttData = reactive([{
      index: '2',
      type: 1,
      startDate: new Date('2022-02-19'),
      endDate: new Date('2022-07-24'),
      children: [
        {
          index: '20000001',
          startDate: new Date('2022-03-09'),
          endDate: new Date('2022-07-17'),
          children: [
            {
              index: '2000000101',
              startDate: new Date('2022-03-09'),
              endDate: new Date('2022-07-17'),
              children: [],
            },
            {
              index: '2000000102',
              startDate: new Date('2022-03-09'),
              endDate: new Date('2022-06-19'),
              children: [],
            },
          ],
        },
      ],
    },
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants