forked from mirrors/easyappointments
Only pre-select the service if its found
This commit is contained in:
parent
6c5917aea8
commit
0a4ea1c336
1 changed files with 4 additions and 2 deletions
|
@ -1546,13 +1546,15 @@ App.Utils.CalendarDefaultView = (function () {
|
||||||
(availableService) =>
|
(availableService) =>
|
||||||
Number(availableService.id) === Number($selectFilterItem.val())
|
Number(availableService.id) === Number($selectFilterItem.val())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (service) {
|
||||||
$appointmentsModal.find('#select-service').val(service.id).trigger('change');
|
$appointmentsModal.find('#select-service').val(service.id).trigger('change');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Preselect time
|
// Preselect time
|
||||||
$('#start-datetime').datepicker('setDate', info.start);
|
$('#start-datetime').datepicker('setDate', info.start);
|
||||||
$('#end-datetime').datepicker('setDate', info.end);
|
$('#end-datetime').datepicker('setDate', info.end);
|
||||||
|
|
||||||
$('#message-box').dialog('close');
|
$('#message-box').dialog('close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue