Last Updated: February 25, 2016
· poupougnac

DatePicker with time : TimePicker [jQuery UI]

This article is outdated, thanks to the new component of Mohit Jain that allows to easily create a DatePicker with time (with a beautiful switch between date and time) :



Insert those scripts (you can also host them) before </body> :

<script src="//"></script>
<script src="//"></script>
<script src=""></script>
<script src=""></script>

 Create an input in your body section :

<input type="text" name="date_begin" id="date_begin" value=""> 

 The magic line :


Don't forget the style in <head> :

<link rel="stylesheet" href="//" type="text/css" media="all" />
    .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
    .ui-timepicker-div dl { text-align: left; }
    .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
    .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
    .ui-timepicker-div td { font-size: 90%; }
    .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
    .ui-timepicker-rtl{ direction: rtl; }
    .ui-timepicker-rtl dl { text-align: right; }
    .ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }

Thank you :

2 Responses
Add your response


few js url was not found in git, updATE IT

over 1 year ago ·

Thank you reshmichitra. Actually there is a better way with an other component which is way more beautiful. I've updated this protip.

over 1 year ago ·