最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jQuery - datepicker - onblur - Stack Overflow

programmeradmin0浏览0评论

I'm using the jQuery datepicker where I have two textboxes (start date / end date). The user clicks in a respective textbox and the calendar shows up. That is OK.

What I need to do is when the user say, clicks in the start date textbox and picks a date. I need an onblur event to be triggered then.

Where do I set that onblur event for the calendar control after a date has been selected? I tried in the actual textbox but that's not right because that happens before an actual date is picked from the calendar control.

I'm using the jQuery datepicker where I have two textboxes (start date / end date). The user clicks in a respective textbox and the calendar shows up. That is OK.

What I need to do is when the user say, clicks in the start date textbox and picks a date. I need an onblur event to be triggered then.

Where do I set that onblur event for the calendar control after a date has been selected? I tried in the actual textbox but that's not right because that happens before an actual date is picked from the calendar control.

Share Improve this question edited Mar 20, 2010 at 15:48 Daniel Vassallo 345k72 gold badges512 silver badges446 bronze badges asked Mar 20, 2010 at 15:45 d3020d3020 5373 gold badges7 silver badges16 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

I think you want the onselect event...

$('.selector').datepicker({
   onSelect: function(dateText, inst) { ... }
});
发布评论

评论列表(0)

  1. 暂无评论