Category: Javascript

O que ando aprendendo nesta caminhada sobre a Terra

Codigo de validação de CPF para Javascript

O código abaixo é de uma função em Javascript otimizada para ter o menor numero de complexidade ciclomática linhas que consegui baseado na explicação presente no artigo Algoritimo de validação de CPF brasileiro – Cadastro de Pessoa Física. Ele tem uma ligeira alteração no momento do cálculo do segundo digitido verificador. Ao invés de começar…
Read more

Datatables + HTML 5 Export Buttons + Laravel-Mix (Webpack)

In the last days, I have experienced a problem trying to use Datatables and Bootstrap 4 with support for exporting results to Excel and PDF using Laravel-Mix. After hours and hours trying to put all scripts to work together, I finally win. So, I decide to write this little how to for those with same…
Read more

Using jQueryMask Plugin to format dates in different patterns

jQuery Mask Plugin is a great Javascript library to format fields for presentation and/or to force a properly input by users. Here, I show how to deal with input or another HTML element to display dates when the source date has a different format from target element. Example: We have a datetime with Year-Month-Day Hour:Minute:Seconds…
Read more