سؤال

I have two DateTimePicker Controls in Win Api/WTL/ATL, the first represents a start date and the second one represents the end date, how can I restrict the date selected on the second one to be 'later' than the one selected in the first one?

هل كانت مفيدة؟

المحلول

Controls send "standard" DTN_DATETIMECHANGE notifications on value changes. So you need to handle those from both controls and adjust values appropriately, e.g. updating the value of the other control so that "start < stop" at all times.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top