blob: a0f2493db16380a67e804942a3a96b96971af092 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
function warn_submit(text, form) {
if(confirm(text)) {
form = document.querySelector(form)
form.submit()
}
}
$( document ).ready(function(){
all_date_fields = document.querySelectorAll("[name='date']");
for ( i = 0 ; i < all_date_fields.length ; i++ ) {
console.log(all_date_fields[0])
$(all_date_fields[0]).pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year,
// format: 'dd/mm/yyyy',
format: 'yyyy-mm-dd',
today: 'Today',
clear: 'Clear',
close: 'Ok',
closeOnSelect: false // Close upon selecting a date,
});
}
});
|