[go: up one dir, main page]

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

jumpToDate 当前仅实现按天的跳转。需要根据时间单位跳转。 #122

Open
jiehanlin opened this issue Jul 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jiehanlin
Copy link

以下代码测试可用,供参考。如果jumpToDate 能加上offset 参数,提供跳转的偏移量,会更好。
function jumpToDate(_date: Date | undefined) {
EmitNoDateError(date.date); return;}
// date = date.getoffset(-Variables.time.millisecond0f.day * 5);
const offset = 1;
switch (ganttHeader.unit) {
case 'month':
date = date.getoffset(-Variables.time.millisecondof.week * offset4);
break;
case 'week':
date = date.getoffset(-Variables.time.millisecond0f.week
offset);
break;
case 'day':
date = date.getoffset(-Variables.time.millisecondof.day * offset);
break;
case 'hour':
date = date.getoffset(-Variables.time.millisecondof.hour * offset); break;
default:
date = date.getoffset(-Variables.time.millisecondof.day * offset);
break;
date.start0f(baseUnit(ganttHeader.unit));

@jiehanlin jiehanlin added the enhancement New feature or request label Jul 22, 2024
@jeremyjone
Copy link
Collaborator

month 和 week 的意义不大。hour 倒是可以考虑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants