Widget:MattTest: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Megan Merlo (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script src="https://code.jquery.com/jquery-1. | <script src="https://code.jquery.com/jquery-1.12.4.js"></script> | ||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> | |||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | <link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys | // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys | ||
Line 50: | Line 50: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
//Update the Screening Visit Window | //Update the Screening Visit Window | ||
//Check Entered Screening Visit Date | //Check Entered Screening Visit Date | ||
$("#screenDate").datepicker({ | $("#screenDate").datepicker({ | ||
onSelect: function() { | onSelect: function() { | ||
checkScreenDate(); | $("#eventDate").datepicker(); | ||
checkScreenDate($(this).datepicker("getDate"),$("#eventDate").datepicker("getDate")); | |||
} | } | ||
}); | }); | ||
Line 78: | Line 62: | ||
onSelect: function(curDate, instance) { | onSelect: function(curDate, instance) { | ||
if(curDate != instance.lastVal) { | if(curDate != instance.lastVal) { | ||
screenUpdate(); | screenUpdate($(this).datepicker("getDate")); | ||
} | } | ||
} | } | ||
Line 162: | Line 146: | ||
}); | }); | ||
///////////// | ///////////// | ||
// | // | ||
Line 813: | Line 797: | ||
} | } | ||
function screenUpdate(){ | function screenUpdate(date){ | ||
var event = | var event = date; | ||
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | ||
Line 824: | Line 808: | ||
} | } | ||
function checkScreenDate( | function checkScreenDate(screen, event){ | ||
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate()); | ||
Line 974: | Line 956: | ||
console.log(visitName+" occurs Study Day"+studyDays); | console.log(visitName+" occurs Study Day"+studyDays); | ||
} | } | ||
}); | |||
</script> | </script> | ||
<style type="text/css"> | <style type="text/css"> |