8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-25 22:22:26 +00:00

Avec le name ça marche mieux

This commit is contained in:
Yoann Pétri 2018-05-13 10:37:31 +02:00 committed by Hugo LEVY-FALK
parent 838c5999b1
commit 5757a1e911
2 changed files with 2 additions and 1 deletions

View file

@ -4,7 +4,7 @@
<script src="/javascript/jquery-timepicker/jquery-ui-timepicker-addon.js"></script> <script src="/javascript/jquery-timepicker/jquery-ui-timepicker-addon.js"></script>
<link href="/javascript/jquery-ui/css/smoothness/jquery-ui.min.css" rel="stylesheet"/> <link href="/javascript/jquery-ui/css/smoothness/jquery-ui.min.css" rel="stylesheet"/>
<link href="/javascript/jquery-timepicker/jquery-ui-timepicker-addon.css" rel="stylesheet"/> <link href="/javascript/jquery-timepicker/jquery-ui-timepicker-addon.css" rel="stylesheet"/>
<input {{attrs}} name="datetimepicker" type="text" class="form-control" placeholder="Date"/> <input {{attrs}} name="{{name}}" type="text" class="form-control" placeholder="Date"/>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$("#{{id}}").datetimepicker({ $("#{{id}}").datetimepicker({

View file

@ -29,6 +29,7 @@ class DateTimePicker(Input):
super().render(name, value, attrs) super().render(name, value, attrs)
flat_attrs = flatatt(attrs) flat_attrs = flatatt(attrs)
context = Context({ context = Context({
'name': name,
'attrs': flat_attrs, 'attrs': flat_attrs,
'id': attrs['id'], 'id': attrs['id'],
'closeText': _("Close"), 'closeText': _("Close"),