Open Seykotron opened 4 years ago
I Found the solution in templates/windgets/datepicker.html we actually have:
<script>
$(function () {
$('.datepickerwidget').datepicker({
autoclose: true
});
});
</script>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa {% if icon %}{{ icon }}{% else %}fa-calendar{% endif %}"></i>
</div>
<input type="text" class="{{ class }}" data-date-format="{{ format }}" name="{{ name }}" id="{{ id }}" value="{{ value|date:djformat }}" />
</div>
And now to work its:
<script>
$(function () {
$('.datepickerwidget').datepicker({
autoclose: true
});
});
</script>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa {% if icon %}{{ icon }}{% else %}fa-calendar{% endif %}"></i>
</div>
<input type="text" class="{{ class }}" data-date-format="{{ format }}" name="{{ name }}" id="{{ id }}" value="{{ value }}" />
</div>
And now it works! :)
Hey @Seykotron
Cool! Glad to see that it works, maybe if you could send a PR I could merge it to master, what do you think? ;)
Done ;)
I also asked for pull request to implement the icontains into filters fields (CharField, TextField and EmailField), if you remember I told you so time ago but havent time to implement that ;)
Proud to contribute to this great framework ;)
Hi there, its me again!
DatePicker widget is not showing initial value when using it in Filters or in a Form when the form_invalid is raised...
Im trying a lot of things to solve it but nothing seems to work, any clues?
Thank you!!