I have two properties, StartedProperty and EndedProperty that are both dates. They both have the same value {4/21/2009}. When I check if StartedProperty is greater than EndedProperty it return true; when I check if StartedProperty is less than EndedProperty it returns false. If I check if StartedProperty equals EndedProperty it return false. It apprears that the value read from the database has a time portion (populated somewhere else), while the value supplied by the textbox (WPF Toolkit DatePicker) returns a string with just the date, which leaves the time at midnight. Is there a way to tell SmartDate to only compare the date portion? Here is the code:
if (target.ReadProperty(StartedProperty) > target.ReadProperty(EndedProperty)){
e.Description =
"Start date can't be after end date"; return false;}
else{
return true;}
Todd
Sorry...this code is from the business rule. the StartedProperty and EndedProperty are both SmartDate.
Todd
Copyright (c) Marimer LLC