Titan/webapp/titanembeds/static/js/admin_voting.js

33 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-03-19 09:28:09 +01:00
(function () {
$('.timepicker').pickatime({
default: 'now', // Set default time: 'now', '1:30AM', '16:30'
fromnow: 0, // set default time to * milliseconds from now (using with default = 'now')
twelvehour: true, // Use AM/PM or 24-hour format
donetext: 'OK', // text for done-button
cleartext: 'Clear', // text for clear-button
canceltext: 'Cancel', // Text for cancel-button
autoclose: true, // automatic close timepicker
ampmclickable: true, // make AM PM clickable
aftershow: function(){} //Function for after opening timepicker
});
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year,
today: 'Today',
clear: 'Clear',
close: 'Ok',
closeOnSelect: true // Close upon selecting a date,
});
$("#submit").click(function () {
var params = {
datestart: $("#datestart").val(),
timestart: $("#timestart").val(),
dateend: $("#dateend").val(),
timeend: $("#timeend").val()
}
var formatted = $.param( params );
location.assign("/admin/voting?" + formatted);
});
})();