'timepicker is not a function' when using timepicker.js?

后端 未结 2 1554
孤城傲影
孤城傲影 2021-01-21 08:21

I\'m trying to put a timepicker into a form using this plugin: http://jonthornton.github.io/jquery-timepicker/. It seemed like all I had to do was download the library and use j

2条回答
  •  清歌不尽
    2021-01-21 08:49

    The code works with the jQuery and jQuery ui versions you have. I updated your code to use a hardcoded path and the code runs.

     $(function() {
       $("#datepicker").datepicker();
     });
    
     $(function() {
       $('#timepicker1').timepicker();
     });
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    What day would you like a cleaning? What time would you like to start?
    (example format: 3 pm)

    It means that the JavaScript file is not where you have it looking. The console probably has a message that says: "Failed to load resource: the server responded with a status of 404 (Not Found)"

    If the file is there, than check to make sure that the JS file actually has content in it.

提交回复
热议问题