mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Update polyfill for datetime-local
Bloody Firefox. We love to hate you. Proper CSS of the fill to come, SoonTM. Closes #391
This commit is contained in:
1
RIGS/static/js/datetime-fix.js
Normal file
1
RIGS/static/js/datetime-fix.js
Normal file
@@ -0,0 +1 @@
|
||||
$(document).ready((function(){var t;(t=document.createElement("input")).setAttribute("type","datetime-local"),("text"===t.type||navigator.userAgent.toLowerCase().indexOf("firefox")>-1)&&($("<link>").appendTo("head").attr({type:"text/css",rel:"stylesheet"}).attr("href",'{% static "css/flatpickr.css" %}'),$.when($.getScript('{% static "js/flatpickr.min.js" %}'),$.Deferred((function(t){$(t.resolve)}))).done((function(){$("input[type=datetime-local]").attr("type","text").flatpickr({dateFormat:"Y-m-dTH:m",enableTime:!0,altInput:!0,altFormat:"d/m/y H:m"})})))}));
|
||||
Reference in New Issue
Block a user