Twitter Bootstrap Datepicker control with custom placement!!

December 29th, 2012 by admin Leave a reply »

There really aren’t many good calendar controls for javascript at the moment, the best one I could find is located here: http://www.eyecon.ro/bootstrap-datepicker/  This guy has done a great job setting up this control for everybody to use and if you use bootstrap it looks and feels just like the rest of the library.  The one problem with the control is that it doesn’t show up anywhere except below your input box, which is bad if you are showing your site in a screen limited place, like an IPad, it will just go below your screen if the control is close to the bottom.

This guy took the project to github here: Original Github repo and I recently forked that and you can get the update I have made here: My Github repo.

A word of warning with my project, I have removed the little caret arrow that the original project had because I didn’t want to take the time to figure out the  triangle by border trick, be my guest if you would like to take that one on, I don’t think its that bad, just needs to be placed at the bottom instead of the top if you are placing the datepicker above the control.

The issue I sort-of resolved, well, hacked for my situation can be found here: https://github.com/eternicode/bootstrap-datepicker/issues/200.  Here is the final result of what my script will do.

datepicker_top_placement

Advertisement

Leave a Reply