* Add a long-time of the end field.

This commit is contained in:
tianshujie
2023-11-29 10:53:24 +08:00
parent a3c8d0ad95
commit b720e735cb
3 changed files with 28 additions and 2 deletions
+7 -1
View File
@@ -109,6 +109,8 @@ function computeEndDate(delta)
$end.$.setDate('');
$end.render({disabled: true});
outOfDateTip();
$('#end').addClass('hidden');
$('#end').next().removeClass('hidden');
return false;
}
@@ -121,9 +123,13 @@ function computeEndDate(delta)
delta = (weekend == 2) ? (delta - 2) : (delta - 1);
}
$('#end').removeClass('hidden');
$('#end').next().addClass('hidden');
const endDate = zui.formatDate(zui.addDate(beginDate, delta - 1), 'yyyy-MM-dd');
$end.$.setDate(endDate);
$end.$.setValue(endDate);
computeWorkDays();
}
/**
+10
View File
@@ -110,6 +110,16 @@ formPanel
set::required(true),
set::value(''),
on::change('computeWorkDays')
),
inputControl
(
setClass('has-suffix-icon w-full hidden'),
to::suffix(icon('calendar')),
input
(
set::value($lang->project->longTime),
set::disabled(true)
)
)
)
),
+11 -1
View File
@@ -113,8 +113,18 @@ formPanel
set::value($program->end),
set::placeholder($lang->project->end),
set::required(true),
$program->end == LONG_TIME ? set::disabled(true) : null,
$program->end == LONG_TIME ? setClass('hidden') : null,
on::change('computeWorkDays')
),
inputControl
(
setClass('has-suffix-icon w-full' . ($program->end != LONG_TIME ? ' hidden' : '')),
to::suffix(icon('calendar')),
input
(
set::value($lang->project->longTime),
set::disabled(true)
)
)
)
),