2
I have a field 'DATE' that receives information from DB in the format below:
I would like to insert the following pattern: DD-MM-YYYY.
Below is the javascript that inserts the data into the field:
function setSelectedZoomItem(selectedItem) {
var info = selectedItem.type.split("___");
if (info.length > 1) { }
if(selectedItem.type == "filiais"){
$("#filial").val(selectedItem['nomefantasia']);
$("#cnpj").val(selectedItem['cgc']);
$("#codfilial").val(selectedItem['codfilial']);
}else if(selectedItem.type == "setores"){
$("#setor").val(selectedItem['nomefantasia']);
}else if(selectedItem.type == "chapafunc"){
$("#chapafuncionario").val(selectedItem['CHAPA']);
$("#nomefuncionario").val(selectedItem['NOME']);
$("#cargofuncionario").val(selectedItem['FUNCAO']);
$("#dataadmissao").val(selectedItem['DATAADMISSAO']);
$("#salariofuncionario").val(selectedItem['SALARIO']);
}
}