Reputation: 4664
If forms.py I have:
self.fields['current_treatment_chelation_start']= forms.DateField(label=('Start of chelation therapy'),required=False,
widget=DateTimePicker(options={"format": "YYYY",
"pickTime": False,
"startDate": "1900"}))
This shows me the date in calendar. I want the user to view only years and select one.
Any help?
Upvotes: 0
Views: 1378
Reputation: 14311
Assuming you're using this package:
https://github.com/nkunihiko/django-bootstrap3-datetimepicker
You'll want to add this to your DateTimePicker options:
viewMode: 'years',
Upvotes: 1