Change date time picker widget

This commit is contained in:
cuom1999 2024-04-12 22:26:17 -05:00
parent 08eef6408f
commit 7d83efed7f
6 changed files with 21 additions and 46 deletions

View file

@ -1,7 +1,7 @@
{% for post in posts%}
<section class="{% if post.sticky %}sticky {% endif %}blog-box">
<div style="margin-bottom: 0.5em">
<span class="item-header time">
<span class="post-content-header time">
{% with authors=post.authors.all() %}
{%- if authors -%}
<span class="user-img" style="width: 1.5em; height: 1.5em">

View file

@ -7,12 +7,6 @@
clear: both;
}
}
.item-header {
margin-left: 0;
display: inline-flex;
align-items: center;
gap: 0.2em;
}
.no-clarifications-message {
font-style: italic;

View file

@ -1,21 +0,0 @@
<input
autocomplete="off"
type="{{ widget.type }}"
name="{{ widget.name }}"
{% if widget.value != None %}
value="{{ widget.value }}"
{% endif %}
{% for name, value in widget.attrs.items() %}
{% if value %}
{{ name }}{% if not value %}="{{ value }}"{% endif %}
{% endif %}
{% endfor %}
/>
<script>
$(function () {
$("input[name='{{ widget.name }}']").datetimepicker({
format: 'Y-m-d H:i:s',
});
});
</script>