asaglimbeni / django-datetime-widget

Bootstrap django-datetime-widget is a simple and clean widget for DateField, Timefiled and DateTimeField in Django framework. It is based on Bootstrap datetime picker, supports both Bootstrap 3 and Bootstrap 2
Other
218 stars 125 forks source link

Clear button does not work #24

Closed apalazon closed 10 years ago

apalazon commented 10 years ago

Firstly, thank you for your widget. It's great.

I have developed a DateField using your widget:

DATE_FIELD_OPTIONS = {
    'format' : 'dd/mm/yyyy',
    'autoclose': 'true',
    'minView' : '2',
    'weekStart': '1',
    'clearBtn' : 'true',   
}
start_date = forms.DateField(required=False, 
                     label='Start Date',   
                     widget=DateTimeWidget(options = DATE_FIELD_OPTIONS))

Everything works perfectly, however, the Clear button does not clear the form.

I'm using GET instead of POST to pass the parameters. Could that be the problem?

I'm using Django 1.4.8 and the latest version on PyPi.

Best regards,

asaglimbeni commented 10 years ago

Hi apalazon, Maybe the trouble came from some issue into the Javascript. But to understand better try to debug the clear button with chrome console and see if there are any error. if there are, post here the message. This can help to find better the problem.
What browser do you use?