思路:设置最大值和最小值即可 deToTime.Properties.MinValue = DateTime.Now.AddMonths(-2); deToTime.Properties.MaxValue = DateTime.Now;