Someone successfully associated 2 text fields with one DateTime property using model binding in MVC, I tried the Scott method http://www.hanselman.com/blog/SplittingDateTimeUnitTestingASPNETMVCCustomModelBinders.aspx , but was unsatisfied since it stops the HTML fields and properties models with the same name (therefore, verification cannot establish the correct css if it failed).
My current attempt modifies this by removing the ValueProviderResult object from the bindingcontext file and adding a new one for the key made up of the date result and tiem (using the .Time convention in post Scotts), but I'm a little careful about messing with the direct bindingContext object.
The idea is that I can use IDateErrorInfo and VAB PropertyComparisonValidator to compare 2 dates on a model where you need to be later than another, for this you need to add a time element.
datetime asp.net-mvc
Pharabus Apr 7 '09 at 15:51 2009-04-07 15:51
source share