I need to find the best way to limit my DateTime field to today's date. I need to make sure that users do not select a date in the future and I'm trying to figure out the best way to do it in my C# MVC application.
I could and I will do it on a client side via Javascript. What I'm trying to figure out is the best way to do it on the server side, via DataAnnotations possibly ?
Is there a DataAnnotations attribute I can use to specify max DateTime ? Or is it not a good way to do it through dataannotations because every day my MaxDate will change to its current day ?
Should I do validation just via C# programming logic ?