Get the value of bootstrap Datetimepicker in JavaScript

前端 未结 8 1983
心在旅途
心在旅途 2020-11-30 05:49

I need to get the value of Datetimepicker in my JavaScript function. I have made something like this, but it doesn\'t work:

$(\"#date\").click( function(){
         


        
相关标签:
8条回答
  • 2020-11-30 06:33

    Or try:

    $("#datetimepicker").data().date;
    
    0 讨论(0)
  • 2020-11-30 06:35

    I'm using the latest Bootstrap 3 DateTime Picker (http://eonasdan.github.io/bootstrap-datetimepicker/)

    This is how you should use DateTime Picker inline:

    var selectedDate = $("#datetimepicker").find(".active").data("day");
    

    The above returned: 03/23/2017

    0 讨论(0)
提交回复
热议问题