Setting a static datetime in WPF/xaml

前端 未结 1 1132
野的像风
野的像风 2021-01-19 01:29

I\'m trying to blackout dates in my datetime picker control starting from day after today till datetime max value.

The below is the code:

    

        
1条回答
  •  囚心锁ツ
    2021-01-19 01:50

    You can create your own static property for this.

      public static class DateTimeHelper
      {
        public static DateTime Tomorrow
        {
          get { return DateTime.Today.AddDays(1); }
        }
      }
    

    .

      

    0 讨论(0)
提交回复
热议问题