Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2026-05-23 11:41:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e862d5ca55e90f74324003cfaaa71c87f4235cc9
e862d5ca
1 parent
a9529900
fix(datetime): 补齐日期时间组件日期边界限制
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
src/components/DateTimePickerField/index.vue
src/components/DateTimePickerField/index.vue
View file @
e862d5c
...
...
@@ -213,6 +213,15 @@ onMounted(() => {
// 设置默认值
currentDate.value = [Year, Month, Day];
currentTime.value = [Hour, Minute];
// 设置默认最大最小日期
if (data_minvalue.split(" ")[0].length) {
const min = data_minvalue.split(" ")[0].split("-");
minDate.value = new Date(+min[0], +min[1] - 1, +min[2]);
}
if (data_maxvalue.split(" ")[0].length) {
const max = data_maxvalue.split(" ")[0].split("-")
maxDate.value = new Date(+max[0], +max[1] - 1, +max[2])
}
// 设置默认最大最小时间
if (data_minvalue.split(" ")[1]) {
minTime.value = data_minvalue.split(" ")[1];
...
...
Please
register
or
login
to post a comment