jQuery: jQueryUI DatePicker with time component

I was looking around for a way to implement the Django AdminDateWidget/AdminTimeWidget but it seemed to be more trouble than its worth.

Looking around a few sites, the best I've found is "jQueryUI datetime". The demo page can be found here.

Syntax is incredibly simple.

$('#datetime').datetime({ value: '+1min' }); });

And that's it!

The good thing is that this is compatible with Django, as the date/time format is the same as the one which the DateTime field accepts, so you can still use the default validation of the Django fields in a form.

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog