0
function set_dados_form(dados) {
$('#id_cadastro').val(dados.Id);
$('#txt_Nome').val(dados.Nome),
$('#txt_Telefone').val(dados.Telefone),
$('#txt_Endereco').val(dados.Endereco),
$('#txt_Data').val(dados.DataNascimento),
$('#cbx_Ativo').prop('checked', dados.Ativo);
}
<div class="form-group">
@Html.Label("txt_Data", "Data", new { @class = "col-md-3 control-label" })
<div class="col-md-12">
<input type="date" name="txt_Data" id="txt_Data" class="col-md-4 control-label" />
</div>
</div>
I can’t feed Camp Date. With Date coming from a query, an ex:"01/01/2017" value is coming (type a string), but when placing in the val property (referring to jquery) nothing appears. Somebody help me!!!
Thank you so much for your help, I’ll try here to see if it works.
– Neto Santos
Unfortunately it did not work, look what returned me -Date(765514800000)-
– Neto Santos
Are you sure that data.Databirth, is in the quoted format? Because the code I passed was tested.
– Thiago Pires