Ive successfully overridden the Dateformat to use UK format on the controllers.
So posting seems to work for the correct date.
@Html.ActionLink("Previous", "TimeTable", "RoomBookings", new { ViewDate = ViewBag.Date.AddDays(-1) } )
However on my view I have the above, and adding a day is adding to the month!
Aka, just calling the action link with the same date will cause it to constantly reverse.
Is there anyway to apply this UK dateformat to the view as well?
One way you could do this is to override the culture in a common base controller which your controller would inherit from like so:
Then it will always be in UK format so you can have a view with this in it:
and a controller action that looks like this:
and it should do the right thing with the dates