Skip to content

Commit

Permalink
Merge pull request #443 from rg663/438-datepicker-update
Browse files Browse the repository at this point in the history
Datepicker updated
  • Loading branch information
aebruno authored Aug 5, 2022
2 parents 6f13af1 + 945d358 commit 5af1c12
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ <h3 class="d-inline"><i class="fas fa-users" aria-hidden="true"></i> Notificatio
});
}
}
$(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' });
$(".datepicker").flatpickr();
$(document).on('click', '.confirm-activate', function(){
var attributes_num = {{ attributes | length }};
if (attributes_num == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h2>Allocations</h2>
resetForm($('#filter_form'));
});

$(".datepicker").datepicker();
$(".datepicker").flatpickr();

function resetForm($form) {
$form.find('input:text, input:password, input:file, select, textarea').val('');
Expand Down
4 changes: 2 additions & 2 deletions coldfront/core/grant/templates/grant/grant_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</form>

<script>
$('#id_grant_start').datepicker();
$('#id_grant_end').datepicker();
$('#id_grant_start').flatpickr();
$('#id_grant_end').flatpickr();
</script>


Expand Down
4 changes: 2 additions & 2 deletions coldfront/core/grant/templates/grant/grant_update_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</form>

<script>
$('#id_grant_start').datepicker();
$('#id_grant_end').datepicker();
$('#id_grant_start').flatpickr();
$('#id_grant_end').flatpickr();
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion coldfront/core/resource/templates/resource_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h2>Resources</h2>
resetForm($('#filter_form'));
});

$(".datepicker").datepicker();
$(".datepicker").flatpickr();

function resetForm($form) {
$form.find('input:text, input:password, input:file, select, textarea').val('');
Expand Down
2 changes: 2 additions & 0 deletions coldfront/static/common/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ body > main > div > div.card.border-primary > div.card-body > form > div.alert.a
position:relative;
top:1px;
}

.form-control[readonly]{background-color:#ffffff;opacity:1}
2 changes: 2 additions & 0 deletions coldfront/static/flatpickr/flatpickr.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions coldfront/static/flatpickr/flatpickr.min.css

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions coldfront/static/jquery/jquery-ui-1.12.1.min.css

This file was deleted.

13 changes: 0 additions & 13 deletions coldfront/static/jquery/jquery-ui-1.12.1.min.js

This file was deleted.

4 changes: 2 additions & 2 deletions coldfront/templates/common/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<link rel="manifest" href="{% static 'common/site.webmanifest' %}">

<!-- Load Bootstrap4 -->
<link rel="stylesheet" href="{% static 'jquery/jquery-ui-1.12.1.min.css' %}">
<link rel="stylesheet" href="{% static 'bootstrap/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'flatpickr/flatpickr.min.css' %}">

<script src="{% static 'jquery/jquery-3.6.0.min.js' %}"></script>
<script src="{% static 'jquery/jquery-ui-1.12.1.min.js' %}"></script>
<script src="{% static 'bootstrap/bootstrap.bundle.min.js' %}"></script>
<script src="{% static 'flatpickr/flatpickr.js' %}"></script>

<!-- Fontawesome CSS -->
<link href="{% static 'fontawesome_free/css/all.min.css' %}" rel="stylesheet" type="text/css">
Expand Down

0 comments on commit 5af1c12

Please sign in to comment.