Open JQuery Datepicker by clicking on an image w/ no input field

后端 未结 8 949
夕颜
夕颜 2020-11-27 13:00

I want to have the JQuery Datepicker open when the user clicks on an image. There is no input field where the selected date appears afterwards; I\'m just going to save the e

8条回答
  •  被撕碎了的回忆
    2020-11-27 13:42

    HTML:

    CODE:

    $CalendarBlock=$('.CalendarBlock');
    $CalendarBlock.click(function(){
        var $datepicker=$(this).find('input');
        datepicker.datepicker({dateFormat: 'mm/dd/yy'});
        $datepicker.focus(); });
    

提交回复
热议问题