Easiest date picker.
To use it just copy files.
var input = document.querySelector("input[data-type='date']");
var date = new datePicker(
input,
function(time, input){ console.log(time, input) },
function(input){ console.log("coosing deny", input) }
)
<input type="text" data-type="date" placeholder="dd/mm/YYYY">
That's all. Ready to use.
In this version I use my own scripts as prototypes.
.insertAfter() // inserting HTMLelement after another HTMLElement
.zp() // to formate string in pattern (1.zp(2) => '01', 12.zp(2) => '12')
.toInt() // string to int. ("123".toInt() => 123)
// and some other functions in wide-prototypes.js