i'm developing WPF application in that i'm trying to disable the past days in calender. any way is there to disable the past days.please let me know.
thanks
You have to set the DisplayDateStart
attribute with Today's date
<DatePicker Name="dt_StartDateFrom" DisplayDateStart="{x:Static sys:DateTime.Today}">
</DatePicker>
Make sure you have set the
xmlns:sys="clr-namespace:System;assembly=mscorlib"
in your <UserControl>
tag to be able to use the sys:
parameter
P.S. To Disable future dates, you can use DisplayDateEnd
attribute
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With