Unable to select date beyond 01/01/2017 in datetimepicker?
I have a Python/ Django project, and one of the forms on one of the webpages has a `datetimepicker` field. I'm having some issues with this field at the moment- it is not possible to select a date beyond 01/01/2017... all of the options beyond this date are 'greyed out' and unselectable. I've been working through the code for my project, and can't find any issues that would cause this- that aren't any calls to `options.allowDates` that would prevent these dates from being selectable, or anything else that is intentionally preventing the user from selecting a date beyond 01/01/2017.
The section of HTML from the template on which this date field is shown is:
- <td colspan="6">
- {% if not field.name == 'pdf_package_dep' %}
- {% if field.name == 'presentation_date' %}
- {% with presentation_form.instance.meeting as meeting %}
- {% include "projects/includes/meeting_bit.html" with employee=request.user.employee meeting=meeting UID=presentation_form.instance.id %}
- {% endwith %}
- {# <a class="ical_trigger button" data-view-url="{% url 'events:add_to_cal' %}" {% if not field.value %}style="display:none"{% endif %}>Add to calendar</a> #}
- {% else %}
- {{field}}
- {% endif %}
- {% endif %}
- </td>
and the part of meeting_bit.html that's being used by the `include` is:
- <div id="cal_{{field.name}}_{{UID}}">
- {{field}}
- <a class="ical_trigger button" data-view-url="{% url 'events:add_to_cal' %}" {% if not field.value %}style="display:none"{% endif %}>
- {% if meeting.event_id %}Update calendar event{% else %}Add to calendar{% endif %}
- </a>
- </div>
The Python view that is rendering this HTML is:
- def concept(request, project_id):
- project = Project.objects.prefetch_related('budget_versions').get(id=project_id)
- deposit = Deposit.objects.get_or_create(project=project)[0]
- presentations = project.budget_versions.select_related('meeting').prefetch_related('budget_items', 'cci_items', 'presenters').filter(version_number__isnull=False).annotate(vn=F('version_number') * -1).order_by('presentation_date', 'created', '-vn')
- end_details = EndDetails.objects.get_or_create(project=project)[0]
- presentation_formset = BudgetPresentationFormset(prefix="presentations", instance=project, queryset=presentations)
- drawing_formset = DrawingUploadFormset(prefix="drawings", queryset=Drawing.objects.filter(budget__in=presentations).order_by('budget__presentation_date', 'budget__created'))
- context = {
- 'project': project,
- 'presentations': presentations,
- 'presentation_formset': presentation_formset,
- 'drawing_formset': drawing_formset,
- 'deposit_form': DepositInfoForm(instance=deposit),
- 'ended_form': EndDetailsForm(instance=end_details),
- 'budget_notes_form': BudgetNotesForm(instance=project.budget_overview),
- }
- return render(request, 'projects/concept.html', context)
Anyone have any ideas why I'm unable to select a date beyond 01/01/2017? How can I resolve this?