Getting value from JQUERY datepicker

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

    I needed to do this for a sales report that allows the user to choose a date range. The solution is similar to another answer, but I wanted to provide my example just to show you the practical real world use that I applied this to:

    var reportHeader = `Product Sales History Report for ${$('#FromDate').val()} to ${$('#ToDate').val()}.` ;
    ```
    

提交回复
热议问题