datetime code in separate file

This commit is contained in:
boyska 2019-07-05 01:33:28 +02:00
parent b0fd381fc7
commit c7befca9c5
2 changed files with 13 additions and 12 deletions

View file

@ -3,18 +3,8 @@
{%block scripts%}
<script src="{{url_for('static', filename='webshim/polyfiller.js')}}"
type="text/javascript"></script>
<script type="text/javascript">
webshim.setOptions('forms-ext', {
'types': 'datetime-local',
'datetime-local': {
'classes': 'show-uparrow inputbtns-outside',
'openOnFocus': false,
'yearSelect' : true,
'stepfactor': 60,
}
});
webshim.polyfill('forms-ext');
</script>
<script src="{{url_for('static', filename='datetime.js')}}"
type="text/javascript"></script>
{{super()}}
{%endblock%}

View file

@ -0,0 +1,11 @@
/* global webshim */
webshim.setOptions('forms-ext', {
'types': 'datetime-local',
'datetime-local': {
'classes': 'show-uparrow inputbtns-outside',
'openOnFocus': false,
'yearSelect': true,
'stepfactor': 60
}
})
webshim.polyfill('forms-ext')