I have a problem in datetimepicker in the interface in C#. I have restricted the user for entering a date that has passed by the below code
dpSignedSO.Value = DateTime.Today;
dpSignedSO.MinDate = DateTime.Today;
but when the date is entered as 7/20/2010 and this is being saved to the database. When I try to get the values from the database the next day it gives an error message saying “ArgumentOutOfRangeException” which further explains as “Value of '7/20/2010 1:43:25 PM' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
Parameter name: Value”
How can I avoid this situation.
is there an way I can track if the datetime picker value is not changed in the interface to store a garbage value in the database for the datetimepicker??
how can i solve this???