jQuery UI Datepicker Range

前端 未结 4 1684
半阙折子戏
半阙折子戏 2021-01-14 10:47

I asked a pretty similar question a few days ago, but this one is different enough that I didn\'t feel like derailing the other helpful topic. I basically want to set up two

4条回答
  •  自闭症患者
    2021-01-14 11:10

    $('#firstinputfield').datepicker({
    
        //your other configurations.     
    
         onSelect: function(){
         var start = $('#firstinputfield').val();
         var days = parseInt('1');
         var date = new Date(start);
         var d = date.getDate();
         var m = date.getMonth();
         var y = date.getFullYear();
         var edate= new Date(y, m, d+days);
         $('#secondinputfield').datepicker({
    
            //Your other configurations.
    
            minDate:edate
    
            });
            }
         });
    

提交回复
热议问题