I'm trying to do date validation on a date and time picker through code (i want to make sure that the date is later than today and that the next date is at least one day later than that).
But when i try to get the value in the chagned event, i keep getting empty string as value.
What am i doing wrong here??
This is the code:
public void LeaveRequestFrom_Changed(object sender, XmlEventArgs e)
// Write your code here to change the main data source.
XPathNavigator xroot = MainDataSource.CreateNavigator();
XPathNavigator fromdate = xroot.SelectSingleNode(
if (fromdate.Value != "")
//Make sure the from date is in the future
if (DateTime.Parse(fromdate.Value) < DateTime.Today.AddDays(1))
View Complete Post