mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 10:22:43 +01:00
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
|
(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);
|
||
|
});
|
||
|
})();
|