Bootstrap datepicker originally by Stefan Petre, improved by @eternicode