JSFiddle - React, Tailwind, and code Playground

by rjdudley

HTML

<link rel="stylesheet" href="http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css">
<link rel="stylesheet" href="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.0.min.css">
<script src="http://cdn.wijmo.com/jquery.wijmo-open.all.2.0.0.min.js"></script>
<script src="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.0.min.js"></script>
<div id="calendar"></div>
<label for="popdate">Choose a Date:</label>
<input name="popdate" type="text" id="popdate" style="width: 180px;" />

JavaScript

$(function() {
    $("#calendar").wijcalendar({
        popupMode: true,
        selectedDatesChanged: function() {
            var selDate = $(this).wijcalendar("getSelectedDate");
            if ( !! selDate) $("#popdate").val(selDate.toDateString());
        }
    });
    $("#popdate").click(function() {
        $("#calendar").wijcalendar("popup", {
            of: $("#popdate"),
            offset: '0 2'
        });
    })
});