Merge pull request #1100 from shreesh-webkul/gli-1802

Fixed: Calendar open for pervious month of max order date is for current month
This commit is contained in:
Rohit Jain
2024-07-04 19:32:13 +05:30
committed by GitHub
3 changed files with 2 additions and 3 deletions

View File

@@ -2597,7 +2597,7 @@
if (opt.endDate && compare_month(nextMonth(defaultTime), opt.endDate) > 0) defaultTime = prevMonth(moment(opt.endDate).toDate());
}
if (opt.singleDate) {
if (opt.singleDate || opt.singleMonth) {
if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
}

File diff suppressed because one or more lines are too long

View File

@@ -457,7 +457,6 @@ $(document).ready(function() {
});
} else {
$('#daterange_value').dateRangePicker({
startDate: $.datepicker.formatDate('dd-mm-yy', new Date()),
startDate: start_date,
endDate: max_order_date,
}).on('datepicker-first-date-selected', function() {