EditDateTime: Support for DayEnd

git-svn-id: svn://ultimatepp.org/upp/trunk@6611 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-11-27 10:35:23 +00:00
parent fef5ec23bb
commit 331df4881a

View file

@ -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();
}