Dear,IneedtodisplayonlythedateinaTextBoxForfield.IusethisHTMLControlbecauseIuseaJavaScriptmaskthatformatsthefieldvalueatthetimeoftheinputofthedate.
@Html.TextBoxFor(model=>model.DtCadastro,htmlAttributes:new{@id="DtCadastro", @name = "DtCadastro", @onkeyup = "javascript:Formatar(this.value, this.form.name, this.name, 'data');", @onchange = "javascript:Formatar(this.value, this.form.name, this.name, 'data');" })
[Display(Name = "Data do Cadastro:")]
[Required(ErrorMessage = "Informe a data do cadastro")]
[DataType(DataType.Date)]
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]
public Nullable<System.DateTime> DtCadastro { get; set; }