0

I am trying to debug my DisplayFor(model => model.dateOfEmp) initally DateTime would display Date + time. To avoid this I added a display template with a ShortDate.

After I added a custom shortdateDisplayFor in the folder DisplayTemplate, it stopped emitting the default css class ID. So I have deleted it the template. However, it still emits the Shortdate and not the full date + time.

Question: I would like to debug this in Visual Studio, and know how can I find out which DisplayFor is being called.?

aggie
  • 798
  • 2
  • 8
  • 23

1 Answers1

0

To avoid displaying Date + time, you may use DateTime.ToShortDateString Method and define the format via the DisplayFormat attribute: https://stackoverflow.com/a/28115051/5649051

As I tried debugging it, but it seem VS debugging tool could not step into the CSS template.

Fletcher
  • 422
  • 1
  • 6
  • 21