Is there any lightweight JavaScript date picker? [closed] Is there any lightweight JavaScript date picker? [closed] javascript javascript

Is there any lightweight JavaScript date picker? [closed]


I just came across Pikaday, which looks good and is quite lightweight (around 11kb of JS, minified). Doesn't require jQuery either.

Here's a demo.

A screenshot of the picker:

Pikaday Screenshot
(source: github.com)

Example using pikaday with timepicker and moment.js

<link rel="stylesheet" href="/pikaday/css/pikaday.css"><script src="/pikaday/moment.js"></script><script src="/pikaday/pikaday.js"></script><script>var timepicker = new Pikaday({    field: document.getElementById('datetimepicker'),    firstDay: 1,    minDate: new Date(2016, 0, 1),    maxDate: new Date(2100, 12, 31),    yearRange: [2016,2100],    showTime: true,    autoClose: false,    use24hour: false,    format: 'MMM Do YYYY, h:mm a'});</script>

github.com/owenmead/Pikaday

momentjs.com


I faced the same issue with the official jQuery example (see my comment above). I isolated the problem to CSS themes and started stripping away junk. Before I finished I found a guy had done exactly what I needed: http://keith-wood.name/datepickBasics.html

It required DatePicker.js and a single CSS file. All told 2 HTTP requests and 40 kB in addition to the basic jQuery file everybody should have cached like Darin says.


This date picker here does not require jquery and the minified file is around 11kb: https://github.com/kaore/CibulCalendar