datetimepicker how to display only current motnh

Solutions on MaxInterview for datetimepicker how to display only current motnh by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "datetimepicker how to display only current motnh"
Alex
13 Sep 2020
1// temp vars used below
2var currentTime = new Date() 
3var minDate = new Date(currentTime.getFullYear(), currentTime.getMonth(), +1); //one day next before month
4var maxDate =  new Date(currentTime.getFullYear(), currentTime.getMonth() +2, +0); // one day before next month
5$( "#datepicker" ).datepicker({ 
6minDate: minDate, 
7maxDate: maxDate 
8});
9