开发者

jQuery - Need to submit form once i click on calendar option

开发者 https://www.devze.com 2023-02-05 03:46 出处:网络
Im using the fo开发者_如何学Pythonllowing plugin to display a calendar -(plugin URL) does anyone know if its possible to submit a form when a calendar date is clicked and have that result come through

Im using the fo开发者_如何学Pythonllowing plugin to display a calendar -(plugin URL) does anyone know if its possible to submit a form when a calendar date is clicked and have that result come through into PHP so i can use $_POST to get what i clicked?

Cheers,


It looks to me as if the plugin sends you events. You can handle "dateSelected", it seems, and in that handler you can submit your form.

$('input.whatever').datePicker().bind("dateSelected", function(ev, date, td, selected) {
   if (selected) {
     $('#your_form').submit();
   }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消