Posted 15 years ago by Michael Smit
Version: 4.5.0480
Avatar
Hi All,

I have a couple of questions regarding the DateTimePicker...

1: If the value is 4 May 2008 (just example date) and I set the Minimum and Maximum properties to be 20 April 2008 and 20 May 2008 respectively, the control is fine with the maximum date, but I cannot go back to April to select a range between 20 April 31 April. The arrow for going back a month is grayed out? Up to 20 May is fine though and works as expected.

2: How do I force day selections relative to a specific day of the way? In this case, I want users to only be able to select dates that fall on a Monday. Nothing else.
I have tried to see if there is a way of detecting the value selected before it is committed in the hopes I can do a check, then revert back to the previous Value if they did NOT select a Monday, but not found anything.

TIA :)

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Michael,

1. Could you please post your XAML code for the DateTimePicker? Or send over a sample project to our support address. We were unable to reproduce this behavior.

2. You would need to use a custom StyleSelector for the DateTimePicker.DayItemPresenterStyleSelector. The "MonthCalendar Day Highlights" QuickStart shows how this can be accomplished. You would want to use a custom Style that sets IsEnabled to false, if the DayItem.Date.DayOfWeek is not DayOfWeek.Monday.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.