MonthCalendar resetting time

Editors for WPF Forum

Posted 14 years ago by John Dunn
Avatar
If I use the MonthCalendar directly, when the user selects a day it resets the time to be 12AM. Is there a way to stop this behavior? I assume so since the DateTime dropdown does not reset the time when the Date is selected.

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi John,

The DateTimeEditBox merges the MonthCalendar.SelectedDate with it's current value, so the MonthCalendar isn't trying to preserve the time.

You can achieve something similar using an attached behavior. I'd create an attached property called SelectedDateTime and then bind to that. The behavior would then keep MonthCalendar.SelectedDate in sync by attaching to the MonthCalendar.SelectionChanged.

I've marked down a TODO item to see about adding this support natively, but we'd have to work out how to handle multiple selections.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.