Passing DateTime into TryUpdateModel
One property of my model is DateTime. I'm working with DateTime format "d.M.yyyy H:mm", i.e. day.month.year. When I pass date like 11.4.2011 (April 11th, 2011) into TryUpdateModel, it comes back as 4.11.2011, i.e. day and month swaps. Is there any way how can I instruct TryUpdateModel to parse datetime value the w开发者_如何学Pythonay I want, not the way system wants?
Thanks,
Antonin
I had the same problem and I discovered that if I use HTTPPost instead of HTTPGet MVC behaves as expected. I don't know why it solves the problem and I am still looking for the full answer to this question.
精彩评论