-
-
Save iaditya/8112f8ffddf70f5e1e30b501efc4bf30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select: function(startDate, endDate, jsEvent, view,resource) { | |
// here startDate and endDate will give you the date-range selected | |
//alert(startDate); | |
//alert(slotType); | |
console.log(view); | |
if (!startDate.hasTime()) { | |
// alert("Date has time: " + startDate.hasTime()); | |
return false; | |
// should be all-day | |
} | |
var start = startDate; | |
var end = endDate; | |
var facility_id = resource.id; | |
jQuery.ajax({ | |
type:'GET', | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
}, | |
async: true, | |
cache: false, | |
url: '/patients/findAdd?slot_type='+ slotType + '&provider_id='+provider_id+'&facility_id='+facility_id+'&start='+startDate.toString()+'&end='+endDate.toString(), | |
data: { | |
"start": startDate.toString(), | |
"end":endDate.toString() | |
}, | |
success: function(response) { | |
//alert(response); | |
$('#addEventModalBody').html(response); | |
$('#addEventModal').modal(); | |
}, | |
error: function(e) { | |
alert("error: " + e.responseText.message); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment