I have a TimeSpan Model that I am trying to display in a View (@Html.EditorFor) with a masked format of mm:ss (duration measured in minutes and seconds). I DO NOT want/need hours or AM/PM, but my View without exception displays the mask = "--:-- --" which is the default format "hh:ss tt". I cannot get it to display ANY OTHER masked format. See below for Model and View. I have completely run out of ideas here. Please help!
Model:
[DataType(DataType.Time)]
[DisplayFormat(DataFormatString = "{0:mm\\:ss}", ApplyFormatInEditMode = true)]
public TimeSpan? LengthAct { get; set; }
View:
@Html.EditorFor(m => m.LengthAct, new { htmlattributes = new { @class = "form-control", data_val = "true", data_val_required = "Length is required" } })