mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
EditDateTime: Support for DayEnd
git-svn-id: svn://ultimatepp.org/upp/trunk@6611 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
fef5ec23bb
commit
331df4881a
1 changed files with 10 additions and 1 deletions
|
|
@ -428,7 +428,16 @@ class DateTimeCtrl : public T {
|
|||
int mode;
|
||||
|
||||
void OnCalendarChoice() {
|
||||
this->SetData(~cc.calendar);
|
||||
Date dt = ~cc.calendar;
|
||||
ConvertTime *cv = dynamic_cast<ConvertTime *>(this);
|
||||
if(cv && cv->IsDayEnd()) {
|
||||
Time tm = ToTime(dt);
|
||||
tm.hour = 23;
|
||||
tm.minute = tm.second = 59;
|
||||
this->SetData(tm);
|
||||
}
|
||||
else
|
||||
this->SetData(dt);
|
||||
this->WhenAction();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue