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

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