1
Good afternoon,
Json’s return brings the badly formatted date = "/Date(1420077600000)/", how to treat ?
{"TB1":1,"DTADMISSAO":"\/Date(1420077600000)\/"}
This is the section where the Data field:
$.ajax({
url: "ObterFuncionario",
type: "post",
datatype: "json",
contentType: "application/json charset=utf-8",
data: JSON.stringify({ "id": id }),
processData: false,
beforeSend: function () {
$("#divCarregando").show();
},
complete: function () {
$("#divCarregando").hide();
},
success: function (data) {
$("#DTADMISSAO").val(data.DTADMISSAO);
},
error: function (result) {
alert(result.responseText);
}
});
HTML:
<div class="form-group small">
<div class="col-sm-2">
ADMISSÃO:
</div>
<div class="col-sm-10">
<input type="text" id="DTADMISSAO" class="form-control input-sm" />
</div>
</div>
How you’re populating the value in the field?
– Laerte
I added in the question the code section that populates the field.
– hard123
Post the MVC controller code that you are passing the date.
– Randrade
the field Voce is returning pro json is a Datetime?
– Rafael Cabral