I'd like to put a datepicker type of widget into my Django app so that users don't have to try and use a textbox to enter a date and a time. I've found some references to widgets and forms but can't find anything about how to put them into a page on my Django site. Any guidance on how to use these features to meet this end would be greatly appreciated.
我想在我的Django应用程序中添加一个datepicker类型的小部件,这样用户就不必尝试使用文本框输入日期和时间。我发现了一些对小部件和表单的引用,但是找不到任何关于如何将它们放到我的Django站点上的页面中的内容。任何有关如何使用这些功能来达到此目的的指导将不胜感激。
2 个解决方案
#1
1
The https://github.com/tarruda/bootstrap-datetimepicker does not work in Bootstrap 3.0 (is not mantained anymore). I use this one, and it solves my problem. Hope this helps!
https://github.com/tarruda/bootstrap-datetimepicker在Bootstrap 3.0中不起作用(不再保留)。我用这个,它解决了我的问题。希望这可以帮助!
#2
0
The easiest way to do this would be to use a javascript date/time picker that populates a text field with the date/time.
最简单的方法是使用javascript日期/时间选择器,用日期/时间填充文本字段。
Here is an example: http://tarruda.github.io/bootstrap-datetimepicker/.
这是一个例子:http://tarruda.github.io/bootstrap-datetimepicker/。
#1
1
The https://github.com/tarruda/bootstrap-datetimepicker does not work in Bootstrap 3.0 (is not mantained anymore). I use this one, and it solves my problem. Hope this helps!
https://github.com/tarruda/bootstrap-datetimepicker在Bootstrap 3.0中不起作用(不再保留)。我用这个,它解决了我的问题。希望这可以帮助!
#2
0
The easiest way to do this would be to use a javascript date/time picker that populates a text field with the date/time.
最简单的方法是使用javascript日期/时间选择器,用日期/时间填充文本字段。
Here is an example: http://tarruda.github.io/bootstrap-datetimepicker/.
这是一个例子:http://tarruda.github.io/bootstrap-datetimepicker/。