jquery function:
$(function() {
$("#iDate").datepicker({
dateFormat: 'dd MM yy',
beforeShowDay: unavailable
onSelect: function (dateText, inst) {
$('#frmDate').submit();
}
});
});
html:
<form id="frmDate" method="post" action="<?php echo $base_url;?>index.php">
<input id="iDate" name="iDate" class='input' type="text" />
it doesn't seem to be firing, don't understand why it is not working.
cheers.
jquery function:
$(function() {
$("#iDate").datepicker({
dateFormat: 'dd MM yy',
beforeShowDay: unavailable
onSelect: function (dateText, inst) {
$('#frmDate').submit();
}
});
});
html:
<form id="frmDate" method="post" action="<?php echo $base_url;?>index.php">
<input id="iDate" name="iDate" class='input' type="text" />
it doesn't seem to be firing, don't understand why it is not working.
cheers.
Share Improve this question asked Mar 29, 2012 at 15:06 bobo2000bobo2000 1,8777 gold badges34 silver badges54 bronze badges 2- Have you tried debugging it with the console? What errors do you get? – j08691 Commented Mar 29, 2012 at 15:07
- use google chrome's console or firefox's firebug plugin to debug javascript – Vigrond Commented Mar 29, 2012 at 15:10
2 Answers
Reset to default 6You're missing a ma in your javascript:
$(function() {
$("#iDate").datepicker({
dateFormat: 'dd MM yy',
beforeShowDay: unavailable,
onSelect: function (dateText, inst) {
$('#frmDate').submit();
}
});
});
Your jquery function is missing a ma
$(function() {
$("#iDate").datepicker({
dateFormat: 'dd MM yy',
beforeShowDay: unavailable, <-- here :)
onSelect: function (dateText, inst) {
$('#frmDate').submit();
}
});
});