I am having a datetime input field and I want to asure user enters a date atleast 24 hours later than Datetime.Now. I tried this:
[Range(typeof(DateTime), DateTime.Now.ToString(), DateTime.Now.AddDays(1).ToString())]
public DateTime EndDate { get; set; }
But I am getting compiler error because values must be a constants. So what should I do?