django-bootstrap3-datetimepicker
django-bootstrap3-datetimepicker copied to clipboard
django-bootstrap3-datetimepicker not taking showClear or showTodayButton options
Options are not working inside the widget. I have the following in my ModelForm.
class IronForm(forms.ModelForm):
class Meta:
model = Iron
fields = ...
widgets = {'out_of_service_date': DateTimePicker(options={'format': 'YYYY-MM-DD', 'pickTime': False, 'showClear':True, 'showTodayButton': True}), ...}
When I click on the widget, the calendar does not show the 'showClear' button or the 'showTodayButton' button. Any help will be greatly appreciated.
Looks like those fields are not implemented, should be relatively easy to add. Pull requests welcome.
I came across this open issue when I was investigating the same problem. I noticed that the showTodayButton wasn't working on my pages. But I was also using the sideBySide option and when I removed that the button worked. I thought it was a bug so I came looking here. I was going to look into implementing it and issuing a PR but I thought I'd look at the JS library for any clues first. Turns out, this is a feature, not a bug as asked here. You can force the button toolbar visible by using the "toolbarPlacement" option.
@Kingusuneku I also noticed that you are using the "pickTime" option which was removed some time ago as referenced here so you may be having issues related to an outdated version of bootstrap-datetimepicker.js.