Skip to content

Commit

Permalink
fix datepicker conflict between jquery-ui and bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Dec 28, 2024
1 parent 7f5bbe8 commit 4426666
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 0 additions & 8 deletions templates/billing/pre_billing.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,6 @@ <h4>{{ mission.lead }} ({{ mission.lead.deal_id }})</h4>
{% include "core/_datepicker.html" %}

<script type="text/javascript">
// set dates on widgets with template value
{% if start_date %}
$("#startDate").datepicker("setDate", new Date("{{ start_date|date:"Y-m-d" }}"));
{% endif %}
{% if end_date %}
$("#endDate").datepicker("setDate", new Date("{{ end_date|date:"Y-m-d" }}"));
{% endif %}

$(document).ready(function() {
$(".pydici-tooltip").tooltip();

Expand Down
1 change: 0 additions & 1 deletion templates/core/_datepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
$('input.datepicker').datepicker(
{language: {% if LANGUAGE_CODE == "fr-fr" %}'fr'{% else %}'en'{% endif %},
autoclose: true,
orientation: 'top',
todayHighlight: true});
});
</script>
6 changes: 6 additions & 0 deletions templates/core/_pivotable_header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{# load pivotable script and css #}

<script src="{{ MEDIA_URL }}js/jquery-ui-1.12.1.min.js"></script>
<!-- Load again bootstrap date picker to override jquery-ui datepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.10.0/js/bootstrap-datepicker.min.js" integrity="sha512-LsnSViqQyaXpD4mBBdRYeP6sRwJiJveh2ZIbW41EBrNmKxgr/LFZIiWT6yr+nycvhvauz8c2nYMhrP80YhG7Cw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% if LANGUAGE_CODE == "fr-fr" %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.10.0/locales/bootstrap-datepicker.fr.min.js" integrity="sha512-fx3aztaUjb4NyoD+Tso5g7R1l29bU3jnnTfNRKBiY9fdQOHzVhKJ10wEAgQ1zM/WXCzB9bnVryHD1M40775Tsw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% endif %}

<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.min.js" integrity="sha512-XgJh9jgd6gAHu9PcRBBAp0Hda8Tg87zi09Q2639t0tQpFFQhGpeCgaiEFji36Ozijjx9agZxB0w53edOFGCQ0g==" crossorigin="anonymous"></script>
{% if LANGUAGE_CODE == "fr-fr" %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.fr.min.js" integrity="sha512-ScdKOdoxfAtvR/Dw6a3wBITAUv5TnGFbyAKmPFcnc2D2ZCHLZpNXizFMIjAbwPEO8AOYH8njwSeLFHCmFlh+Mg==" crossorigin="anonymous"></script>
Expand Down

0 comments on commit 4426666

Please sign in to comment.