I have a MVC action that takes one of its parameters a DateTime
and if I pass "17/07/2012" it throws an exception saying that the param is null but cannot have a null value but if I pass 01/07/2012
it is parsed as Jan 07 2012
.
I'm passing the dates to the ajax call in DD/MM/YYYY
format, should I rely on MM/DD/YYYY
format despite the configured culture in web.config
?
This is a simple method and there is just this one date parameter.