Getting value from JQUERY datepicker

前端 未结 10 1882
故里飘歌
故里飘歌 2020-11-29 07:56

If I want to display the JQUERY UI datepicker inline by attaching it to a DIV like $(\"div#someID\").datepicker() - how do I access the chosen date? I assume if

10条回答
  •  北海茫月
    2020-11-29 08:59

    If you want to get the date when the user selects it, you can do this:

    $("#datepicker").datepicker({
        onSelect: function() { 
            var dateObject = $(this).datepicker('getDate'); 
        }
    });
    

    I am not sure about the second part of your question. But, have you tried using style sheets and relative positioning?

提交回复
热议问题