3

I am crrating a django application and I have the next question: How can I add, in a form in django, an icon or a widget that helps people to choose a date? I mean, I don't want people to enter a date manually. I want them to select a date by a click in a visual calendar. How can I do it?

Thanks!

jartymcfly
  • 1,945
  • 9
  • 30
  • 51

1 Answers1

0

How about the jQuery date picker?

<script type="text/javascript" src="/media/jquery/development-bundle/ui/i18n/jquery.ui.datepicker-{{request.LANGUAGE_CODE}}.js"></script>

Another StackOverflow answer provides some relevant code snippets for integrating Django + jQuery Datepicker.

Community
  • 1
  • 1
Freek Wiekmeijer
  • 4,556
  • 30
  • 37
  • And How can I do it from a form in django? I don't want to create a form from the html code... – jartymcfly Jun 24 '15 at 09:52
  • That's why django has templates. The link in the answer provides a viable integration of django's Form class, template rendering and jQuery's date picker. – Freek Wiekmeijer Jun 24 '15 at 09:55