Getting value from JQUERY datepicker

前端 未结 10 1898
故里飘歌
故里飘歌 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:53

    You can use the getDate method:

    var d = $('div#someID').datepicker('getDate');
    

    That will give you a Date object in d.

    There aren't any options for positioning the popup but you might be able to do something with CSS or the beforeShow event if necessary.

提交回复
热议问题