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

fix: always consider timezone when set allday schedule period(fix #662) #667

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

lhysdl
Copy link

@lhysdl lhysdl commented Jul 23, 2020

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description


Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

@lhysdl lhysdl changed the title fix: always consider timezone when set allday schedule period(fix #… fix: always consider timezone when set allday schedule period(fix #662) Jul 23, 2020
@seonim-ryu
Copy link
Member

Can one of the admins verify this patch?

@lhysdl
Copy link
Author

lhysdl commented Jul 23, 2020

@jungeun-cho

@jungeun-cho
Copy link
Contributor

ok to test

Comment on lines 273 to 275
if (util.isString(start)) {
start = datetime.parse(start.substring(0, 10));
} else {
start = new TZDate(start || Date.now());
}
if (util.isString(end)) {
end = datetime.parse(end.substring(0, 10));
} else {
end = new TZDate(end || this.start);
}

this.start = start;
this.start = new TZDate(start || Date.now());
this.start.setHours(0, 0, 0);
this.end = end || new TZDate(this.start);
this.end = new TZDate(end || this.start);
this.end.setHours(23, 59, 59);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use start, end of datetime
https://github.com/nhn/tui.calendar/blob/master/src/js/common/datetime.js#L396
https://github.com/nhn/tui.calendar/blob/master/src/js/common/datetime.js#L408

    this.start = datetime.start(new TZDate(start || Date.now()));
    this.end = datetime.end(new TZDate(end || this.start));

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just modified.

Copy link
Contributor

@jungeun-cho jungeun-cho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[07/23]reviewed :)

@jungeun-cho
Copy link
Contributor

@dongsik-yoo check this PR.
I will modify the IE9 related TC. (parse date format issues +09:00)

@stale
Copy link

stale bot commented Aug 22, 2020

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Aug 22, 2020
@stale stale bot removed the inactive label Aug 24, 2020
@jungeun-cho jungeun-cho merged commit 1512dc6 into nhn:master Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants