JSFiddle - React, Tailwind, and code Playground
HTML
<header>Mi Calendario</header>
<body>
<script src="iCal.js"></script>
<div>
<div id="cal"></div>
<div id="info">
<p>
Seleccione una fecha para ver los eventos<br> disponibles o para añadir uno nuevo.
</p>
</div>
</div>
<div id="events">
<p id="fecha">Fecha<p>
<p id="dates"></p>
<input id ="input" placeholder="pagar cuenta, aniversario, ..." size="20" type="text" />
<button id="newevent">Nuevo evento</button>
</div>
<div id="prueba"></div>
</body>
JavaScript
$("#cal").datepicker({
onSelect: function (date) {
$("#fecha").hide().fadeIn(300).text(date+" :");
$("#newevent").hide().fadeIn(300);
$("#input").hide().fadeIn(300);
//showEvents(date);
$("#newevent").click(function()
{
addEvent(date);
});
}
});
function addEvent(date){
alert(date);
}