如果表单.py我有:
self.fields['current_treatment_chelation_start']= forms.DateField(label=('Start of chelation therapy'),required=False,
widget=DateTimePicker(options={"format": "YYYY",
"pickTime": False,
"startDate": "1900"}))
这显示了日历中的日期。我希望用户只查看年份并选择一个。在
有什么帮助吗?在
Tags:
假设您正在使用此软件包:
https://github.com/nkunihiko/django-bootstrap3-datetimepicker
您需要将此添加到DateTimePicker选项中:
相关问题 更多 >
编程相关推荐