Posts by Leandro Silva de Carvalho • 111 points
7 posts
-
1
votes1
answer340
viewsA: Return of javascript asynchronous methods
To obtain the return of the Promise it is necessary that the same is resolved, as below. Thus the rule can only be applied after the callback of the function. Because, as an asynchronous function,…
-
0
votes2
answers1164
viewsA: How popular a select with Jquery
One of the things that can cause the error is that all properties of the object in json start with initial minuscule when it comes from the controller, as below. To see how it is coming made a…
-
0
votes3
answers2769
viewsA: How to know if the chosen date is less than the current date?
Simplest form var strDate = "15/08/2017".split('/').reverse(); //Saida -> ["2017", "08", "15"] //Data em milisegundos var currentDate = new Date(strDate).valueOf(); //Data atual em milisegundos…
-
0
votes1
answer46
viewsA: Mandatory fields in Storage session
If I understand it, that’s what you need $('.btn-next-morte').on('click', function () { var idade = $('input[name=idade]').val(); var salarioAtual = $('input[name=salario]').val(); if(!idade ||…
-
1
votes2
answers386
viewsA: jquery Blur in dynamic inputs
I believe that’s what you need $(document).ready(function() { $('.placaCss').blur('input', function() { var valor = $(this).val(); var _this = $(this); // Verificando se o valor foi preenchido if…
-
2
votes2
answers9320
viewsA: How to format the date of an input[date] in the format dd/mm/yyyy'?
//Com js pode fazer da seguinte forma // O input type=date vem no seguinte formato yyyy-mm-dd // Para setar o valor caso esteja no formato dd/mm/yyyy document.querySelector('[type=date]').value =…
-
4
votes4
answers1937
viewsA: View data format en dd/mm/yyyy
//exemplo: tbl_lancamento.dt_vencimento.split('-').reverse().join("/"); var brDate = '2017-06-08'.split('-').reverse().join("/"); console.log(brDate);…