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
219 stars 125 forks source link

startDate, endDate and daysOfWeekDisabled not working #82

Closed ajendrex closed 8 years ago

ajendrex commented 9 years ago

Hello,

these options (startDate, endDate and daysOfWeekDisabled) are not working because the resulting javascript is incorrect. I think the quote function in datetimewidget/widgets.py is not quoting datetime values. Also, 'daysOfWeekDisabled' has to be in form of list (i.e. [0,6]) but it's being rendered without any quotation.

Regards, Hector.

iliasgal commented 8 years ago

Hi, Can you confirm that the values of startDate/endDate are in the right format and that you are not using usel10n as True (as this will override any format)?

I had the same issue but I realised that the dates were not in the right format.

ajendrex commented 8 years ago

I had this issue quite a long ago, I don't remember exactly on what project I was working on; but I do think that I solved it. Now I realize that I should have documented the solution here, so thank you for doing so.