Reversed "getDate" methods for unavailabilities modal.

This commit is contained in:
alextselegidis 2016-10-24 00:06:06 +02:00
parent e1697ba35e
commit 8332eecee2

View file

@ -30,8 +30,8 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
*/
$('#manage-unavailable #save-unavailable').click(function() {
var $dialog = $('#manage-unavailable');
var start = Date.parse($dialog.find('#unavailable-start').val());
var end = Date.parse($dialog.find('#unavailable-end').val());
var start = $dialog.find('#unavailable-start').datetimepicker('getDate');
var end = Date.parse($dialog.find('#unavailable-end').datetimepicker('getDate'));
if (start > end) {
// Start time is after end time - display message to user.