On Github iAlbertM / WIA
jQuery plugin
by: Albert Martinez
course: WIA-1512 | instructor: Eric Silvay
It should look similar to this:
<!-- STYLESHEETS --> <link rel="stylesheet" type="text/css" href="css/datedropper.css"> <!-- SCRIPTS --> <script src="js/jquery-2.1.4.min.js"></script> <script src="js/datedropper.min.js"></script> <script src="js/main.js"></script>
Input fields should have the following attributes:
<input type="text" id="anyID">
$("#birthDate")
$("#birthDate").dateDropper()
$("#birthDate").dateDropper({option:value})
<h3>Example Input Fields</h3> <input type="text" id="ex1" placeholder="Birth Date"> <input type="text" id="ex2" placeholder="High School Graduation"> <input type="text" id="ex3" placeholder="First Kiss"> <input type="text" id="ex4a" placeholder="Grad month"> <input type="text" id="ex4b" placeholder="Grad year"> <input type="submit" value="submit" id="submit">
$(function () {
$("#ex1").dateDropper({
format: " m / d / Y ",
minYear: "1930",
maxYear: "1998",
animation: "dropdown",
years_multiple: "20",
color: "#fa9f42"
});
$("#ex2").dateDropper({
format: "Y",
years_multiple: "10",
color: "#00BABE"
});
$("#ex3").dateDropper({
format: " l | F j, Y ",
minYear: "1930",
maxYear: "2015",
animation: "dropdown",
years_multiple: "20",
color: "#aad33a"
});
$("#ex4a").dateDropper({
format: "m",
animation: "bounce",
color: "#e33298"
});
$("#ex4b").dateDropper({
format: "Y",
maxYear: 2020,
animation: "bounce",
color: "#e33298"
});
});