-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Use the material date-time picker for selecting the start and end date/time of contest.
U need to get the id of the field that django is rendering, then remove the fields and put the same ID in custom material fields
To change the format of material date and timepicker, use this code snippet while initilizing the fields
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.datepicker');
options = {
"format": "yyyy-mm-dd"
}
var instances = M.Datepicker.init(elems, options);
});
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.timepicker');
options = {
"twelveHour": false
}
var instances = M.Timepicker.init(elems, options);
});