NDOJ/templates/widgets/datetimepicker.html
2023-01-27 17:11:10 -06:00

21 lines
No EOL
458 B
HTML

<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>