开发者

How do I open the jquery datepicker by clicking on a hyperlink?

开发者 https://www.devze.com 2023-01-30 07:03 出处:网络
I have a link <a href=\"#\">Choose Date</a> that I want to click and pop open the datepicker. Is there any 开发者_StackOverflow社区way to do this?Yes, by calling it on a div and then showi

I have a link <a href="#">Choose Date</a> that I want to click and pop open the datepicker. Is there any 开发者_StackOverflow社区way to do this?


Yes, by calling it on a div and then showing/hiding that div. Use altField to write the date to a hidden input element.


you can do this right. you can have a click handler for a href and handle the code inside that

<a href="#" class="sample">Choose Date</a>

$('.sample').click(function() {
   // write your logic here 
   return false;
});
0

精彩评论

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