Folks,
Just a quick question about whether or not we can replace SmartDate with Nullable<DateTime>?
Thanks
Throwing my $0.02 in...
Given nullable DateTime, SmartDate seems like an anachronism held over for backward compatibility. My current project uses them, but on my next project I'm going to try using nullable DateTime instead.
SmartDate does two things:
Basically, if you want to bind a textbox control to a date property, how do you do it? Especially if an empty text value means an empty date. And consider than an empty date might be the smallest possible, or largest possible date value in terms of comparisons with other date values.
SmartDate is intended to solve that specific problem.
It is true that some UI technologies now include date/time pickers that are powerful enough to represent this concept with a nullable date. But that's not universally true. And even in that case, a nullable date can't be compared to a real date in the way SmartDate can.
A great example is a ShipDate property. If it is empty, that means the order will ship infinitely far in the future, so that empty date is larger than any other date. In other cases an empty date might need to be the smallest possible date.
So I don't think SmartDate is without value. You just need to understand the value it provides, and use it when you need the functionality it offers.
Thanks for these replies folks.
Copyright (c) Marimer LLC