How to use jQuery UI Datepicker as a Django Widget?

前端 未结 2 1446
花落未央
花落未央 2021-02-07 15:02

Some of my Django 1.3 models have DateField properties. When a form is generated, I\'d like to use the jQuery UI Datepicker instead of a plain text field. I understand that I co

2条回答
  •  遇见更好的自我
    2021-02-07 15:41

    You should look on DateInput - you'll need to inherit your widget from it. Also look on admin widgets - there are some JS appended. So take DateInput, add some JS and you're done.

提交回复
热议问题