We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.8.4
https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/calendar/_example/calendar.wxs#L3
有问题的代码片段 function getDateByTimestamp(val) { var date = getDate(val); return [date.getFullYear(), date.getMonth() < 10 ? '0' + ( date.getMonth() + 1) : date.getMonth() + 1, date.getDate() < 10 ? '0' + date.getDate() : date.getDate()].join('-'); }
选择 2024 年 10 月中一天,预期展示正常,2024-10-01
选择 2024 年 10 月中一天,预期展示正常,2024-010-01
No response
function getDateByTimestamp(val) { var date = getDate(val); return [date.getFullYear(), date.getMonth() + 1 < 10 ? '0' + ( date.getMonth() + 1) : date.getMonth() + 1, date.getDate() < 10 ? '0' + date.getDate() : date.getDate()].join('-'); }
The text was updated successfully, but these errors were encountered:
👋 @leehave,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
tdesign-miniprogram 版本
1.8.4
重现链接
https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/calendar/_example/calendar.wxs#L3
重现步骤
有问题的代码片段
function getDateByTimestamp(val) {
var date = getDate(val);
return [date.getFullYear(), date.getMonth() < 10 ? '0' + ( date.getMonth() + 1) : date.getMonth() + 1, date.getDate() < 10 ? '0' + date.getDate() : date.getDate()].join('-');
}
期望结果
选择 2024 年 10 月中一天,预期展示正常,2024-10-01
实际结果
选择 2024 年 10 月中一天,预期展示正常,2024-010-01
基础库版本
No response
补充说明
function getDateByTimestamp(val) {
var date = getDate(val);
return [date.getFullYear(), date.getMonth() + 1 < 10 ? '0' + ( date.getMonth() + 1) : date.getMonth() + 1, date.getDate() < 10 ? '0' + date.getDate() : date.getDate()].join('-');
}
The text was updated successfully, but these errors were encountered: