JSFiddle - React, Tailwind, and code Playground

by Felipe Kautzmann

HTML

<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<input id="data" type="date">

JavaScript

// Current Date
var now = new Date();            
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);            
var today = now.getFullYear()+"-"+(month)+"-"+(day);

var data = $('#data');

data.attr('max', today);
data.val(today);