Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Jquery DateRangePicker change Year issue

PRAVIN S:

Allow to select only next 3 months but when I change year it disables all dates.

Below is my HTML.







Below is my Jquery code.


var actualDate = new Date();
var maxDate = new Date(actualDate.getFullYear(), actualDate.getMonth() + 3, actualDate.getDate() + 1);
var minDate = new Date(actualDate.getFullYear(), actualDate.getMonth(), actualDate.getDate() + 1);
$('#otm-Date').val('');

$('#otm-Date').daterangepicker({
"singleDatePicker": true,
maxDate: maxDate,
minDate: minDate,
"showDropdowns": true,
locale: {
format: "DD/MM/YYYY"
}
}, function(start, end, label) {
$('#otm-Date').val(moment(start).format('DD/MM/YYYY'));
dOtm_Date = $('#otm-Date').val();
})



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Jquery DateRangePicker change Year issue

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×