2

I cannot seem to get the bootstrap datepicker from http://www.eyecon.ro/bootstrap-datepicker/ to work using the example from https://gist.github.com/maraujop/2812529.

The only thing I am unsure of is where to put the datepicker folder after downloading it? I put it in my static folder and while I get no errors the only thing that shows up on my form for a date field is a blank looking box next to the field but nothing comes up when pressing it.

This doesn't seem like it should be that hard but for whatever reason, this isn't working.

Any suggestions(something that works).

Thanks

Tom
  • 251
  • 1
  • 6
  • 16
  • look at the renderd mark up, or paste it in jsfiddle for people to take a look – varun Jun 03 '13 at 20:24
  • The output looks like:
    – Tom Jun 03 '13 at 20:33
  • you need to include the js scripts from the folder and then onpage load init the control $('#dpd1').datepicker('#id_date_of_birth')... – varun Jun 03 '13 at 20:55
  • I do load the scripts but did not do that on the page. I will try that since the example did not state that. Thanks. – Tom Jun 04 '13 at 12:38
  • I tried that and all that does is place the exact text above the control itself. Can't be I am doing this correctly? – Tom Jun 04 '13 at 12:41
  • its very hard to advise without seeing a running version of the code, could you put that in jsfiddle ? – varun Jun 04 '13 at 12:47

1 Answers1

1

Take a look at django-bootstrap3-datetimepicker which you can install with pip and add to INSTALLED_APPS. Works very well for me.

There's an alternative listed in the docs for Bootstrap2, but I've not used it so can't comment on how well it works.

sheepeatingtaz
  • 143
  • 2
  • 7