JSFiddle - React, Tailwind, and code Playground

by gopi1410

HTML

<script src="http://cdnjs.cloudflare.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
<script src="https://raw.github.com/monkeyphysics/mootools-datepicker/master/datepicker.js"></script>
<link rel="stylesheet" href="https://raw.github.com/monkeyphysics/mootools-datepicker/master/datepicker.css">
<label>Datepicker starting at and allowing no value:</label>
<input name='date_allow_empty' type='text' value='' class='date picker' />

CSS

.datepicker {
    position: absolute;
    border: 2px solid #1C3262;
    font-size: 11px;
    width: 194px;
    padding: 3px;
    height: 221px;
    background: #fff;
    line-height: normal;
}

/* header
********************************************************/
.datepicker .header {
    position: relative;
    background: #1C3262;
    height: 21px;
    padding-top: 4px;
    margin-bottom: 3px;
}

.datepicker .header .title {
    text-align: center;
    padding-top: 1px;
    margin: 0px 42px 0 20px;
}

.datepicker .header .titleText {
    color: #fff;
    font-weight: bold;
}
.datepicker .header .next,
.datepicker .header .previous,
.datepicker .header .closeButton {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #fff;
    text-align: center;
    color: #666;
    top: 5px;
    cursor: pointer;
}
.datepicker .header .previous {
    left: 5px;
}
.datepicker .header .next {
    right: 28px;
}
.datepicker .header .closeButton {
    right: 5px;
}

/* body
********************************************************/
.datepicker .body {
    position: relative;
    top: 0px;
    left: 0px;
    width: 194px;
    border-right: 2px solid #fff;
    height: 193px;
    overflow: hidden;
}

/* time
********************************************************/
.datepicker .time {
    width: 100%;
    height: 100%;
    background: #eee;
}

.datepicker .time .hour,
.datepicker .time .separator,
.datepicker .time .minutes {
    border: 1px solid #ccc;
    background: #fff;
    width: 50px;
    font-size: 32px;
    position: absolute;
    top: 50px;
    text-align: center;
    padding: 2px;
}

.datepicker .time .hour {
    left: 30px;
}
.datepicker .time .separator {
    background: transparent;
    border: 0px;
    width: 10px;
    left: 91px;
}

.datepicker .time .minutes {
    left: 110px;
}
.datepicker .time .ok {
    position: absolute;
    top: 105px;
    width: 136px;
    left: 30px;
    font-size: 20px;
}

/*...

JavaScript

new DatePicker('.picker', {
         pickerClass: 'datepicker ',
        allowEmpty: true
    });